Loading packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java +10 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp private ColorStateList mDefaultColorState; private CharSequence mMessage; private ColorStateList mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR); private boolean mBouncerVisible; private boolean mBouncerShowing; private boolean mAltBouncerShowing; /** * Container that wraps the KeyguardMessageArea - may be null if current view hierarchy doesn't Loading Loading @@ -177,7 +177,7 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp void update() { CharSequence status = mMessage; setVisibility(TextUtils.isEmpty(status) || (!mBouncerVisible && !mAltBouncerShowing) setVisibility(TextUtils.isEmpty(status) || (!mBouncerShowing && !mAltBouncerShowing) ? INVISIBLE : VISIBLE); setText(status); ColorStateList colorState = mDefaultColorState; Loading @@ -192,8 +192,14 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp setTextColor(colorState); } public void setBouncerVisible(boolean bouncerVisible) { mBouncerVisible = bouncerVisible; /** * Set whether the bouncer is fully showing */ public void setBouncerShowing(boolean bouncerShowing) { if (mBouncerShowing != bouncerShowing) { mBouncerShowing = bouncerShowing; update(); } } /** Loading packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java +7 −6 Original line number Diff line number Diff line Loading @@ -39,12 +39,6 @@ public class KeyguardMessageAreaController extends ViewController<KeyguardMessag public void onStartedWakingUp() { mView.setSelected(true); } @Override public void onKeyguardBouncerChanged(boolean bouncer) { mView.setBouncerVisible(bouncer); mView.update(); } }; private ConfigurationListener mConfigurationListener = new ConfigurationListener() { Loading Loading @@ -94,6 +88,13 @@ public class KeyguardMessageAreaController extends ViewController<KeyguardMessag mView.setAltBouncerShowing(showing); } /** * Set bouncer is fully showing */ public void setBouncerShowing(boolean showing) { mView.setBouncerShowing(showing); } public void setMessage(CharSequence s) { mView.setMessage(s); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) { mNotificationShadeWindowController.setBouncerShowing(bouncerShowing); mCentralSurfaces.setBouncerShowing(bouncerShowing); mKeyguardMessageAreaController.setBouncerShowing(bouncerShowing); } if (occluded != mLastOccluded || mFirstUpdate) { Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaControllerTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -84,4 +84,10 @@ public class KeyguardMessageAreaControllerTest extends SysuiTestCase { mMessageAreaController.setMessage(""); verify(mKeyguardMessageArea).setMessage(""); } @Test public void testSetBouncerVisible() { mMessageAreaController.setBouncerShowing(true); verify(mKeyguardMessageArea).setBouncerShowing(true); } } packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public class KeyguardMessageAreaTest extends SysuiTestCase { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); mKeyguardMessageArea = new KeyguardMessageArea(mContext, null); mKeyguardMessageArea.setBouncerVisible(true); mKeyguardMessageArea.setBouncerShowing(true); } @Test Loading @@ -53,7 +53,7 @@ public class KeyguardMessageAreaTest extends SysuiTestCase { @Test public void testHiddenWhenBouncerHidden() { mKeyguardMessageArea.setBouncerVisible(false); mKeyguardMessageArea.setBouncerShowing(false); mKeyguardMessageArea.setVisibility(View.INVISIBLE); mKeyguardMessageArea.setMessage("oobleck"); assertThat(mKeyguardMessageArea.getVisibility()).isEqualTo(View.INVISIBLE); Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardMessageArea.java +10 −4 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp private ColorStateList mDefaultColorState; private CharSequence mMessage; private ColorStateList mNextMessageColorState = ColorStateList.valueOf(DEFAULT_COLOR); private boolean mBouncerVisible; private boolean mBouncerShowing; private boolean mAltBouncerShowing; /** * Container that wraps the KeyguardMessageArea - may be null if current view hierarchy doesn't Loading Loading @@ -177,7 +177,7 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp void update() { CharSequence status = mMessage; setVisibility(TextUtils.isEmpty(status) || (!mBouncerVisible && !mAltBouncerShowing) setVisibility(TextUtils.isEmpty(status) || (!mBouncerShowing && !mAltBouncerShowing) ? INVISIBLE : VISIBLE); setText(status); ColorStateList colorState = mDefaultColorState; Loading @@ -192,8 +192,14 @@ public class KeyguardMessageArea extends TextView implements SecurityMessageDisp setTextColor(colorState); } public void setBouncerVisible(boolean bouncerVisible) { mBouncerVisible = bouncerVisible; /** * Set whether the bouncer is fully showing */ public void setBouncerShowing(boolean bouncerShowing) { if (mBouncerShowing != bouncerShowing) { mBouncerShowing = bouncerShowing; update(); } } /** Loading
packages/SystemUI/src/com/android/keyguard/KeyguardMessageAreaController.java +7 −6 Original line number Diff line number Diff line Loading @@ -39,12 +39,6 @@ public class KeyguardMessageAreaController extends ViewController<KeyguardMessag public void onStartedWakingUp() { mView.setSelected(true); } @Override public void onKeyguardBouncerChanged(boolean bouncer) { mView.setBouncerVisible(bouncer); mView.update(); } }; private ConfigurationListener mConfigurationListener = new ConfigurationListener() { Loading Loading @@ -94,6 +88,13 @@ public class KeyguardMessageAreaController extends ViewController<KeyguardMessag mView.setAltBouncerShowing(showing); } /** * Set bouncer is fully showing */ public void setBouncerShowing(boolean showing) { mView.setBouncerShowing(showing); } public void setMessage(CharSequence s) { mView.setMessage(s); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -1016,6 +1016,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) { mNotificationShadeWindowController.setBouncerShowing(bouncerShowing); mCentralSurfaces.setBouncerShowing(bouncerShowing); mKeyguardMessageAreaController.setBouncerShowing(bouncerShowing); } if (occluded != mLastOccluded || mFirstUpdate) { Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaControllerTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -84,4 +84,10 @@ public class KeyguardMessageAreaControllerTest extends SysuiTestCase { mMessageAreaController.setMessage(""); verify(mKeyguardMessageArea).setMessage(""); } @Test public void testSetBouncerVisible() { mMessageAreaController.setBouncerShowing(true); verify(mKeyguardMessageArea).setBouncerShowing(true); } }
packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public class KeyguardMessageAreaTest extends SysuiTestCase { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); mKeyguardMessageArea = new KeyguardMessageArea(mContext, null); mKeyguardMessageArea.setBouncerVisible(true); mKeyguardMessageArea.setBouncerShowing(true); } @Test Loading @@ -53,7 +53,7 @@ public class KeyguardMessageAreaTest extends SysuiTestCase { @Test public void testHiddenWhenBouncerHidden() { mKeyguardMessageArea.setBouncerVisible(false); mKeyguardMessageArea.setBouncerShowing(false); mKeyguardMessageArea.setVisibility(View.INVISIBLE); mKeyguardMessageArea.setMessage("oobleck"); assertThat(mKeyguardMessageArea.getVisibility()).isEqualTo(View.INVISIBLE); Loading