Update log for BluetoothPairingService

ACTION_PAIRING_CANCEL does not contain an EXTRA_BOND_STATE

Test: Log change is no-op
Bug: 253775131
Change-Id: Ida67374e9369991d7e016b38df9c17a8fa5418cc
This commit is contained in:
William Escande
2022-12-05 15:30:51 -08:00
parent 3b9cb9a7d9
commit cd231dc047

View File

@@ -99,11 +99,8 @@ public final class BluetoothPairingService extends Service {
Log.d(TAG, "Notification cancel " + " (" + Log.d(TAG, "Notification cancel " + " (" +
mDevice.getName() + ")"); mDevice.getName() + ")");
mDevice.cancelBondProcess(); mDevice.cancelBondProcess();
} else { } else { // BluetoothDevice.ACTION_PAIRING_CANCEL
int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, Log.d(TAG, "Dismiss pairing for " + " (" + mDevice.getName() + ")");
BluetoothDevice.ERROR);
Log.d(TAG, "Dismiss pairing for " + " (" +
mDevice.getName() + "), BondState: " + bondState);
} }
mNm.cancel(NOTIFICATION_ID); mNm.cancel(NOTIFICATION_ID);