commit | 33540449fcb8e7a8f44602a77260261e5ff9cde1 | [log] [tgz] |
---|---|---|
author | Selim Cinek <cinek@google.com> | Wed May 02 20:36:24 2018 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed May 02 20:36:24 2018 +0000 |
tree | 8ac242c12ad5fdec480e17dc144ba4cea9139554 | |
parent | 150bafd2176d149edf5bc830b3fcb193bfd536f5 [diff] | |
parent | 4fbeac438109a9866fb49117c1d51e88d0100772 [diff] |
Merge "Fix incorrect icon alignment on shelf" into pi-dev
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 3efeb6e..27fa48a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -1635,6 +1635,7 @@ mTranslateableViews.get(i).setTranslationX(0); } invalidateOutline(); + getEntry().expandedIcon.setScrollX(0); } mMenuRow.resetMenu();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java index ab042d4..2a4a5ad 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
@@ -298,4 +298,13 @@ assertEquals(3, mGroupRow.getNumUniqueChannels()); } + + @Test + public void testIconScrollXAfterTranslationAndReset() throws Exception { + mGroupRow.setTranslation(50); + assertEquals(50, -mGroupRow.getEntry().expandedIcon.getScrollX()); + + mGroupRow.resetTranslation(); + assertEquals(0, mGroupRow.getEntry().expandedIcon.getScrollX()); + } }