Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +5 −0 Original line number Diff line number Diff line Loading @@ -933,6 +933,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { == LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; } public boolean userNeedsStrongAuth() { return mStrongAuthTracker.getStrongAuthForUser(getCurrentUser()) != LockPatternUtils.StrongAuthTracker.STRONG_AUTH_NOT_REQUIRED; } public boolean needsSlowUnlockTransition() { return mNeedsSlowUnlockTransition; } Loading packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +3 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import com.android.systemui.statusbar.phone.ScrimState; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.UnlockMethodCache; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.InjectionInflationController; import com.android.systemui.util.leak.GarbageMonitor; Loading Loading @@ -140,8 +141,8 @@ public class SystemUIFactory { KeyguardBouncer.BouncerExpansionCallback expansionCallback) { return new KeyguardBouncer(context, callback, lockPatternUtils, container, dismissCallbackRegistry, FalsingManagerFactory.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); expansionCallback, UnlockMethodCache.getInstance(context), KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); } public ScrimController createScrimController(ScrimView scrimBehind, ScrimView scrimInFront, Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +6 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ import java.io.PrintWriter; public class KeyguardBouncer { private static final String TAG = "KeyguardBouncer"; static final long BOUNCER_FACE_DELAY = 800; static final long BOUNCER_FACE_DELAY = 1200; static final float ALPHA_EXPANSION_THRESHOLD = 0.95f; static final float EXPANSION_HIDDEN = 1f; static final float EXPANSION_VISIBLE = 0f; Loading @@ -68,6 +68,7 @@ public class KeyguardBouncer { private final Handler mHandler; private final BouncerExpansionCallback mExpansionCallback; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final UnlockMethodCache mUnlockMethodCache; private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -95,7 +96,7 @@ public class KeyguardBouncer { public KeyguardBouncer(Context context, ViewMediatorCallback callback, LockPatternUtils lockPatternUtils, ViewGroup container, DismissCallbackRegistry dismissCallbackRegistry, FalsingManager falsingManager, BouncerExpansionCallback expansionCallback, BouncerExpansionCallback expansionCallback, UnlockMethodCache unlockMethodCache, KeyguardUpdateMonitor keyguardUpdateMonitor, Handler handler) { mContext = context; mCallback = callback; Loading @@ -106,6 +107,7 @@ public class KeyguardBouncer { mDismissCallbackRegistry = dismissCallbackRegistry; mExpansionCallback = expansionCallback; mHandler = handler; mUnlockMethodCache = unlockMethodCache; mKeyguardUpdateMonitor.registerCallback(mUpdateMonitorCallback); } Loading Loading @@ -168,7 +170,8 @@ public class KeyguardBouncer { // Split up the work over multiple frames. DejankUtils.removeCallbacks(mResetRunnable); if (mKeyguardUpdateMonitor.isFaceDetectionRunning()) { if (mUnlockMethodCache.isUnlockingWithFacePossible() && !needsFullscreenBouncer() && !mKeyguardUpdateMonitor.userNeedsStrongAuth()) { mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY); } else { DejankUtils.postAfterTraversal(mShowRunnable); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -82,6 +82,8 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private UnlockMethodCache mUnlockMethodCache; @Mock private Handler mHandler; private KeyguardBouncer mBouncer; Loading @@ -96,7 +98,7 @@ public class KeyguardBouncerTest extends SysuiTestCase { when(mKeyguardHostView.getHeight()).thenReturn(500); mBouncer = new KeyguardBouncer(getContext(), mViewMediatorCallback, mLockPatternUtils, container, mDismissCallbackRegistry, mFalsingManager, mExpansionCallback, mKeyguardUpdateMonitor, mHandler) { mExpansionCallback, mUnlockMethodCache, mKeyguardUpdateMonitor, mHandler) { @Override protected void inflateView() { super.inflateView(); Loading Loading @@ -377,7 +379,7 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Test public void testShow_delaysIfFaceAuthIsRunning() { when(mKeyguardUpdateMonitor.isFaceDetectionRunning()).thenReturn(true); when(mUnlockMethodCache.isUnlockingWithFacePossible()).thenReturn(true); mBouncer.show(true /* reset */); ArgumentCaptor<Runnable> showRunnable = ArgumentCaptor.forClass(Runnable.class); Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +5 −0 Original line number Diff line number Diff line Loading @@ -933,6 +933,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { == LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; } public boolean userNeedsStrongAuth() { return mStrongAuthTracker.getStrongAuthForUser(getCurrentUser()) != LockPatternUtils.StrongAuthTracker.STRONG_AUTH_NOT_REQUIRED; } public boolean needsSlowUnlockTransition() { return mNeedsSlowUnlockTransition; } Loading
packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +3 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import com.android.systemui.statusbar.phone.ScrimState; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.UnlockMethodCache; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.util.InjectionInflationController; import com.android.systemui.util.leak.GarbageMonitor; Loading Loading @@ -140,8 +141,8 @@ public class SystemUIFactory { KeyguardBouncer.BouncerExpansionCallback expansionCallback) { return new KeyguardBouncer(context, callback, lockPatternUtils, container, dismissCallbackRegistry, FalsingManagerFactory.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); expansionCallback, UnlockMethodCache.getInstance(context), KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); } public ScrimController createScrimController(ScrimView scrimBehind, ScrimView scrimInFront, Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +6 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ import java.io.PrintWriter; public class KeyguardBouncer { private static final String TAG = "KeyguardBouncer"; static final long BOUNCER_FACE_DELAY = 800; static final long BOUNCER_FACE_DELAY = 1200; static final float ALPHA_EXPANSION_THRESHOLD = 0.95f; static final float EXPANSION_HIDDEN = 1f; static final float EXPANSION_VISIBLE = 0f; Loading @@ -68,6 +68,7 @@ public class KeyguardBouncer { private final Handler mHandler; private final BouncerExpansionCallback mExpansionCallback; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final UnlockMethodCache mUnlockMethodCache; private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -95,7 +96,7 @@ public class KeyguardBouncer { public KeyguardBouncer(Context context, ViewMediatorCallback callback, LockPatternUtils lockPatternUtils, ViewGroup container, DismissCallbackRegistry dismissCallbackRegistry, FalsingManager falsingManager, BouncerExpansionCallback expansionCallback, BouncerExpansionCallback expansionCallback, UnlockMethodCache unlockMethodCache, KeyguardUpdateMonitor keyguardUpdateMonitor, Handler handler) { mContext = context; mCallback = callback; Loading @@ -106,6 +107,7 @@ public class KeyguardBouncer { mDismissCallbackRegistry = dismissCallbackRegistry; mExpansionCallback = expansionCallback; mHandler = handler; mUnlockMethodCache = unlockMethodCache; mKeyguardUpdateMonitor.registerCallback(mUpdateMonitorCallback); } Loading Loading @@ -168,7 +170,8 @@ public class KeyguardBouncer { // Split up the work over multiple frames. DejankUtils.removeCallbacks(mResetRunnable); if (mKeyguardUpdateMonitor.isFaceDetectionRunning()) { if (mUnlockMethodCache.isUnlockingWithFacePossible() && !needsFullscreenBouncer() && !mKeyguardUpdateMonitor.userNeedsStrongAuth()) { mHandler.postDelayed(mShowRunnable, BOUNCER_FACE_DELAY); } else { DejankUtils.postAfterTraversal(mShowRunnable); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardBouncerTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -82,6 +82,8 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Mock private KeyguardUpdateMonitor mKeyguardUpdateMonitor; @Mock private UnlockMethodCache mUnlockMethodCache; @Mock private Handler mHandler; private KeyguardBouncer mBouncer; Loading @@ -96,7 +98,7 @@ public class KeyguardBouncerTest extends SysuiTestCase { when(mKeyguardHostView.getHeight()).thenReturn(500); mBouncer = new KeyguardBouncer(getContext(), mViewMediatorCallback, mLockPatternUtils, container, mDismissCallbackRegistry, mFalsingManager, mExpansionCallback, mKeyguardUpdateMonitor, mHandler) { mExpansionCallback, mUnlockMethodCache, mKeyguardUpdateMonitor, mHandler) { @Override protected void inflateView() { super.inflateView(); Loading Loading @@ -377,7 +379,7 @@ public class KeyguardBouncerTest extends SysuiTestCase { @Test public void testShow_delaysIfFaceAuthIsRunning() { when(mKeyguardUpdateMonitor.isFaceDetectionRunning()).thenReturn(true); when(mUnlockMethodCache.isUnlockingWithFacePossible()).thenReturn(true); mBouncer.show(true /* reset */); ArgumentCaptor<Runnable> showRunnable = ArgumentCaptor.forClass(Runnable.class); Loading