Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a93434b1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes Idadf8487,I84d87024 am: e489d46b am: 43b7ae19

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1981855

Change-Id: I38ae0b28716a446c9d30a3fbcf7517d0c74e3d30
parents fe155f50 43b7ae19
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -435,7 +435,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
     */
     */
    public void onCancel() {
    public void onCancel() {
        Log.d(TAG, "Pairing dialog canceled");
        Log.d(TAG, "Pairing dialog canceled");
        mDevice.cancelPairing();
        mDevice.cancelBondProcess();
    }
    }


    /**
    /**
+2 −2
Original line number Original line Diff line number Diff line
@@ -98,7 +98,7 @@ public final class BluetoothPairingService extends Service {
            } else if (action.equals(ACTION_DISMISS_PAIRING)) {
            } else if (action.equals(ACTION_DISMISS_PAIRING)) {
                Log.d(TAG, "Notification cancel " + " (" +
                Log.d(TAG, "Notification cancel " + " (" +
                        mDevice.getName() + ")");
                        mDevice.getName() + ")");
                mDevice.cancelPairing();
                mDevice.cancelBondProcess();
            } else {
            } else {
                int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE,
                int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE,
                        BluetoothDevice.ERROR);
                        BluetoothDevice.ERROR);
@@ -144,7 +144,7 @@ public final class BluetoothPairingService extends Service {
            createPairingNotification(intent);
            createPairingNotification(intent);
        } else if (TextUtils.equals(action, ACTION_DISMISS_PAIRING)) {
        } else if (TextUtils.equals(action, ACTION_DISMISS_PAIRING)) {
            Log.d(TAG, "Notification cancel " + " (" + mDevice.getName() + ")");
            Log.d(TAG, "Notification cancel " + " (" + mDevice.getName() + ")");
            mDevice.cancelPairing();
            mDevice.cancelBondProcess();
            mNm.cancel(NOTIFICATION_ID);
            mNm.cancel(NOTIFICATION_ID);
            stopSelf();
            stopSelf();
        } else if (TextUtils.equals(action, ACTION_PAIRING_DIALOG)) {
        } else if (TextUtils.equals(action, ACTION_PAIRING_DIALOG)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -106,7 +106,7 @@ public class BluetoothPairingServiceTest {


        mBluetoothPairingService.onStartCommand(intent, /* flags */ 0, /* startId */ 0);
        mBluetoothPairingService.onStartCommand(intent, /* flags */ 0, /* startId */ 0);


        verify(mDevice).cancelPairing();
        verify(mDevice).cancelBondProcess();
        verify(mNm).cancel(mBluetoothPairingService.NOTIFICATION_ID);
        verify(mNm).cancel(mBluetoothPairingService.NOTIFICATION_ID);
    }
    }