Dismiss Keyguard correctly
When authenticating with fingerprint, we didn't go through the dismiss action, and thus launching intents was broken when authenticating with fingerprint from the bouncer. Also fixed a crash. Bug: 21695578 Change-Id: I61f74b5b63d4d6ddf7f8f3ce96feb63b9644cd52
This commit is contained in:
@@ -455,7 +455,7 @@ public class KeyguardViewMediator extends SystemUI {
|
||||
@Override
|
||||
public void onFingerprintAuthenticated(int userId) {
|
||||
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
|
||||
mViewMediatorCallback.keyguardDone(true);
|
||||
mStatusBarKeyguardViewManager.notifyKeyguardAuthenticated();
|
||||
} else {
|
||||
mStatusBarKeyguardViewManager.animateCollapsePanels(
|
||||
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
|
||||
|
||||
@@ -228,4 +228,9 @@ public class KeyguardBouncer {
|
||||
ensureView();
|
||||
return mKeyguardView.interceptMediaKey(event);
|
||||
}
|
||||
|
||||
public void notifyKeyguardAuthenticated() {
|
||||
ensureView();
|
||||
mKeyguardView.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2776,7 +2776,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
Runnable cancelRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
callback.onActivityStarted(ActivityManager.START_CANCELED);
|
||||
if (callback != null) {
|
||||
callback.onActivityStarted(ActivityManager.START_CANCELED);
|
||||
}
|
||||
}
|
||||
};
|
||||
executeRunnableDismissingKeyguard(runnable, cancelRunnable, dismissShade, afterKeyguardGone);
|
||||
|
||||
@@ -447,4 +447,12 @@ public class StatusBarKeyguardViewManager {
|
||||
mPhoneStatusBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE, true /* force */,
|
||||
false /* delayed */, speedUpFactor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies that the user has authenticated by other means than using the bouncer, for example,
|
||||
* fingerprint.
|
||||
*/
|
||||
public void notifyKeyguardAuthenticated() {
|
||||
mBouncer.notifyKeyguardAuthenticated();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user