Merge "Don't cancel passkey entry pairing autonomously" am: 059ab284e7 am: 7c6a004452 am: 99bbb571f3 am: 8fc819f87a am: e379ccfff2

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

Change-Id: Iee681eb028dd51fd744c2fb4f0ac3306fea2e1fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Himanshu Rawat
2022-07-26 04:37:02 +00:00
committed by Automerger Merge Worker

View File

@@ -86,8 +86,12 @@ public class BluetoothPairingDialogFragment extends InstrumentedDialogFragment i
@Override
public void onDestroy() {
super.onDestroy();
if (!mPositiveClicked) {
mPairingController.onCancel();
if (mPairingController.getDialogType()
!= BluetoothPairingController.DISPLAY_PASSKEY_DIALOG) {
/* Cancel pairing unless explicitly accepted by user */
if (!mPositiveClicked) {
mPairingController.onCancel();
}
}
}