Loading packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java +4 −7 Original line number Diff line number Diff line Loading @@ -16,12 +16,8 @@ package com.android.keyguard; import android.animation.Animator; import android.animation.ObjectAnimator; import android.content.Context; import android.util.AttributeSet; import android.view.RenderNode; import android.view.RenderNodeAnimator; import android.view.View; import android.view.ViewGroup; import android.view.animation.AnimationUtils; Loading Loading @@ -144,7 +140,8 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { setTranslationY(0); AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 280 /* duration */, mDisappearYTranslation, mDisappearAnimationUtils.getInterpolator()); DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked() DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor .needsSlowUnlockTransition() ? mDisappearAnimationUtils : mDisappearAnimationUtilsLocked; disappearAnimationUtils.startAnimation2d(mViews, Loading packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java +7 −6 Original line number Diff line number Diff line Loading @@ -408,9 +408,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit @Override public boolean startDisappearAnimation(final Runnable finishRunnable) { float durationMultiplier = mKeyguardUpdateMonitor.isUserUnlocked() ? 1f : DISAPPEAR_MULTIPLIER_LOCKED; float durationMultiplier = mKeyguardUpdateMonitor.needsSlowUnlockTransition() ? DISAPPEAR_MULTIPLIER_LOCKED : 1f; mLockPatternView.clearPattern(); enableClipping(false); setTranslationY(0); Loading @@ -419,9 +419,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit -mDisappearAnimationUtils.getStartTranslation(), mDisappearAnimationUtils.getInterpolator()); DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked() ? mDisappearAnimationUtils : mDisappearAnimationUtilsLocked; DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor .needsSlowUnlockTransition() ? mDisappearAnimationUtilsLocked : mDisappearAnimationUtils; disappearAnimationUtils.startAnimation2d(mLockPatternView.getCellStates(), () -> { enableClipping(true); Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +21 −4 Original line number Diff line number Diff line Loading @@ -34,9 +34,12 @@ import android.app.PendingIntent; import android.app.admin.DevicePolicyManager; import android.app.trust.TrustManager; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.database.ContentObserver; import android.graphics.Bitmap; import android.hardware.fingerprint.FingerprintManager; Loading Loading @@ -159,6 +162,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final int DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT = 5000000; private static final ComponentName FALLBACK_HOME_COMPONENT = new ComponentName( "com.android.settings", "com.android.settings.FallbackHome"); private static KeyguardUpdateMonitor sInstance; private final Context mContext; Loading @@ -177,7 +183,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private boolean mGoingToSleep; private boolean mBouncer; private boolean mBootCompleted; private boolean mUserUnlocked; private boolean mNeedsSlowUnlockTransition; private boolean mHasLockscreenWallpaper; // Device provisioning state Loading Loading @@ -572,8 +578,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { && !hasFingerprintUnlockTimedOut(sCurrentUser); } public boolean isUserUnlocked() { return mUserUnlocked; public boolean needsSlowUnlockTransition() { return mNeedsSlowUnlockTransition; } public StrongAuthTracker getStrongAuthTracker() { Loading Loading @@ -1438,7 +1444,18 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private void handleKeyguardReset() { if (DEBUG) Log.d(TAG, "handleKeyguardReset"); updateFingerprintListeningState(); mUserUnlocked = mUserManager.isUserUnlocked(getCurrentUser()); mNeedsSlowUnlockTransition = resolveNeedsSlowUnlockTransition(); } private boolean resolveNeedsSlowUnlockTransition() { if (mUserManager.isUserUnlocked(getCurrentUser())) { return false; } Intent homeIntent = new Intent(Intent.ACTION_MAIN) .addCategory(Intent.CATEGORY_HOME); ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(homeIntent, 0 /* flags */); return FALLBACK_HOME_COMPONENT.equals(resolveInfo.getComponentInfo().getComponentName()); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +5 −5 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mSkipFirstFrame = skipFirstFrame; mOnAnimationFinished = onAnimationFinished; if (mKeyguardUpdateMonitor.isUserUnlocked()) { if (!mKeyguardUpdateMonitor.needsSlowUnlockTransition()) { scheduleUpdate(); // No need to wait for the next frame to be drawn for this case - onPreDraw will execute Loading Loading @@ -230,9 +230,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, } private float getScrimInFrontAlpha() { return mKeyguardUpdateMonitor.isUserUnlocked() ? SCRIM_IN_FRONT_ALPHA : SCRIM_IN_FRONT_ALPHA_LOCKED; return mKeyguardUpdateMonitor.needsSlowUnlockTransition() ? SCRIM_IN_FRONT_ALPHA_LOCKED : SCRIM_IN_FRONT_ALPHA; } protected void scheduleUpdate() { Loading Loading @@ -400,7 +400,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, } protected Interpolator getInterpolator() { if (mAnimateKeyguardFadingOut && !mKeyguardUpdateMonitor.isUserUnlocked()) { if (mAnimateKeyguardFadingOut && mKeyguardUpdateMonitor.needsSlowUnlockTransition()) { return KEYGUARD_FADE_OUT_INTERPOLATOR_LOCKED; } else if (mAnimateKeyguardFadingOut) { return KEYGUARD_FADE_OUT_INTERPOLATOR; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void hide(long startTime, long fadeoutDuration) { mShowing = false; if (!KeyguardUpdateMonitor.getInstance(mContext).isUserUnlocked()) { if (KeyguardUpdateMonitor.getInstance(mContext).needsSlowUnlockTransition()) { fadeoutDuration = KEYGUARD_DISMISS_DURATION_LOCKED; } long uptimeMillis = SystemClock.uptimeMillis(); Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java +4 −7 Original line number Diff line number Diff line Loading @@ -16,12 +16,8 @@ package com.android.keyguard; import android.animation.Animator; import android.animation.ObjectAnimator; import android.content.Context; import android.util.AttributeSet; import android.view.RenderNode; import android.view.RenderNodeAnimator; import android.view.View; import android.view.ViewGroup; import android.view.animation.AnimationUtils; Loading Loading @@ -144,7 +140,8 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { setTranslationY(0); AppearAnimationUtils.startTranslationYAnimation(this, 0 /* delay */, 280 /* duration */, mDisappearYTranslation, mDisappearAnimationUtils.getInterpolator()); DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked() DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor .needsSlowUnlockTransition() ? mDisappearAnimationUtils : mDisappearAnimationUtilsLocked; disappearAnimationUtils.startAnimation2d(mViews, Loading
packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java +7 −6 Original line number Diff line number Diff line Loading @@ -408,9 +408,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit @Override public boolean startDisappearAnimation(final Runnable finishRunnable) { float durationMultiplier = mKeyguardUpdateMonitor.isUserUnlocked() ? 1f : DISAPPEAR_MULTIPLIER_LOCKED; float durationMultiplier = mKeyguardUpdateMonitor.needsSlowUnlockTransition() ? DISAPPEAR_MULTIPLIER_LOCKED : 1f; mLockPatternView.clearPattern(); enableClipping(false); setTranslationY(0); Loading @@ -419,9 +419,10 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit -mDisappearAnimationUtils.getStartTranslation(), mDisappearAnimationUtils.getInterpolator()); DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor.isUserUnlocked() ? mDisappearAnimationUtils : mDisappearAnimationUtilsLocked; DisappearAnimationUtils disappearAnimationUtils = mKeyguardUpdateMonitor .needsSlowUnlockTransition() ? mDisappearAnimationUtilsLocked : mDisappearAnimationUtils; disappearAnimationUtils.startAnimation2d(mLockPatternView.getCellStates(), () -> { enableClipping(true); Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +21 −4 Original line number Diff line number Diff line Loading @@ -34,9 +34,12 @@ import android.app.PendingIntent; import android.app.admin.DevicePolicyManager; import android.app.trust.TrustManager; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.database.ContentObserver; import android.graphics.Bitmap; import android.hardware.fingerprint.FingerprintManager; Loading Loading @@ -159,6 +162,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final int DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT = 5000000; private static final ComponentName FALLBACK_HOME_COMPONENT = new ComponentName( "com.android.settings", "com.android.settings.FallbackHome"); private static KeyguardUpdateMonitor sInstance; private final Context mContext; Loading @@ -177,7 +183,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private boolean mGoingToSleep; private boolean mBouncer; private boolean mBootCompleted; private boolean mUserUnlocked; private boolean mNeedsSlowUnlockTransition; private boolean mHasLockscreenWallpaper; // Device provisioning state Loading Loading @@ -572,8 +578,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { && !hasFingerprintUnlockTimedOut(sCurrentUser); } public boolean isUserUnlocked() { return mUserUnlocked; public boolean needsSlowUnlockTransition() { return mNeedsSlowUnlockTransition; } public StrongAuthTracker getStrongAuthTracker() { Loading Loading @@ -1438,7 +1444,18 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private void handleKeyguardReset() { if (DEBUG) Log.d(TAG, "handleKeyguardReset"); updateFingerprintListeningState(); mUserUnlocked = mUserManager.isUserUnlocked(getCurrentUser()); mNeedsSlowUnlockTransition = resolveNeedsSlowUnlockTransition(); } private boolean resolveNeedsSlowUnlockTransition() { if (mUserManager.isUserUnlocked(getCurrentUser())) { return false; } Intent homeIntent = new Intent(Intent.ACTION_MAIN) .addCategory(Intent.CATEGORY_HOME); ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(homeIntent, 0 /* flags */); return FALLBACK_HOME_COMPONENT.equals(resolveInfo.getComponentInfo().getComponentName()); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +5 −5 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mSkipFirstFrame = skipFirstFrame; mOnAnimationFinished = onAnimationFinished; if (mKeyguardUpdateMonitor.isUserUnlocked()) { if (!mKeyguardUpdateMonitor.needsSlowUnlockTransition()) { scheduleUpdate(); // No need to wait for the next frame to be drawn for this case - onPreDraw will execute Loading Loading @@ -230,9 +230,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, } private float getScrimInFrontAlpha() { return mKeyguardUpdateMonitor.isUserUnlocked() ? SCRIM_IN_FRONT_ALPHA : SCRIM_IN_FRONT_ALPHA_LOCKED; return mKeyguardUpdateMonitor.needsSlowUnlockTransition() ? SCRIM_IN_FRONT_ALPHA_LOCKED : SCRIM_IN_FRONT_ALPHA; } protected void scheduleUpdate() { Loading Loading @@ -400,7 +400,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, } protected Interpolator getInterpolator() { if (mAnimateKeyguardFadingOut && !mKeyguardUpdateMonitor.isUserUnlocked()) { if (mAnimateKeyguardFadingOut && mKeyguardUpdateMonitor.needsSlowUnlockTransition()) { return KEYGUARD_FADE_OUT_INTERPOLATOR_LOCKED; } else if (mAnimateKeyguardFadingOut) { return KEYGUARD_FADE_OUT_INTERPOLATOR; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void hide(long startTime, long fadeoutDuration) { mShowing = false; if (!KeyguardUpdateMonitor.getInstance(mContext).isUserUnlocked()) { if (KeyguardUpdateMonitor.getInstance(mContext).needsSlowUnlockTransition()) { fadeoutDuration = KEYGUARD_DISMISS_DURATION_LOCKED; } long uptimeMillis = SystemClock.uptimeMillis(); Loading