Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +2 −16 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ import android.widget.RelativeLayout; import androidx.annotation.IntDef; import androidx.annotation.VisibleForTesting; import com.android.keyguard.clock.DefaultClockController; import com.android.keyguard.dagger.KeyguardStatusViewScope; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; Loading Loading @@ -47,9 +46,6 @@ public class KeyguardClockSwitch extends RelativeLayout { public static final int LARGE = 0; public static final int SMALL = 1; // compensate for translation of parents subject to device screen // In this case, the translation comes from KeyguardStatusView public int screenOffsetYPadding = 0; /** Returns a region for the large clock to position itself, based on the given parent. */ public static Rect getLargeClockRegion(ViewGroup parent) { Loading Loading @@ -165,18 +161,8 @@ public class KeyguardClockSwitch extends RelativeLayout { } if (mLargeClockFrame.isLaidOut()) { Rect targetRegion = getLargeClockRegion(mLargeClockFrame); if (mClock instanceof DefaultClockController) { mClock.getLargeClock().getEvents().onTargetRegionChanged( targetRegion); } else { mClock.getLargeClock().getEvents().onTargetRegionChanged( new Rect( targetRegion.left, targetRegion.top - screenOffsetYPadding, targetRegion.right, targetRegion.bottom - screenOffsetYPadding)); } getLargeClockRegion(mLargeClockFrame)); } } } Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +7 −8 Original line number Diff line number Diff line Loading @@ -168,14 +168,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mOnlyClock = onlyClock; } /** * Used for status view to pass the screen offset from parent view */ public void setLockscreenClockY(int clockY) { mView.screenOffsetYPadding = clockY; mView.updateClockTargetRegions(); } /** * Attach the controller to the view it relates to. */ Loading Loading @@ -402,6 +394,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS PropertyAnimator.setProperty(mStatusArea, AnimatableProperty.TRANSLATION_X, x, props, animate); } } void updateKeyguardStatusViewOffset() { // updateClockTargetRegions will call onTargetRegionChanged // which will require the correct translationY property of keyguardStatusView after updating mView.updateClockTargetRegions(); } /** Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +5 −9 Original line number Diff line number Diff line Loading @@ -214,15 +214,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV return mKeyguardClockSwitchController.isClockTopAligned(); } /** * Pass top margin from ClockPositionAlgorithm in NotificationPanelViewController * Use for clock view in LS to compensate for top margin to align to the screen * Regardless of translation from AOD and unlock gestures */ public void setLockscreenClockY(int clockY) { mKeyguardClockSwitchController.setLockscreenClockY(clockY); } /** * Set whether the view accessibility importance mode. */ Loading @@ -239,6 +230,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV * Update position of the view with an optional animation */ public void updatePosition(int x, int y, float scale, boolean animate) { float oldY = mView.getY(); setProperty(AnimatableProperty.Y, y, animate); ClockController clock = mKeyguardClockSwitchController.getClock(); Loading @@ -254,6 +246,10 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV setProperty(AnimatableProperty.SCALE_X, 1f, animate); setProperty(AnimatableProperty.SCALE_Y, 1f, animate); } if (oldY != y) { mKeyguardClockSwitchController.updateKeyguardStatusViewOffset(); } } /** Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +0 −2 Original line number Diff line number Diff line Loading @@ -1513,8 +1513,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mKeyguardStatusViewController.getClockBottom(mStatusBarHeaderHeightKeyguard), mKeyguardStatusViewController.isClockTopAligned()); mClockPositionAlgorithm.run(mClockPositionResult); mKeyguardStatusViewController.setLockscreenClockY( mClockPositionAlgorithm.getExpandedPreferredClockY()); mKeyguardBottomAreaInteractor.setClockPosition( mClockPositionResult.clockX, mClockPositionResult.clockY); boolean animate = mNotificationStackScrollLayoutController.isAddOrRemoveAnimationPending(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +1 −5 Original line number Diff line number Diff line Loading @@ -239,11 +239,7 @@ public class KeyguardClockPositionAlgorithm { } } /** * give the static topMargin, used for lockscreen clocks to get the initial translationY * to do counter translation */ public int getExpandedPreferredClockY() { private int getExpandedPreferredClockY() { if (mIsSplitShade) { return mSplitShadeTargetTopMargin; } else { Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +2 −16 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ import android.widget.RelativeLayout; import androidx.annotation.IntDef; import androidx.annotation.VisibleForTesting; import com.android.keyguard.clock.DefaultClockController; import com.android.keyguard.dagger.KeyguardStatusViewScope; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; Loading Loading @@ -47,9 +46,6 @@ public class KeyguardClockSwitch extends RelativeLayout { public static final int LARGE = 0; public static final int SMALL = 1; // compensate for translation of parents subject to device screen // In this case, the translation comes from KeyguardStatusView public int screenOffsetYPadding = 0; /** Returns a region for the large clock to position itself, based on the given parent. */ public static Rect getLargeClockRegion(ViewGroup parent) { Loading Loading @@ -165,18 +161,8 @@ public class KeyguardClockSwitch extends RelativeLayout { } if (mLargeClockFrame.isLaidOut()) { Rect targetRegion = getLargeClockRegion(mLargeClockFrame); if (mClock instanceof DefaultClockController) { mClock.getLargeClock().getEvents().onTargetRegionChanged( targetRegion); } else { mClock.getLargeClock().getEvents().onTargetRegionChanged( new Rect( targetRegion.left, targetRegion.top - screenOffsetYPadding, targetRegion.right, targetRegion.bottom - screenOffsetYPadding)); } getLargeClockRegion(mLargeClockFrame)); } } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +7 −8 Original line number Diff line number Diff line Loading @@ -168,14 +168,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mOnlyClock = onlyClock; } /** * Used for status view to pass the screen offset from parent view */ public void setLockscreenClockY(int clockY) { mView.screenOffsetYPadding = clockY; mView.updateClockTargetRegions(); } /** * Attach the controller to the view it relates to. */ Loading Loading @@ -402,6 +394,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS PropertyAnimator.setProperty(mStatusArea, AnimatableProperty.TRANSLATION_X, x, props, animate); } } void updateKeyguardStatusViewOffset() { // updateClockTargetRegions will call onTargetRegionChanged // which will require the correct translationY property of keyguardStatusView after updating mView.updateClockTargetRegions(); } /** Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +5 −9 Original line number Diff line number Diff line Loading @@ -214,15 +214,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV return mKeyguardClockSwitchController.isClockTopAligned(); } /** * Pass top margin from ClockPositionAlgorithm in NotificationPanelViewController * Use for clock view in LS to compensate for top margin to align to the screen * Regardless of translation from AOD and unlock gestures */ public void setLockscreenClockY(int clockY) { mKeyguardClockSwitchController.setLockscreenClockY(clockY); } /** * Set whether the view accessibility importance mode. */ Loading @@ -239,6 +230,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV * Update position of the view with an optional animation */ public void updatePosition(int x, int y, float scale, boolean animate) { float oldY = mView.getY(); setProperty(AnimatableProperty.Y, y, animate); ClockController clock = mKeyguardClockSwitchController.getClock(); Loading @@ -254,6 +246,10 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV setProperty(AnimatableProperty.SCALE_X, 1f, animate); setProperty(AnimatableProperty.SCALE_Y, 1f, animate); } if (oldY != y) { mKeyguardClockSwitchController.updateKeyguardStatusViewOffset(); } } /** Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +0 −2 Original line number Diff line number Diff line Loading @@ -1513,8 +1513,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mKeyguardStatusViewController.getClockBottom(mStatusBarHeaderHeightKeyguard), mKeyguardStatusViewController.isClockTopAligned()); mClockPositionAlgorithm.run(mClockPositionResult); mKeyguardStatusViewController.setLockscreenClockY( mClockPositionAlgorithm.getExpandedPreferredClockY()); mKeyguardBottomAreaInteractor.setClockPosition( mClockPositionResult.clockX, mClockPositionResult.clockY); boolean animate = mNotificationStackScrollLayoutController.isAddOrRemoveAnimationPending(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java +1 −5 Original line number Diff line number Diff line Loading @@ -239,11 +239,7 @@ public class KeyguardClockPositionAlgorithm { } } /** * give the static topMargin, used for lockscreen clocks to get the initial translationY * to do counter translation */ public int getExpandedPreferredClockY() { private int getExpandedPreferredClockY() { if (mIsSplitShade) { return mSplitShadeTargetTopMargin; } else { Loading