Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } public boolean isScreenOn() { return mScreenOn; } static class DisplayClientState { public int clientGeneration; public boolean clearing; Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +22 −2 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public class KeyguardIndicationController { private KeyguardUpdateMonitorCallback mUpdateMonitor; private final DevicePolicyManager mDevicePolicyManager; private boolean mDozing; public KeyguardIndicationController(Context context, ViewGroup indicationArea, LockIcon lockIcon) { Loading Loading @@ -139,7 +140,7 @@ public class KeyguardIndicationController { return; } if (mDevicePolicyManager.isDeviceManaged()) { if (!mDozing && mDevicePolicyManager.isDeviceManaged()) { final CharSequence organizationName = mDevicePolicyManager.getDeviceOwnerOrganizationName(); if (organizationName != null) { Loading Loading @@ -224,6 +225,18 @@ public class KeyguardIndicationController { if (mVisible) { // Walk down a precedence-ordered list of what should indication // should be shown based on user or device state if (mDozing) { // If we're dozing, never show a persistent indication. if (!TextUtils.isEmpty(mTransientIndication)) { mTextView.switchIndication(mTransientIndication); mTextView.setTextColor(mTransientTextColor); } else { mTextView.switchIndication(null); } return; } if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) { mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked); mTextView.setTextColor(Color.WHITE); Loading Loading @@ -319,6 +332,12 @@ public class KeyguardIndicationController { } }; public void setDozing(boolean dozing) { mDozing = dozing; updateIndication(); updateDisclosure(); } protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback { private int mLastSuccessiveErrorMessage = -1; Loading Loading @@ -349,7 +368,8 @@ public class KeyguardIndicationController { int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null); if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.showBouncerMessage(helpString, errorColor); } else if (updateMonitor.isDeviceInteractive()) { } else if (updateMonitor.isDeviceInteractive() || mDozing && updateMonitor.isScreenOn()) { mLockIcon.setTransientFpError(true); showTransientIndication(helpString, errorColor); mHandler.removeMessages(MSG_CLEAR_FP_MSG); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +19 −2 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private IntentButton mLeftPlugin; private String mLeftButtonStr; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private boolean mDozing; public KeyguardBottomAreaView(Context context) { this(context, null); Loading Loading @@ -361,7 +362,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL // Things are not set up yet; reply hazy, ask again later return; } mRightAffordanceView.setVisibility(mRightButton.getIcon().isVisible mRightAffordanceView.setVisibility(!mDozing && mRightButton.getIcon().isVisible ? View.VISIBLE : View.GONE); } Loading @@ -375,7 +376,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private void updateLeftAffordanceIcon() { IconState state = mLeftButton.getIcon(); mLeftAffordanceView.setVisibility(state.isVisible ? View.VISIBLE : View.GONE); mLeftAffordanceView.setVisibility(!mDozing && state.isVisible ? View.VISIBLE : View.GONE); mLeftAffordanceView.setImageDrawable(state.drawable, state.tint); mLeftAffordanceView.setContentDescription(state.contentDescription); } Loading Loading @@ -846,6 +847,22 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } }; public void setDozing(boolean dozing, boolean animate) { mDozing = dozing; updateCameraVisibility(); updateLeftAffordanceIcon(); if (dozing) { mLockIcon.setVisibility(INVISIBLE); } else { mLockIcon.setVisibility(VISIBLE); if (animate) { startFinishDozeAnimation(); } } } private class DefaultLeftButton implements IntentButton { private IconState mIconState = new IconState(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +3 −6 Original line number Diff line number Diff line Loading @@ -1151,9 +1151,7 @@ public class NotificationPanelView extends PanelView implements .start(); } else if (statusBarState == StatusBarState.KEYGUARD || statusBarState == StatusBarState.SHADE_LOCKED) { if (!mDozing) { mKeyguardBottomArea.setVisibility(View.VISIBLE); } mKeyguardBottomArea.setAlpha(1f); } else { mKeyguardBottomArea.setVisibility(View.GONE); Loading Loading @@ -2103,13 +2101,12 @@ public class NotificationPanelView extends PanelView implements private void updateDozingVisibilities(boolean animate) { if (mDozing) { mKeyguardStatusBar.setVisibility(View.INVISIBLE); mKeyguardBottomArea.setVisibility(View.INVISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); } else { mKeyguardBottomArea.setVisibility(View.VISIBLE); mKeyguardStatusBar.setVisibility(View.VISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); if (animate) { animateKeyguardStatusBarIn(DOZE_ANIMATION_DURATION); mKeyguardBottomArea.startFinishDozeAnimation(); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -4322,6 +4322,7 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanel.setDozing(mDozing, animate); mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation); mScrimController.setDozing(mDozing); mKeyguardIndicationController.setDozing(mDozing); // Immediately abort the dozing from the doze scrim controller in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +4 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } public boolean isScreenOn() { return mScreenOn; } static class DisplayClientState { public int clientGeneration; public boolean clearing; Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +22 −2 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public class KeyguardIndicationController { private KeyguardUpdateMonitorCallback mUpdateMonitor; private final DevicePolicyManager mDevicePolicyManager; private boolean mDozing; public KeyguardIndicationController(Context context, ViewGroup indicationArea, LockIcon lockIcon) { Loading Loading @@ -139,7 +140,7 @@ public class KeyguardIndicationController { return; } if (mDevicePolicyManager.isDeviceManaged()) { if (!mDozing && mDevicePolicyManager.isDeviceManaged()) { final CharSequence organizationName = mDevicePolicyManager.getDeviceOwnerOrganizationName(); if (organizationName != null) { Loading Loading @@ -224,6 +225,18 @@ public class KeyguardIndicationController { if (mVisible) { // Walk down a precedence-ordered list of what should indication // should be shown based on user or device state if (mDozing) { // If we're dozing, never show a persistent indication. if (!TextUtils.isEmpty(mTransientIndication)) { mTextView.switchIndication(mTransientIndication); mTextView.setTextColor(mTransientTextColor); } else { mTextView.switchIndication(null); } return; } if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) { mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked); mTextView.setTextColor(Color.WHITE); Loading Loading @@ -319,6 +332,12 @@ public class KeyguardIndicationController { } }; public void setDozing(boolean dozing) { mDozing = dozing; updateIndication(); updateDisclosure(); } protected class BaseKeyguardCallback extends KeyguardUpdateMonitorCallback { private int mLastSuccessiveErrorMessage = -1; Loading Loading @@ -349,7 +368,8 @@ public class KeyguardIndicationController { int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null); if (mStatusBarKeyguardViewManager.isBouncerShowing()) { mStatusBarKeyguardViewManager.showBouncerMessage(helpString, errorColor); } else if (updateMonitor.isDeviceInteractive()) { } else if (updateMonitor.isDeviceInteractive() || mDozing && updateMonitor.isScreenOn()) { mLockIcon.setTransientFpError(true); showTransientIndication(helpString, errorColor); mHandler.removeMessages(MSG_CLEAR_FP_MSG); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +19 −2 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private IntentButton mLeftPlugin; private String mLeftButtonStr; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private boolean mDozing; public KeyguardBottomAreaView(Context context) { this(context, null); Loading Loading @@ -361,7 +362,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL // Things are not set up yet; reply hazy, ask again later return; } mRightAffordanceView.setVisibility(mRightButton.getIcon().isVisible mRightAffordanceView.setVisibility(!mDozing && mRightButton.getIcon().isVisible ? View.VISIBLE : View.GONE); } Loading @@ -375,7 +376,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL private void updateLeftAffordanceIcon() { IconState state = mLeftButton.getIcon(); mLeftAffordanceView.setVisibility(state.isVisible ? View.VISIBLE : View.GONE); mLeftAffordanceView.setVisibility(!mDozing && state.isVisible ? View.VISIBLE : View.GONE); mLeftAffordanceView.setImageDrawable(state.drawable, state.tint); mLeftAffordanceView.setContentDescription(state.contentDescription); } Loading Loading @@ -846,6 +847,22 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } }; public void setDozing(boolean dozing, boolean animate) { mDozing = dozing; updateCameraVisibility(); updateLeftAffordanceIcon(); if (dozing) { mLockIcon.setVisibility(INVISIBLE); } else { mLockIcon.setVisibility(VISIBLE); if (animate) { startFinishDozeAnimation(); } } } private class DefaultLeftButton implements IntentButton { private IconState mIconState = new IconState(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +3 −6 Original line number Diff line number Diff line Loading @@ -1151,9 +1151,7 @@ public class NotificationPanelView extends PanelView implements .start(); } else if (statusBarState == StatusBarState.KEYGUARD || statusBarState == StatusBarState.SHADE_LOCKED) { if (!mDozing) { mKeyguardBottomArea.setVisibility(View.VISIBLE); } mKeyguardBottomArea.setAlpha(1f); } else { mKeyguardBottomArea.setVisibility(View.GONE); Loading Loading @@ -2103,13 +2101,12 @@ public class NotificationPanelView extends PanelView implements private void updateDozingVisibilities(boolean animate) { if (mDozing) { mKeyguardStatusBar.setVisibility(View.INVISIBLE); mKeyguardBottomArea.setVisibility(View.INVISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); } else { mKeyguardBottomArea.setVisibility(View.VISIBLE); mKeyguardStatusBar.setVisibility(View.VISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); if (animate) { animateKeyguardStatusBarIn(DOZE_ANIMATION_DURATION); mKeyguardBottomArea.startFinishDozeAnimation(); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -4322,6 +4322,7 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanel.setDozing(mDozing, animate); mStackScroller.setDark(mDozing, animate, mWakeUpTouchLocation); mScrimController.setDozing(mDozing); mKeyguardIndicationController.setDozing(mDozing); // Immediately abort the dozing from the doze scrim controller in case of wake-and-unlock // for pulsing so the Keyguard fade-out animation scrim can take over. Loading