Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a38c45ad authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "KeyguardClockPositionAlgorithm Test updates" into sc-dev

parents 55b9b53e 507fe6f1
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -287,20 +287,6 @@ public class KeyguardClockSwitch extends RelativeLayout {
        return mClockView.getTextSize();
    }

    /**
     * Returns the preferred Y position of the clock.
     *
     * @param totalHeight Height of the parent container.
     * @return preferred Y position.
     */
    int getPreferredY(int totalHeight) {
        if (mClockPlugin != null) {
            return mClockPlugin.getPreferredY(totalHeight);
        } else {
            return totalHeight / 2;
        }
    }

    /**
     * Refresh the time of the clock, due to either time tick broadcast or doze time tick alarm.
     */
+0 −10
Original line number Diff line number Diff line
@@ -256,16 +256,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        return mView.getTextSize();
    }

    /**
     * Returns the preferred Y position of the clock.
     *
     * @param totalHeight The height available to position the clock.
     * @return Y position of clock.
     */
    public int getClockPreferredY(int totalHeight) {
        return mView.getPreferredY(totalHeight);
    }

    /**
     * Refresh clock. Called in response to TIME_TICK broadcasts.
     */
+0 −10
Original line number Diff line number Diff line
@@ -186,16 +186,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
        return mKeyguardClockSwitchController.getClockTextSize();
    }

    /**
     * Returns the preferred Y position of the clock.
     *
     * @param totalHeight The height available to position the clock.
     * @return Y position of clock.
     */
    public int getClockPreferredY(int totalHeight) {
        return mKeyguardClockSwitchController.getClockPreferredY(totalHeight);
    }

    /**
     * Get the height of the keyguard status view.
     */
+2 −8
Original line number Diff line number Diff line
@@ -62,11 +62,6 @@ public class KeyguardClockPositionAlgorithm {
     */
    private int mUserSwitchHeight;

    /**
     * Preferred Y position of clock.
     */
    private int mClockPreferredY;

    /**
     * Preferred Y position of user avatar used by the multi-user switcher.
     */
@@ -176,8 +171,8 @@ public class KeyguardClockPositionAlgorithm {
     */
    public void setup(int keyguardStatusBarHeaderHeight, int maxShadeBottom,
            int notificationStackHeight, float panelExpansion, int parentHeight,
            int keyguardStatusHeight, int userSwitchHeight, int clockPreferredY,
            int userSwitchPreferredY, boolean hasCustomClock, boolean hasVisibleNotifs, float dark,
            int keyguardStatusHeight, int userSwitchHeight, int userSwitchPreferredY,
            boolean hasCustomClock, boolean hasVisibleNotifs, float dark,
            float overStrechAmount, boolean bypassEnabled, int unlockedStackScrollerPadding,
            float qsExpansion, int cutoutTopInset, boolean isSplitShade) {
        mMinTopMargin = keyguardStatusBarHeaderHeight + Math.max(mContainerTopPadding,
@@ -188,7 +183,6 @@ public class KeyguardClockPositionAlgorithm {
        mHeight = parentHeight;
        mKeyguardStatusHeight = keyguardStatusHeight;
        mUserSwitchHeight = userSwitchHeight;
        mClockPreferredY = clockPreferredY;
        mUserSwitchPreferredY = userSwitchPreferredY;
        mHasCustomClock = hasCustomClock;
        mHasVisibleNotifs = hasVisibleNotifs;
+1 −2
Original line number Diff line number Diff line
@@ -1228,7 +1228,6 @@ public class NotificationPanelViewController extends PanelViewController {
    private void updateClockAppearance() {
        int totalHeight = mView.getHeight();
        int bottomPadding = Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding);
        int clockPreferredY = mKeyguardStatusViewController.getClockPreferredY(totalHeight);
        int userSwitcherPreferredY = mStatusBarHeaderHeightKeyguard;
        boolean bypassEnabled = mKeyguardBypassController.getBypassEnabled();
        final boolean hasVisibleNotifications = mNotificationStackScrollLayoutController
@@ -1249,7 +1248,7 @@ public class NotificationPanelViewController extends PanelViewController {
                totalHeight,
                mKeyguardStatusViewController.getHeight(),
                userIconHeight,
                clockPreferredY, userSwitcherPreferredY, hasCustomClock(),
                userSwitcherPreferredY, hasCustomClock(),
                hasVisibleNotifications, darkamount, mOverStretchAmount,
                bypassEnabled, getUnlockedStackScrollerPadding(),
                computeQsExpansionFraction(),
Loading