Loading packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,11 @@ public class KeyguardStatusView extends GridLayout { } } public int getClockBottom() { return mClockView.getBottom() + ((MarginLayoutParams) mClockView.getLayoutParams()).bottomMargin; } public static String formatNextAlarm(Context context, AlarmManager.AlarmClockInfo info) { if (info == null) { return ""; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +5 −5 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class DozeScrimController { private final Context mContext; private final View mStackScroller; private final KeyguardStatusView mKeyguardStatusView; private final NotificationPanelView mNotificationPanelView; private boolean mDozing; private DozeHost.PulseCallback mPulseCallback; Loading @@ -55,12 +55,12 @@ public class DozeScrimController { private float mBehindTarget; public DozeScrimController(ScrimController scrimController, Context context, View stackScroller, KeyguardStatusView keyguardStatusView) { View stackScroller, NotificationPanelView notificationPanelView) { mContext = context; mStackScroller = stackScroller; mScrimController = scrimController; mDozeParameters = new DozeParameters(context); mKeyguardStatusView = keyguardStatusView; mNotificationPanelView = notificationPanelView; } public void setDozing(boolean dozing, boolean animate) { Loading @@ -70,7 +70,7 @@ public class DozeScrimController { abortAnimations(); mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(mDozeParameters.getAlwaysOn() ? 0f : 1f); mKeyguardStatusView.setDark(true); mNotificationPanelView.setDark(true); } else { cancelPulsing(); if (animate) { Loading @@ -86,7 +86,7 @@ public class DozeScrimController { mScrimController.setDozeInFrontAlpha(0f); } // TODO: animate mKeyguardStatusView.setDark(false); mNotificationPanelView.setDark(false); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +9 −1 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ public class KeyguardClockPositionAlgorithm { } private AccelerateInterpolator mAccelerateInterpolator = new AccelerateInterpolator(); private int mClockBottom; private boolean mDark; /** * Refreshes the dimension values. Loading @@ -86,7 +88,8 @@ public class KeyguardClockPositionAlgorithm { } public void setup(int maxKeyguardNotifications, int maxPanelHeight, float expandedHeight, int notificationCount, int height, int keyguardStatusHeight, float emptyDragAmount) { int notificationCount, int height, int keyguardStatusHeight, float emptyDragAmount, int clockBottom, boolean dark) { mMaxKeyguardNotifications = maxKeyguardNotifications; mMaxPanelHeight = maxPanelHeight; mExpandedHeight = expandedHeight; Loading @@ -94,6 +97,8 @@ public class KeyguardClockPositionAlgorithm { mHeight = height; mKeyguardStatusHeight = keyguardStatusHeight; mEmptyDragAmount = emptyDragAmount; mClockBottom = clockBottom; mDark = dark; } public float getMinStackScrollerPadding(int height, int keyguardStatusHeight) { Loading @@ -115,6 +120,9 @@ public class KeyguardClockPositionAlgorithm { result.clockY, y + getClockNotificationsPadding() + mKeyguardStatusHeight); result.clockAlpha = getClockAlpha(result.clockScale); if (mDark) { result.stackScrollerPadding = mClockBottom + y; } } private float getClockScale(int notificationPadding, int clockY, int startPadding) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +10 −1 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ public class NotificationPanelView extends PanelView implements private boolean mOpening; private int mIndicationBottomPadding; private boolean mIsFullWidth; private boolean mDark; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -391,7 +392,9 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.getNotGoneChildCount(), getHeight(), mKeyguardStatusView.getHeight(), mEmptyDragAmount); mEmptyDragAmount, mKeyguardStatusView.getClockBottom(), mDark); mClockPositionAlgorithm.run(mClockPositionResult); if (animate || mClockAnimator != null) { startClockAnimation(mClockPositionResult.clockY); Loading Loading @@ -2453,4 +2456,10 @@ public class NotificationPanelView extends PanelView implements } } }; public void setDark(boolean dark) { mDark = dark; mKeyguardStatusView.setDark(dark); positionClockAndNotifications(); } } packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -898,7 +898,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mStackScroller.setScrimController(mScrimController); mStatusBarView.setScrimController(mScrimController); mDozeScrimController = new DozeScrimController(mScrimController, context, mStackScroller, mKeyguardStatusView); mNotificationPanel); // Other icons mLocationController = new LocationControllerImpl(mContext, Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java +5 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,11 @@ public class KeyguardStatusView extends GridLayout { } } public int getClockBottom() { return mClockView.getBottom() + ((MarginLayoutParams) mClockView.getLayoutParams()).bottomMargin; } public static String formatNextAlarm(Context context, AlarmManager.AlarmClockInfo info) { if (info == null) { return ""; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +5 −5 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class DozeScrimController { private final Context mContext; private final View mStackScroller; private final KeyguardStatusView mKeyguardStatusView; private final NotificationPanelView mNotificationPanelView; private boolean mDozing; private DozeHost.PulseCallback mPulseCallback; Loading @@ -55,12 +55,12 @@ public class DozeScrimController { private float mBehindTarget; public DozeScrimController(ScrimController scrimController, Context context, View stackScroller, KeyguardStatusView keyguardStatusView) { View stackScroller, NotificationPanelView notificationPanelView) { mContext = context; mStackScroller = stackScroller; mScrimController = scrimController; mDozeParameters = new DozeParameters(context); mKeyguardStatusView = keyguardStatusView; mNotificationPanelView = notificationPanelView; } public void setDozing(boolean dozing, boolean animate) { Loading @@ -70,7 +70,7 @@ public class DozeScrimController { abortAnimations(); mScrimController.setDozeBehindAlpha(1f); mScrimController.setDozeInFrontAlpha(mDozeParameters.getAlwaysOn() ? 0f : 1f); mKeyguardStatusView.setDark(true); mNotificationPanelView.setDark(true); } else { cancelPulsing(); if (animate) { Loading @@ -86,7 +86,7 @@ public class DozeScrimController { mScrimController.setDozeInFrontAlpha(0f); } // TODO: animate mKeyguardStatusView.setDark(false); mNotificationPanelView.setDark(false); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +9 −1 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ public class KeyguardClockPositionAlgorithm { } private AccelerateInterpolator mAccelerateInterpolator = new AccelerateInterpolator(); private int mClockBottom; private boolean mDark; /** * Refreshes the dimension values. Loading @@ -86,7 +88,8 @@ public class KeyguardClockPositionAlgorithm { } public void setup(int maxKeyguardNotifications, int maxPanelHeight, float expandedHeight, int notificationCount, int height, int keyguardStatusHeight, float emptyDragAmount) { int notificationCount, int height, int keyguardStatusHeight, float emptyDragAmount, int clockBottom, boolean dark) { mMaxKeyguardNotifications = maxKeyguardNotifications; mMaxPanelHeight = maxPanelHeight; mExpandedHeight = expandedHeight; Loading @@ -94,6 +97,8 @@ public class KeyguardClockPositionAlgorithm { mHeight = height; mKeyguardStatusHeight = keyguardStatusHeight; mEmptyDragAmount = emptyDragAmount; mClockBottom = clockBottom; mDark = dark; } public float getMinStackScrollerPadding(int height, int keyguardStatusHeight) { Loading @@ -115,6 +120,9 @@ public class KeyguardClockPositionAlgorithm { result.clockY, y + getClockNotificationsPadding() + mKeyguardStatusHeight); result.clockAlpha = getClockAlpha(result.clockScale); if (mDark) { result.stackScrollerPadding = mClockBottom + y; } } private float getClockScale(int notificationPadding, int clockY, int startPadding) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +10 −1 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ public class NotificationPanelView extends PanelView implements private boolean mOpening; private int mIndicationBottomPadding; private boolean mIsFullWidth; private boolean mDark; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -391,7 +392,9 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller.getNotGoneChildCount(), getHeight(), mKeyguardStatusView.getHeight(), mEmptyDragAmount); mEmptyDragAmount, mKeyguardStatusView.getClockBottom(), mDark); mClockPositionAlgorithm.run(mClockPositionResult); if (animate || mClockAnimator != null) { startClockAnimation(mClockPositionResult.clockY); Loading Loading @@ -2453,4 +2456,10 @@ public class NotificationPanelView extends PanelView implements } } }; public void setDark(boolean dark) { mDark = dark; mKeyguardStatusView.setDark(dark); positionClockAndNotifications(); } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -898,7 +898,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mStackScroller.setScrimController(mScrimController); mStatusBarView.setScrimController(mScrimController); mDozeScrimController = new DozeScrimController(mScrimController, context, mStackScroller, mKeyguardStatusView); mNotificationPanel); // Other icons mLocationController = new LocationControllerImpl(mContext, Loading