Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +0 −4 Original line number Diff line number Diff line Loading @@ -802,10 +802,6 @@ public class NotificationShelf extends ActivatableNotificationView implements updateRelativeOffset(); } public void setDarkOffsetX(int offsetX) { mShelfIcons.setDarkOffsetX(offsetX); } private class ShelfState extends ExpandableViewState { private float openedAmount; private boolean hasItemsInStableShelf; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +0 −13 Original line number Diff line number Diff line Loading @@ -120,7 +120,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { private boolean mDisallowNextAnimation; private boolean mAnimationsEnabled = true; private ArrayMap<String, ArrayList<StatusBarIcon>> mReplacingIcons; private int mDarkOffsetX; // Keep track of the last visible icon so collapsed container can report on its location private IconState mLastVisibleIconState; Loading Loading @@ -378,14 +377,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { iconState.xTranslation = getWidth() - iconState.xTranslation - view.getWidth(); } } if (mDark && mDarkOffsetX != 0) { for (int i = 0; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); iconState.xTranslation += mDarkOffsetX; } } } private float getLayoutEnd() { Loading Loading @@ -534,10 +525,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { mAnimationsEnabled = enabled; } public void setDarkOffsetX(int offsetX) { mDarkOffsetX = offsetX; } public void setReplacingIcons(ArrayMap<String, ArrayList<StatusBarIcon>> replacingIcons) { mReplacingIcons = replacingIcons; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +2 −4 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.accessibility.AccessibilityEvent; import android.widget.FrameLayout; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.keyguard.KeyguardStatusView; Loading @@ -67,14 +68,11 @@ import com.android.systemui.statusbar.NotificationData; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.NotificationUtils; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.policy.KeyguardUserSwitcher; import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener; import com.android.systemui.statusbar.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.stack.StackStateAnimator; import java.util.Collection; import java.util.List; public class NotificationPanelView extends PanelView implements Loading Loading @@ -482,7 +480,7 @@ public class NotificationPanelView extends PanelView implements mTopPaddingAdjustment = mClockPositionResult.stackScrollerPaddingAdjustment; } mNotificationStackScroller.setIntrinsicPadding(stackScrollerPadding); mNotificationStackScroller.setDarkShelfOffsetX(mClockPositionResult.clockX); mNotificationStackScroller.setAntiBurnInOffsetX(mClockPositionResult.clockX); mKeyguardBottomArea.setBurnInXOffset(mClockPositionResult.clockX); requestScrollerTopPaddingUpdate(animate); } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +9 −2 Original line number Diff line number Diff line Loading @@ -403,6 +403,7 @@ public class NotificationStackScrollLayout extends ViewGroup private final int mSeparatorThickness; private final Rect mTmpRect = new Rect(); private int mClockBottom; private int mAntiBurnInOffsetX; public NotificationStackScrollLayout(Context context) { this(context, null); Loading Loading @@ -3889,9 +3890,14 @@ public class NotificationStackScrollLayout extends ViewGroup applyCurrentBackgroundBounds(); updateWillNotDraw(); updateContentHeight(); updateAntiBurnInTranslation(); notifyHeightChangeListener(mShelf); } private void updateAntiBurnInTranslation() { setTranslationX(mAmbientState.isDark() ? mAntiBurnInOffsetX : 0); } /** * Updates whether or not this Layout will perform its own custom drawing (i.e. whether or * not {@link #onDraw(Canvas)} is called). This method should be called whenever the Loading Loading @@ -4473,8 +4479,9 @@ public class NotificationStackScrollLayout extends ViewGroup mHeadsUpGoingAwayAnimationsAllowed = headsUpGoingAwayAnimationsAllowed; } public void setDarkShelfOffsetX(int shelfOffsetX) { mShelf.setDarkOffsetX(shelfOffsetX); public void setAntiBurnInOffsetX(int antiBurnInOffsetX) { mAntiBurnInOffsetX = antiBurnInOffsetX; updateAntiBurnInTranslation(); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayoutTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,15 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { Assert.assertFalse(mStackScroller.isDimmed()); } @Test public void testAntiBurnInOffset() { final int burnInOffset = 30; mStackScroller.setAntiBurnInOffsetX(burnInOffset); mStackScroller.setDark(false /* dark */, false /* animated */, null /* touch */); Assert.assertEquals(0 /* expected */, mStackScroller.getTranslationX(), 0.01 /* delta */); mStackScroller.setDark(true /* dark */, false /* animated */, null /* touch */); Assert.assertEquals(burnInOffset /* expected */, mStackScroller.getTranslationX(), 0.01 /* delta */); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +0 −4 Original line number Diff line number Diff line Loading @@ -802,10 +802,6 @@ public class NotificationShelf extends ActivatableNotificationView implements updateRelativeOffset(); } public void setDarkOffsetX(int offsetX) { mShelfIcons.setDarkOffsetX(offsetX); } private class ShelfState extends ExpandableViewState { private float openedAmount; private boolean hasItemsInStableShelf; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +0 −13 Original line number Diff line number Diff line Loading @@ -120,7 +120,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { private boolean mDisallowNextAnimation; private boolean mAnimationsEnabled = true; private ArrayMap<String, ArrayList<StatusBarIcon>> mReplacingIcons; private int mDarkOffsetX; // Keep track of the last visible icon so collapsed container can report on its location private IconState mLastVisibleIconState; Loading Loading @@ -378,14 +377,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { iconState.xTranslation = getWidth() - iconState.xTranslation - view.getWidth(); } } if (mDark && mDarkOffsetX != 0) { for (int i = 0; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); iconState.xTranslation += mDarkOffsetX; } } } private float getLayoutEnd() { Loading Loading @@ -534,10 +525,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { mAnimationsEnabled = enabled; } public void setDarkOffsetX(int offsetX) { mDarkOffsetX = offsetX; } public void setReplacingIcons(ArrayMap<String, ArrayList<StatusBarIcon>> replacingIcons) { mReplacingIcons = replacingIcons; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +2 −4 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.ViewTreeObserver; import android.view.WindowInsets; import android.view.accessibility.AccessibilityEvent; import android.widget.FrameLayout; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.keyguard.KeyguardStatusView; Loading @@ -67,14 +68,11 @@ import com.android.systemui.statusbar.NotificationData; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.notification.ActivityLaunchAnimator; import com.android.systemui.statusbar.notification.NotificationUtils; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.policy.KeyguardUserSwitcher; import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener; import com.android.systemui.statusbar.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.stack.StackStateAnimator; import java.util.Collection; import java.util.List; public class NotificationPanelView extends PanelView implements Loading Loading @@ -482,7 +480,7 @@ public class NotificationPanelView extends PanelView implements mTopPaddingAdjustment = mClockPositionResult.stackScrollerPaddingAdjustment; } mNotificationStackScroller.setIntrinsicPadding(stackScrollerPadding); mNotificationStackScroller.setDarkShelfOffsetX(mClockPositionResult.clockX); mNotificationStackScroller.setAntiBurnInOffsetX(mClockPositionResult.clockX); mKeyguardBottomArea.setBurnInXOffset(mClockPositionResult.clockX); requestScrollerTopPaddingUpdate(animate); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +9 −2 Original line number Diff line number Diff line Loading @@ -403,6 +403,7 @@ public class NotificationStackScrollLayout extends ViewGroup private final int mSeparatorThickness; private final Rect mTmpRect = new Rect(); private int mClockBottom; private int mAntiBurnInOffsetX; public NotificationStackScrollLayout(Context context) { this(context, null); Loading Loading @@ -3889,9 +3890,14 @@ public class NotificationStackScrollLayout extends ViewGroup applyCurrentBackgroundBounds(); updateWillNotDraw(); updateContentHeight(); updateAntiBurnInTranslation(); notifyHeightChangeListener(mShelf); } private void updateAntiBurnInTranslation() { setTranslationX(mAmbientState.isDark() ? mAntiBurnInOffsetX : 0); } /** * Updates whether or not this Layout will perform its own custom drawing (i.e. whether or * not {@link #onDraw(Canvas)} is called). This method should be called whenever the Loading Loading @@ -4473,8 +4479,9 @@ public class NotificationStackScrollLayout extends ViewGroup mHeadsUpGoingAwayAnimationsAllowed = headsUpGoingAwayAnimationsAllowed; } public void setDarkShelfOffsetX(int shelfOffsetX) { mShelf.setDarkOffsetX(shelfOffsetX); public void setAntiBurnInOffsetX(int antiBurnInOffsetX) { mAntiBurnInOffsetX = antiBurnInOffsetX; updateAntiBurnInTranslation(); } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayoutTest.java +11 −0 Original line number Diff line number Diff line Loading @@ -61,4 +61,15 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { Assert.assertFalse(mStackScroller.isDimmed()); } @Test public void testAntiBurnInOffset() { final int burnInOffset = 30; mStackScroller.setAntiBurnInOffsetX(burnInOffset); mStackScroller.setDark(false /* dark */, false /* animated */, null /* touch */); Assert.assertEquals(0 /* expected */, mStackScroller.getTranslationX(), 0.01 /* delta */); mStackScroller.setDark(true /* dark */, false /* animated */, null /* touch */); Assert.assertEquals(burnInOffset /* expected */, mStackScroller.getTranslationX(), 0.01 /* delta */); } }