Loading packages/SystemUI/res/values-sw600dp/dimens.xml +0 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,6 @@ <!-- On tablets this is just the close_handle_height --> <dimen name="peek_height">@dimen/close_handle_height</dimen> <!-- The margin between the clock and the notifications on Keyguard. See keyguard_clock_height_fraction_* for the difference between min and max.--> <dimen name="keyguard_clock_notifications_margin">44dp</dimen> <!-- Height of the status bar header bar when on Keyguard --> <dimen name="status_bar_header_height_keyguard">60dp</dimen> Loading packages/SystemUI/res/values/dimens.xml +2 −2 Original line number Diff line number Diff line Loading @@ -735,8 +735,8 @@ <!-- Minimum distance the user has to drag down to go to the full shade. --> <dimen name="keyguard_drag_down_min_distance">100dp</dimen> <!-- The margin between the clock and the notifications on Keyguard.--> <dimen name="keyguard_clock_notifications_margin">30dp</dimen> <!-- The margin between the status view and the notifications on Keyguard.--> <dimen name="keyguard_status_view_bottom_margin">20dp</dimen> <!-- Minimum margin between clock and status bar --> <dimen name="keyguard_clock_top_margin">36dp</dimen> <!-- The margin between top of clock and bottom of lock icon. --> Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +4 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } } int getNotificationIconAreaHeight() { return mNotificationIconAreaController.getHeight(); } @Override protected void onViewDetached() { if (CUSTOM_CLOCKS_ENABLED) { Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -187,10 +187,11 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV } /** * Get the height of the keyguard status view. * Get the height of the keyguard status view without the notification icon area, as that's * only visible on AOD. */ public int getHeight() { return mView.getHeight(); public int getLockscreenHeight() { return mView.getHeight() - mKeyguardClockSwitchController.getNotificationIconAreaHeight(); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +8 −33 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ public class KeyguardClockPositionAlgorithm { private static float CLOCK_HEIGHT_WEIGHT = 0.7f; /** * Margin between the bottom of the clock and the notification shade. * Margin between the bottom of the status view and the notification shade. */ private int mClockNotificationsMargin; private int mStatusViewBottomMargin; /** * Height of the parent view - display size in px. Loading Loading @@ -153,8 +153,8 @@ public class KeyguardClockPositionAlgorithm { * Refreshes the dimension values. */ public void loadDimens(Resources res) { mClockNotificationsMargin = res.getDimensionPixelSize( R.dimen.keyguard_clock_notifications_margin); mStatusViewBottomMargin = res.getDimensionPixelSize( R.dimen.keyguard_status_view_bottom_margin); mContainerTopPadding = res.getDimensionPixelSize(R.dimen.keyguard_clock_top_margin) / 2; Loading @@ -181,7 +181,7 @@ public class KeyguardClockPositionAlgorithm { mNotificationStackHeight = notificationStackHeight; mPanelExpansion = panelExpansion; mHeight = parentHeight; mKeyguardStatusHeight = keyguardStatusHeight; mKeyguardStatusHeight = keyguardStatusHeight + mStatusViewBottomMargin; mUserSwitchHeight = userSwitchHeight; mUserSwitchPreferredY = userSwitchPreferredY; mHasCustomClock = hasCustomClock; Loading Loading @@ -221,40 +221,15 @@ public class KeyguardClockPositionAlgorithm { public float getMinStackScrollerPadding() { return mBypassEnabled ? mUnlockedStackScrollerPadding : mMinTopMargin + mKeyguardStatusHeight + mClockNotificationsMargin; } private int getMaxClockY() { return mHeight / 2 - mKeyguardStatusHeight - mClockNotificationsMargin; : mMinTopMargin + mKeyguardStatusHeight; } private int getExpandedPreferredClockY() { return mMinTopMargin + mUserSwitchHeight; } /** * Vertically align the clock and the shade in the available space considering only * a percentage of the clock height defined by {@code CLOCK_HEIGHT_WEIGHT}. * @return Clock Y in pixels. */ public int getExpandedClockPosition() { final int availableHeight = mMaxShadeBottom - mMinTopMargin; final int containerCenter = mMinTopMargin + availableHeight / 2; float y = containerCenter - (mKeyguardStatusHeight + mUserSwitchHeight) * CLOCK_HEIGHT_WEIGHT - mClockNotificationsMargin - mNotificationStackHeight / 2; if (y < mMinTopMargin) { y = mMinTopMargin; } // Don't allow the clock base to be under half of the screen final float maxClockY = getMaxClockY(); if (y > maxClockY) { y = maxClockY; } return (int) y; public int getLockscreenStatusViewHeight() { return mKeyguardStatusHeight; } private int getClockY(float panelExpansion, float darkAmount) { Loading Loading
packages/SystemUI/res/values-sw600dp/dimens.xml +0 −4 Original line number Diff line number Diff line Loading @@ -36,10 +36,6 @@ <!-- On tablets this is just the close_handle_height --> <dimen name="peek_height">@dimen/close_handle_height</dimen> <!-- The margin between the clock and the notifications on Keyguard. See keyguard_clock_height_fraction_* for the difference between min and max.--> <dimen name="keyguard_clock_notifications_margin">44dp</dimen> <!-- Height of the status bar header bar when on Keyguard --> <dimen name="status_bar_header_height_keyguard">60dp</dimen> Loading
packages/SystemUI/res/values/dimens.xml +2 −2 Original line number Diff line number Diff line Loading @@ -735,8 +735,8 @@ <!-- Minimum distance the user has to drag down to go to the full shade. --> <dimen name="keyguard_drag_down_min_distance">100dp</dimen> <!-- The margin between the clock and the notifications on Keyguard.--> <dimen name="keyguard_clock_notifications_margin">30dp</dimen> <!-- The margin between the status view and the notifications on Keyguard.--> <dimen name="keyguard_status_view_bottom_margin">20dp</dimen> <!-- Minimum margin between clock and status bar --> <dimen name="keyguard_clock_top_margin">36dp</dimen> <!-- The margin between top of clock and bottom of lock icon. --> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +4 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS } } int getNotificationIconAreaHeight() { return mNotificationIconAreaController.getHeight(); } @Override protected void onViewDetached() { if (CUSTOM_CLOCKS_ENABLED) { Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +4 −3 Original line number Diff line number Diff line Loading @@ -187,10 +187,11 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV } /** * Get the height of the keyguard status view. * Get the height of the keyguard status view without the notification icon area, as that's * only visible on AOD. */ public int getHeight() { return mView.getHeight(); public int getLockscreenHeight() { return mView.getHeight() - mKeyguardClockSwitchController.getNotificationIconAreaHeight(); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +8 −33 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ public class KeyguardClockPositionAlgorithm { private static float CLOCK_HEIGHT_WEIGHT = 0.7f; /** * Margin between the bottom of the clock and the notification shade. * Margin between the bottom of the status view and the notification shade. */ private int mClockNotificationsMargin; private int mStatusViewBottomMargin; /** * Height of the parent view - display size in px. Loading Loading @@ -153,8 +153,8 @@ public class KeyguardClockPositionAlgorithm { * Refreshes the dimension values. */ public void loadDimens(Resources res) { mClockNotificationsMargin = res.getDimensionPixelSize( R.dimen.keyguard_clock_notifications_margin); mStatusViewBottomMargin = res.getDimensionPixelSize( R.dimen.keyguard_status_view_bottom_margin); mContainerTopPadding = res.getDimensionPixelSize(R.dimen.keyguard_clock_top_margin) / 2; Loading @@ -181,7 +181,7 @@ public class KeyguardClockPositionAlgorithm { mNotificationStackHeight = notificationStackHeight; mPanelExpansion = panelExpansion; mHeight = parentHeight; mKeyguardStatusHeight = keyguardStatusHeight; mKeyguardStatusHeight = keyguardStatusHeight + mStatusViewBottomMargin; mUserSwitchHeight = userSwitchHeight; mUserSwitchPreferredY = userSwitchPreferredY; mHasCustomClock = hasCustomClock; Loading Loading @@ -221,40 +221,15 @@ public class KeyguardClockPositionAlgorithm { public float getMinStackScrollerPadding() { return mBypassEnabled ? mUnlockedStackScrollerPadding : mMinTopMargin + mKeyguardStatusHeight + mClockNotificationsMargin; } private int getMaxClockY() { return mHeight / 2 - mKeyguardStatusHeight - mClockNotificationsMargin; : mMinTopMargin + mKeyguardStatusHeight; } private int getExpandedPreferredClockY() { return mMinTopMargin + mUserSwitchHeight; } /** * Vertically align the clock and the shade in the available space considering only * a percentage of the clock height defined by {@code CLOCK_HEIGHT_WEIGHT}. * @return Clock Y in pixels. */ public int getExpandedClockPosition() { final int availableHeight = mMaxShadeBottom - mMinTopMargin; final int containerCenter = mMinTopMargin + availableHeight / 2; float y = containerCenter - (mKeyguardStatusHeight + mUserSwitchHeight) * CLOCK_HEIGHT_WEIGHT - mClockNotificationsMargin - mNotificationStackHeight / 2; if (y < mMinTopMargin) { y = mMinTopMargin; } // Don't allow the clock base to be under half of the screen final float maxClockY = getMaxClockY(); if (y > maxClockY) { y = maxClockY; } return (int) y; public int getLockscreenStatusViewHeight() { return mKeyguardStatusHeight; } private int getClockY(float panelExpansion, float darkAmount) { Loading