Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −1 Original line number Diff line number Diff line Loading @@ -775,6 +775,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab if (msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT || msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT) { mFingerprintLockedOut = true; if (isUdfpsEnrolled()) { updateFingerprintListeningState(); } } for (int i = 0; i < mCallbacks.size(); i++) { Loading Loading @@ -2115,7 +2118,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || (!getUserCanSkipBouncer(getCurrentUser()) && !isEncryptedOrLockdown(getCurrentUser()) && !userNeedsStrongAuth() && userDoesNotHaveTrust); && userDoesNotHaveTrust && !mFingerprintLockedOut); return shouldListenKeyguardState && shouldListenUserState && shouldListenBouncerState && shouldListenUdfpsState; } Loading Loading @@ -3244,6 +3248,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" strongAuthFlags=" + Integer.toHexString(strongAuthFlags)); pw.println(" trustManaged=" + getUserTrustIsManaged(userId)); pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" mFingerprintLockedOut=" + mFingerprintLockedOut); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); if (isUdfpsEnrolled()) { pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java +2 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.Nullable; import android.content.res.ColorStateList; import android.graphics.Color; import android.text.TextUtils; import android.view.View; import androidx.annotation.IntDef; Loading Loading @@ -202,10 +201,7 @@ public class KeyguardIndicationRotateTextViewController extends mCurrIndicationType = type; mIndicationQueue.removeIf(x -> x == type); if (mCurrIndicationType == INDICATION_TYPE_NONE) { mView.setVisibility(View.GONE); } else { mView.setVisibility(View.VISIBLE); if (mCurrIndicationType != INDICATION_TYPE_NONE) { mIndicationQueue.add(type); // re-add to show later } Loading Loading @@ -299,7 +295,7 @@ public class KeyguardIndicationRotateTextViewController extends } } private static final int INDICATION_TYPE_NONE = -1; static final int INDICATION_TYPE_NONE = -1; public static final int INDICATION_TYPE_OWNER_INFO = 0; public static final int INDICATION_TYPE_DISCLOSURE = 1; public static final int INDICATION_TYPE_LOGOUT = 2; Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +14 −6 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private ViewGroup mIndicationArea; private KeyguardIndicationTextView mTopIndicationView; private KeyguardIndicationTextView mLockScreenIndicationView; private final IBatteryStats mBatteryInfo; private final SettableWakeLock mWakeLock; private final DockManager mDockManager; Loading Loading @@ -208,15 +209,19 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal mKeyguardUpdateMonitor.registerCallback(mTickReceiver); mStatusBarStateController.addCallback(mStatusBarStateListener); mKeyguardStateController.addCallback(this); mStatusBarStateListener.onDozingChanged(mStatusBarStateController.isDozing()); } public void setIndicationArea(ViewGroup indicationArea) { mIndicationArea = indicationArea; mTopIndicationView = indicationArea.findViewById(R.id.keyguard_indication_text); mLockScreenIndicationView = indicationArea.findViewById( R.id.keyguard_indication_text_bottom); mInitialTextColorState = mTopIndicationView != null ? mTopIndicationView.getTextColors() : ColorStateList.valueOf(Color.WHITE); mRotateTextViewController = new KeyguardIndicationRotateTextViewController( indicationArea.findViewById(R.id.keyguard_indication_text_bottom), mLockScreenIndicationView, mExecutor, mStatusBarStateController); updateIndication(false /* animate */); Loading Loading @@ -630,6 +635,7 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal // should be shown based on user or device state // AoD if (mDozing) { mLockScreenIndicationView.setVisibility(View.GONE); mTopIndicationView.setVisibility(VISIBLE); // When dozing we ignore any text color and use white instead, because // colors can be hard to read in low brightness. Loading Loading @@ -659,6 +665,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal // LOCK SCREEN mTopIndicationView.setVisibility(GONE); mTopIndicationView.setText(null); mLockScreenIndicationView.setVisibility(View.VISIBLE); updateIndications(animate, KeyguardUpdateMonitor.getCurrentUser()); } Loading Loading @@ -914,7 +922,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal } else if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.showBouncerMessage(errString, mInitialTextColorState); } else if (mKeyguardUpdateMonitor.isScreenOn()) { showTransientIndication(errString); showTransientIndication(errString, /* isError */ true, /* hideOnScreenOff */ true); // We want to keep this message around in case the screen was off hideTransientIndicationDelayed(HIDE_DELAY_MS); } else { Loading Loading @@ -1032,9 +1041,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal if (mHideTransientMessageOnScreenOff && mDozing) { hideTransientIndication(); } else { updateIndication(false); } updateIndication(false); } }; } packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import java.util.LinkedList; * A view to show hints on Keyguard ("Swipe up to unlock", "Tap again to open"). */ public class KeyguardIndicationTextView extends TextView { private static final long MSG_DURATION_MILLIS = 600; private static final long MSG_DURATION_MILLIS = 1500; private long mNextAnimationTime = 0; private boolean mAnimationsEnabled = true; private LinkedList<CharSequence> mMessages = new LinkedList<>(); Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewControllerTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.content.res.ColorStateList; import android.graphics.Color; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper.RunWithLooper; import android.view.View; import androidx.test.filters.SmallTest; Loading Loading @@ -258,8 +257,8 @@ public class KeyguardIndicationRotateTextViewControllerTest extends SysuiTestCas // WHEN the device is dozing mStatusBarStateListener.onDozingChanged(true); // THEN the view is GONE verify(mView).setVisibility(View.GONE); // THEN switch to INDICATION_TYPE_NONE verify(mView).switchIndication(null); } @Test Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +6 −1 Original line number Diff line number Diff line Loading @@ -775,6 +775,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab if (msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT || msgId == FingerprintManager.FINGERPRINT_ERROR_LOCKOUT_PERMANENT) { mFingerprintLockedOut = true; if (isUdfpsEnrolled()) { updateFingerprintListeningState(); } } for (int i = 0; i < mCallbacks.size(); i++) { Loading Loading @@ -2115,7 +2118,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab || (!getUserCanSkipBouncer(getCurrentUser()) && !isEncryptedOrLockdown(getCurrentUser()) && !userNeedsStrongAuth() && userDoesNotHaveTrust); && userDoesNotHaveTrust && !mFingerprintLockedOut); return shouldListenKeyguardState && shouldListenUserState && shouldListenBouncerState && shouldListenUdfpsState; } Loading Loading @@ -3244,6 +3248,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" strongAuthFlags=" + Integer.toHexString(strongAuthFlags)); pw.println(" trustManaged=" + getUserTrustIsManaged(userId)); pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" mFingerprintLockedOut=" + mFingerprintLockedOut); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); if (isUdfpsEnrolled()) { pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java +2 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.Nullable; import android.content.res.ColorStateList; import android.graphics.Color; import android.text.TextUtils; import android.view.View; import androidx.annotation.IntDef; Loading Loading @@ -202,10 +201,7 @@ public class KeyguardIndicationRotateTextViewController extends mCurrIndicationType = type; mIndicationQueue.removeIf(x -> x == type); if (mCurrIndicationType == INDICATION_TYPE_NONE) { mView.setVisibility(View.GONE); } else { mView.setVisibility(View.VISIBLE); if (mCurrIndicationType != INDICATION_TYPE_NONE) { mIndicationQueue.add(type); // re-add to show later } Loading Loading @@ -299,7 +295,7 @@ public class KeyguardIndicationRotateTextViewController extends } } private static final int INDICATION_TYPE_NONE = -1; static final int INDICATION_TYPE_NONE = -1; public static final int INDICATION_TYPE_OWNER_INFO = 0; public static final int INDICATION_TYPE_DISCLOSURE = 1; public static final int INDICATION_TYPE_LOGOUT = 2; Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +14 −6 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private ViewGroup mIndicationArea; private KeyguardIndicationTextView mTopIndicationView; private KeyguardIndicationTextView mLockScreenIndicationView; private final IBatteryStats mBatteryInfo; private final SettableWakeLock mWakeLock; private final DockManager mDockManager; Loading Loading @@ -208,15 +209,19 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal mKeyguardUpdateMonitor.registerCallback(mTickReceiver); mStatusBarStateController.addCallback(mStatusBarStateListener); mKeyguardStateController.addCallback(this); mStatusBarStateListener.onDozingChanged(mStatusBarStateController.isDozing()); } public void setIndicationArea(ViewGroup indicationArea) { mIndicationArea = indicationArea; mTopIndicationView = indicationArea.findViewById(R.id.keyguard_indication_text); mLockScreenIndicationView = indicationArea.findViewById( R.id.keyguard_indication_text_bottom); mInitialTextColorState = mTopIndicationView != null ? mTopIndicationView.getTextColors() : ColorStateList.valueOf(Color.WHITE); mRotateTextViewController = new KeyguardIndicationRotateTextViewController( indicationArea.findViewById(R.id.keyguard_indication_text_bottom), mLockScreenIndicationView, mExecutor, mStatusBarStateController); updateIndication(false /* animate */); Loading Loading @@ -630,6 +635,7 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal // should be shown based on user or device state // AoD if (mDozing) { mLockScreenIndicationView.setVisibility(View.GONE); mTopIndicationView.setVisibility(VISIBLE); // When dozing we ignore any text color and use white instead, because // colors can be hard to read in low brightness. Loading Loading @@ -659,6 +665,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal // LOCK SCREEN mTopIndicationView.setVisibility(GONE); mTopIndicationView.setText(null); mLockScreenIndicationView.setVisibility(View.VISIBLE); updateIndications(animate, KeyguardUpdateMonitor.getCurrentUser()); } Loading Loading @@ -914,7 +922,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal } else if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.showBouncerMessage(errString, mInitialTextColorState); } else if (mKeyguardUpdateMonitor.isScreenOn()) { showTransientIndication(errString); showTransientIndication(errString, /* isError */ true, /* hideOnScreenOff */ true); // We want to keep this message around in case the screen was off hideTransientIndicationDelayed(HIDE_DELAY_MS); } else { Loading Loading @@ -1032,9 +1041,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal if (mHideTransientMessageOnScreenOff && mDozing) { hideTransientIndication(); } else { updateIndication(false); } updateIndication(false); } }; }
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import java.util.LinkedList; * A view to show hints on Keyguard ("Swipe up to unlock", "Tap again to open"). */ public class KeyguardIndicationTextView extends TextView { private static final long MSG_DURATION_MILLIS = 600; private static final long MSG_DURATION_MILLIS = 1500; private long mNextAnimationTime = 0; private boolean mAnimationsEnabled = true; private LinkedList<CharSequence> mMessages = new LinkedList<>(); Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewControllerTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.content.res.ColorStateList; import android.graphics.Color; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper.RunWithLooper; import android.view.View; import androidx.test.filters.SmallTest; Loading Loading @@ -258,8 +257,8 @@ public class KeyguardIndicationRotateTextViewControllerTest extends SysuiTestCas // WHEN the device is dozing mStatusBarStateListener.onDozingChanged(true); // THEN the view is GONE verify(mView).setVisibility(View.GONE); // THEN switch to INDICATION_TYPE_NONE verify(mView).switchIndication(null); } @Test Loading