Smartspace in wrong position
KeyguardClockSwitch will be recreated by NotificationPanelViewController for a variety of reasons, including onDensityOrFontScaleChanged(). When this happens, the large/small clock state can get out of sync with the initial state. Set the clock state to null on creation to avoid this. Fixes: 188390632 Test: manual, it's a race condition that can be hard to trigger Change-Id: I49cda9afd5c708b05aba56a40d29c1cefe847de4
This commit is contained in:
@@ -64,9 +64,10 @@ public class KeyguardClockSwitch extends RelativeLayout {
|
||||
private float mDarkAmount;
|
||||
|
||||
/**
|
||||
* Boolean value indicating if notifications are visible on lock screen.
|
||||
* Boolean value indicating if notifications are visible on lock screen. Use null to signify
|
||||
* it is uninitialized.
|
||||
*/
|
||||
private boolean mHasVisibleNotifications = true;
|
||||
private Boolean mHasVisibleNotifications = null;
|
||||
|
||||
private AnimatorSet mClockInAnim = null;
|
||||
private AnimatorSet mClockOutAnim = null;
|
||||
@@ -263,7 +264,8 @@ public class KeyguardClockSwitch extends RelativeLayout {
|
||||
* the smaller version.
|
||||
*/
|
||||
boolean willSwitchToLargeClock(boolean hasVisibleNotifications) {
|
||||
if (hasVisibleNotifications == mHasVisibleNotifications) {
|
||||
if (mHasVisibleNotifications != null
|
||||
&& hasVisibleNotifications == mHasVisibleNotifications) {
|
||||
return false;
|
||||
}
|
||||
boolean useLargeClock = !hasVisibleNotifications;
|
||||
|
||||
Reference in New Issue
Block a user