Skip to content

Commit cade004

Browse files
author
Danielle Millett
committed
Removing callbacks in onDetachedFromWindow, fixes b/7465673
In certain cases when lockscreen is constructed in landscape and then switches to portrait on the phone, it inflates new views for KeyguardHostView. The old views never call onPause() in KeyguardFaceUnlockView so it was still getting callbacks and starting Face Unlock multiple times. By removing the callbacks in onDetachedFromWindow() there won't be multiple instances of KeyguardFaceUnlockView receiving callbacks and starting face unlock. Change-Id: I00d770283e83be2f4b76e00340123789a8075091
1 parent ae73c69 commit cade004

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardFaceUnlockView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public void onDetachedFromWindow() {
9090
if (mBiometricUnlock != null) {
9191
mBiometricUnlock.stop();
9292
}
93+
KeyguardUpdateMonitor.getInstance(mContext).removeCallback(mUpdateCallback);
9394
}
9495

9596
@Override

0 commit comments

Comments
 (0)