Merge "Fingerprint: Show bouncer when fingerprint is disallowed" into oc-dr1-dev

am: 544e628e16

Change-Id: I2df5b364bbfde27299d5f5114224dd6bfaeaa782
This commit is contained in:
Adrian Roos
2017-07-25 14:11:10 +00:00
committed by android-build-merger
2 changed files with 23 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.keyguard.LatencyTracker; import com.android.keyguard.LatencyTracker;
import com.android.systemui.Dependency; import com.android.systemui.Dependency;
import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.WakefulnessLifecycle;
/** /**
* Controller which coordinates all the fingerprint unlocking actions with the UI. * Controller which coordinates all the fingerprint unlocking actions with the UI.
@@ -99,6 +100,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
private final UnlockMethodCache mUnlockMethodCache; private final UnlockMethodCache mUnlockMethodCache;
private final Context mContext; private final Context mContext;
private int mPendingAuthenticatedUserId = -1; private int mPendingAuthenticatedUserId = -1;
private boolean mPendingShowBouncer;
public FingerprintUnlockController(Context context, public FingerprintUnlockController(Context context,
DozeScrimController dozeScrimController, DozeScrimController dozeScrimController,
@@ -110,6 +112,7 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
mPowerManager = context.getSystemService(PowerManager.class); mPowerManager = context.getSystemService(PowerManager.class);
mUpdateMonitor = KeyguardUpdateMonitor.getInstance(context); mUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
mUpdateMonitor.registerCallback(this); mUpdateMonitor.registerCallback(this);
Dependency.get(WakefulnessLifecycle.class).addObserver(mWakefulnessObserver);
mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class); mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
mDozeScrimController = dozeScrimController; mDozeScrimController = dozeScrimController;
mKeyguardViewMediator = keyguardViewMediator; mKeyguardViewMediator = keyguardViewMediator;
@@ -212,9 +215,10 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
Trace.beginSection("MODE_UNLOCK or MODE_SHOW_BOUNCER"); Trace.beginSection("MODE_UNLOCK or MODE_SHOW_BOUNCER");
if (!wasDeviceInteractive) { if (!wasDeviceInteractive) {
mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested(); mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
mPendingShowBouncer = true;
} else {
showBouncer();
} }
mStatusBarKeyguardViewManager.animateCollapsePanels(
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
Trace.endSection(); Trace.endSection();
break; break;
case MODE_WAKE_AND_UNLOCK_PULSING: case MODE_WAKE_AND_UNLOCK_PULSING:
@@ -247,6 +251,12 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
Trace.endSection(); Trace.endSection();
} }
private void showBouncer() {
mStatusBarKeyguardViewManager.animateCollapsePanels(
FINGERPRINT_COLLAPSE_SPEEDUP_FACTOR);
mPendingShowBouncer = false;
}
@Override @Override
public void onStartedGoingToSleep(int why) { public void onStartedGoingToSleep(int why) {
mPendingAuthenticatedUserId = -1; mPendingAuthenticatedUserId = -1;
@@ -338,4 +348,14 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
} }
mStatusBar.notifyFpAuthModeChanged(); mStatusBar.notifyFpAuthModeChanged();
} }
private final WakefulnessLifecycle.Observer mWakefulnessObserver =
new WakefulnessLifecycle.Observer() {
@Override
public void onFinishedWakingUp() {
if (mPendingShowBouncer) {
FingerprintUnlockController.this.showBouncer();
}
}
};
} }

View File

@@ -5161,6 +5161,7 @@ public class StatusBar extends SystemUI implements DemoMode,
mStackScroller.setAnimationsEnabled(true); mStackScroller.setAnimationsEnabled(true);
mVisualStabilityManager.setScreenOn(true); mVisualStabilityManager.setScreenOn(true);
mNotificationPanel.setTouchDisabled(false); mNotificationPanel.setTouchDisabled(false);
mDozeServiceHost.stopDozing();
updateVisibleToUser(); updateVisibleToUser();
updateIsKeyguard(); updateIsKeyguard();
} }