diff options
author | Tony <twickham@google.com> | 2017-05-30 21:22:06 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-06-15 16:21:34 -0700 |
commit | 887bd1fe1af9a37aad78ad51f5b38b265aa09c3a (patch) | |
tree | 9c1b74b18d46db8c07bf7be343620a2400ae8ad8 /tests | |
parent | 7847d10f389425a92e11b29f181acbbebc8b1dab (diff) | |
download | android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.tar.gz android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.tar.bz2 android_packages_apps_Trebuchet-887bd1fe1af9a37aad78ad51f5b38b265aa09c3a.zip |
Show more shortcuts when last notification is dimissed
We currently only show 2 shortcuts when notifications are
present, but support up to 4 otherwise. With this change,
the hidden shortcuts are added back after dismissing the
notifications, instead of only after closing and reopening
the container.
To ensure the transition is as elegant as possible, we also
separated the shortcuts header from the rest of the shortcuts.
That way we can reveal the new shortcuts without removing the
header (the shortcuts come out from behind the header).
Bug: 38036250
Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/popup/PopupPopulatorTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java b/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java index 2ad9b35ae..9a89b1b2f 100644 --- a/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java +++ b/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java @@ -28,7 +28,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static com.android.launcher3.popup.PopupPopulator.MAX_ITEMS; +import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS; import static com.android.launcher3.popup.PopupPopulator.NUM_DYNAMIC; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -44,18 +44,18 @@ public class PopupPopulatorTest { public void testSortAndFilterShortcuts() { filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(3, 0), 3, 0); filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(0, 3), 0, 3); - filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 0), MAX_ITEMS, 0); - filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(0, 5), 0, MAX_ITEMS); + filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 0), MAX_SHORTCUTS, 0); + filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(0, 5), 0, MAX_SHORTCUTS); filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(3, 3), - MAX_ITEMS - NUM_DYNAMIC, NUM_DYNAMIC); + MAX_SHORTCUTS - NUM_DYNAMIC, NUM_DYNAMIC); filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 5), - MAX_ITEMS - NUM_DYNAMIC, NUM_DYNAMIC); - filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 1), MAX_ITEMS - 1, 1); - filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(1, 5), 1, MAX_ITEMS - 1); + MAX_SHORTCUTS - NUM_DYNAMIC, NUM_DYNAMIC); + filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 1), MAX_SHORTCUTS - 1, 1); + filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(1, 5), 1, MAX_SHORTCUTS - 1); filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(5, 3), - MAX_ITEMS - NUM_DYNAMIC, NUM_DYNAMIC); + MAX_SHORTCUTS - NUM_DYNAMIC, NUM_DYNAMIC); filterShortcutsAndAssertNumStaticAndDynamic(createShortcutsList(3, 5), - MAX_ITEMS - NUM_DYNAMIC, NUM_DYNAMIC); + MAX_SHORTCUTS - NUM_DYNAMIC, NUM_DYNAMIC); } @Test |