mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
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
This commit is contained in:
@@ -451,7 +451,7 @@ public class Workspace extends PagedView
|
||||
mLauncher.lockScreenOrientation();
|
||||
mLauncher.onInteractionBegin();
|
||||
// Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
|
||||
InstallShortcutReceiver.enableInstallQueue();
|
||||
InstallShortcutReceiver.enableInstallQueue(InstallShortcutReceiver.FLAG_DRAG_AND_DROP);
|
||||
|
||||
// Do not add a new page if it is a accessible drag which was not started by the workspace.
|
||||
// We do not support accessibility drag from other sources and instead provide a direct
|
||||
@@ -504,7 +504,8 @@ public class Workspace extends PagedView
|
||||
mLauncher.unlockScreenOrientation(false);
|
||||
|
||||
// Re-enable any Un/InstallShortcutReceiver and now process any queued items
|
||||
InstallShortcutReceiver.disableAndFlushInstallQueue(getContext());
|
||||
InstallShortcutReceiver.disableAndFlushInstallQueue(
|
||||
InstallShortcutReceiver.FLAG_DRAG_AND_DROP, getContext());
|
||||
|
||||
mOutlineProvider = null;
|
||||
mDragInfo = null;
|
||||
|
||||
Reference in New Issue
Block a user