diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-05-04 16:47:11 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-05-22 13:31:04 -0700 |
commit | a474a9bcf5d533ac942c58409e45e5ec6d8b4893 (patch) | |
tree | 86bc1eea564da58343b1d64e414ccd2e8bec2f03 /tests/src | |
parent | 998dbecf5397162f13acb8a84cfe71c2ed4d8741 (diff) | |
download | android_packages_apps_Trebuchet-a474a9bcf5d533ac942c58409e45e5ec6d8b4893.tar.gz android_packages_apps_Trebuchet-a474a9bcf5d533ac942c58409e45e5ec6d8b4893.tar.bz2 android_packages_apps_Trebuchet-a474a9bcf5d533ac942c58409e45e5ec6d8b4893.zip |
Simplifying logic for managed for icon addition
> Checking for duplicate icons before adding new icons
For O and above, icon addition is controlled using
SessionCommitReceiver.
As long as the Launcher is the default app, it will keep adding
icons on the homescreen. Apps installed while launcher was
not the default homescreen, no icons will be added.
For below O, icons are added based on package event. As long as
the Launcher process is running, it will keep adding icons on the
homescreen. Apps installed while the launcher app was dead, no
icons will be added.
Bug: 37528649
Bug: 37082950
Bug: 34112546
Change-Id: Ic99501fa476c00474a479f2a36c24614bfa3f4bf
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java b/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java index 883be5aa3..4c80902f0 100644 --- a/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java +++ b/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java @@ -21,6 +21,7 @@ import org.mockito.ArgumentCaptor; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import static org.mockito.Mockito.any; import static org.mockito.Mockito.verify; @@ -50,7 +51,11 @@ public class AddWorkspaceItemsTaskTest extends BaseModelUpdateTaskTestCase { } private AddWorkspaceItemsTask newTask(ItemInfo... items) { - return new AddWorkspaceItemsTask(Provider.of(Arrays.asList(items))) { + List<Pair<ItemInfo, Object>> list = new ArrayList<>(); + for (ItemInfo item : items) { + list.add(Pair.create(item, null)); + } + return new AddWorkspaceItemsTask(Provider.of(list)) { @Override protected void updateScreens(Context context, ArrayList<Long> workspaceScreens) { } |