summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Trebuchet: icon packs supportJoey Rizzoli2018-01-191-0/+2
| | | | | | | | | | | | | | | Based on the following commits: * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/cf4bde2098de8beec24a0c88bf2e51e19a9c22b6 * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/8ddafe17ad6adc268ad1a93b7724d8b22028a71b * https://github.com/AOSPA/android_packages_apps_Launcher3/commit/0940176c3c01a1f87237811f42d05a592b0968b3 With the following additions: * Support for adaptive icons * UI changes * Cleanup and improvements Change-Id: I877a8b2dd204753179736fa7c1c34444e9b2c849 Signed-off-by: Joey Rizzoli <joey@lineageos.org>
* Simplifying some package matching code by using common itemInfo mathcherSunny Goyal2017-08-171-5/+3
| | | | Change-Id: Ib98d528391e19c0de3fe11304330dfa37710548c
* Fixing duplicate/inconsistent definitions for model and callbacksSunny Goyal2017-08-171-7/+4
| | | | | | | | > 2 implementations for filtering workspace items > 2 implementations for binding widgets > duplicate logic for add and update appInfo Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
* Defer some work until after workspace fade-inTony2017-08-041-0/+4
| | | | | | | | | | | | Defer: - Setting all apps - Setting widgets Also set the launcher-loader thread to THREAD_PRIORITY_BACKGROUND for the duration of the animation. Bug: 37965432 Change-Id: I8364940805b84aecb8353a473ab4d575c27bfec4
* Adding A feature flag to disable widgets and a corresponding buildSunny Goyal2017-07-211-2/+1
| | | | | | | target Launcher3Go without widgets support Bug: 62353159 Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
* Adding support for loading workspace in the absence of Launcher.Sunny Goyal2017-06-081-70/+29
| | | | | | | | | > LoadWorkspace can be called with a LoaderResult which does not bind anything. > Synchronous bind does not look for a valid page id, and will fallback to the current pageId similar to full load flow Bug: 37616877 Change-Id: If14491dc79c5b85ae1019cc93e4e08759df3387d
* Moving LoaderTask to a separate class fileSunny Goyal2017-06-061-789/+5
| | | | | Bug: 34112546 Change-Id: I86d93cfb5d3903bfd3878564cbe8b67b64fd8423
* Moving LoaderTask staticSunny Goyal2017-06-021-148/+140
| | | | | | | | | | | Will move it to a separate file in a followup cl. This simplifies dependencies between LauncherModel and LoaderTask which and making it easier to start the loader before Launcher activity is created (as the Callbacks in LauncherModel can change while loader is running). Bug: 34112546 Bug: 37616877 Change-Id: Ie9619c6b0de0e3eb60657c04ae1b58d946c829e9
* Moving workspace bind logic into a separate class.Sunny Goyal2017-06-011-440/+24
| | | | | | | | | | This change separates the loading and binding code. Eventually workspace loading will not depend on bind and we will be able to preload workspace even before the launcher activity is started. Bug: 34112546 Bug: 37616877 Change-Id: Ia8e661465cb40ad073b5b76adfc74b9e15633b1d
* Simplifying logic for managed for icon additionSunny Goyal2017-05-221-57/+4
| | | | | | | | | | | | | | | | | | | | > 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
* Merge "Making some methods accessible" into ub-launcher3-dorval-polishSunny Goyal2017-05-191-1/+1
|\
| * Making some methods accessibleSunny Goyal2017-05-191-1/+1
| | | | | | | | | | Bug: 37616877 Change-Id: I22ed43d9a39d321757d7c2fde7754b95a44780e2
* | Removing workspaceLoaded check from loadDeepShortcuts()Sunny Goyal2017-05-191-11/+9
|\ \ | |/ |/| | | | | | | am: 4869bf3f74 Change-Id: I1516a214df024f5e9b9387671cfadd3697384ede
| * Removing workspaceLoaded check from loadDeepShortcuts()Sunny Goyal2017-05-171-11/+9
| | | | | | | | | | | | | | | | | | | | loadDeepShortcuts() is called after loadWorkspace() which already clears the shortcutMap. So if loader runs twice, during the second run, workspaceLoaded is true, but the shortcutMap had already been cleared in loadWorkspace(). Bug: 38384071 Change-Id: I40f0faf88376617e56819aef02620488e528dfb2
* | Merge "Don't delete legacy shortcuts in loadWorkspace()" into ↵Tony Wickham2017-05-051-1/+2
|\| | | | | | | | | | | | | | | ub-launcher3-dorval am: 23cae10576 Change-Id: Icb8b72be29249e5df4505bb02c75c6f2a90d6bee
| * Don't delete legacy shortcuts in loadWorkspace()Tony Wickham2017-05-041-1/+2
| | | | | | | | | | | | | | | | | | Legacy 1x1 shortcut intents have null package names. This was causing an NPE when calling LauncherApps#getApplicationInfo(), which caused those shortcuts to be removed from the workspace. Bug: 37634887 Change-Id: I6d9876ee1634a573c1f0f94602ae373365cab01c
* | Show icon in PendingAppWidgetHostView immediately.Jon Miranda2017-05-031-0/+10
| | | | | | | | | | | | | | | | | | | | Before this change, PendingAppWidgetHostView would appear 'blank' until they were loaded -- which could take a while depending on how many apps the user had, because the all apps icons are loaded first. Bug: 36815047 Change-Id: Ia7449cce4341ed9e9384fc8aaadeaae6c33bb262
* | resolve merge conflicts of 6f725f283 to ub-launcher3-masterTony Wickham2017-04-201-0/+10
|\| | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: I3559969b62a9a4b1ec04697109636e8cb0fd9fc8
| * Merge "Only add widgets system shortcut if widgets exist" into ↵Tony Wickham2017-04-201-0/+10
| |\ | | | | | | | | | ub-launcher3-dorval
| | * Only add widgets system shortcut if widgets existTony Wickham2017-04-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we were adding it in a disabled state, and then enabling it once widgets were bound (if widgets existed for that app). Now we load all widgets when launcher starts so that we can use the values for the purpose of animating the popup container. Then, as the container opens, we reload widgets/shortcuts for that particular app and add/remove the widgets shortcut if necessary. Bug: 34940468 Change-Id: I64bd009442d10d3d1f9a977bdedfdb639a7dd193
* | | Merge "Deleting any ghost widget from system service:" into ub-launcher3-dorvalSunny Goyal2017-04-181-0/+4
|\| | | | | | | | | | | | | | | | | am: f2d8b65775 Change-Id: I1d9b7a5a532bf504aabac69691e3f83e2f181a04
| * | Deleting any ghost widget from system service:Sunny Goyal2017-04-171-0/+4
| |/ | | | | | | | | | | | | | | | | > A one-time DB update for removing any existing ghost widgets > Handling widget cleanup when we bulk delete workspace items during loader > Simplifying external delete Bug: 35634653 Change-Id: Id0c520f57aee6d75d9c0e7bcd5786a464bf9f39f
| * Merge "Launcher dump proto that will be used for:" into ub-launcher3-dorvalHyunyoung Song2017-04-061-0/+5
| |\
| | * Launcher dump proto that will be used for:Hyunyoung Song2017-04-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ adb shell dumpsys activity provider com.android.launcher3/com.android.launcher3.LauncherProvider To see how the proto is filled: go/launcher-proto-dump b/31772480 Change-Id: I8e0f1e5e38148a3dfeabd2fc057392193b2625dd (cherry picked from commit 6aa3729e98502d4cffc40a7e602628b85d558edd)
* | | resolve merge conflicts of 128b7e59a to ub-launcher3-masterTony Wickham2017-04-051-4/+7
|\| | | | | | | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: I927373593dfb1b67b504a76b1ad013357b363a6e
| * | Add support for getting widgets/shortucts for a particular package/userTony Wickham2017-04-041-4/+7
| |/ | | | | | | | | | | Bug: 34940468 Bug: 33553066 Change-Id: I5d0131df206c6a13d4227ad28c5b094bbf1343df
* | Minor Refactoring only: no functional changeMario Bertschler2017-03-281-2/+1
| | | | | | | | | | | | | | | | - organizing imports - remove redundant modifiers on LauncherCallback interface - fix typos Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
* | Merge "Removing the profile extra from intent and using the profile id from ↵Sunny Goyal2017-03-211-4/+1
|\| | | | | | | | | | | | | | | the profile column" into ub-launcher3-dorval am: 77ff9a4343 Change-Id: Ib0cd8cb8f963b78a9cd53ed896aeb6e4f6163683
| * Removing the profile extra from intent and using the profile id from the ↵Sunny Goyal2017-03-211-4/+1
| | | | | | | | | | | | | | | | | | profile column The intent extra is not always correct as the profile id can change during backup restore. This allows us to use a consistant behavior everywhere. Change-Id: I004bd244204ca91758b1d42488e1fc13b0ccb998
* | Show promise app icon progress in All Apps and setup market intentMario Bertschler2017-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | on clicking promise app icon in All Apps. Only the progress will be changed with animation on progress update, no relayout is performed. If the icon is newly bound, the progress will not be animated. Bug: 23952570 Change-Id: I98d3f945f08a2abadf53f20e6007c15e56d5d410
* | Show promise app icon in All Apps while installation process.Mario Bertschler2017-03-171-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL only modifies the model and is behind a feature flag which per default is set to false. The app icon will appear as a promise icon, it reacts on icon or label changes and the icon will be remove on finishing the installation process. With this CL the progress of the installation process is not visible. Bug: 23952570 Change-Id: I510825d0b0b1b01eb14f7e50f0a2358b0d8b99b5
* | Merge "Separating the config and flags in different directories so that it ↵TreeHugger Robot2017-03-071-2/+2
|\ \ | | | | | | | | | is easier to override one or the other" into ub-launcher3-master
| * | Separating the config and flags in different directories so thatSunny Goyal2017-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | it is easier to override one or the other Bug: 36001650 Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
* | | Removing DeferredHandler and using a simple Handler to post callbacksSunny Goyal2017-03-071-94/+49
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | DeferredHandler was added when we were posting each icon separately, to prevent starvation. But since then we have moved to binding batct items during bind. Also fixing waitForIdle not waiting the second time. waitForIdle was using a global variable to maintain state, and was not waiting properly when its called the second time before binding deep shortcuts Original Change-Id: I9c1289cb3bfb74f86e53ec7ac6dd76bb39666b2d Change-Id: I9e6b3ae65fbd3aec3a46092efc5249c4525efedf
* | Merge "Launcher dump proto that will be used for:" into ub-launcher3-masterHyunyoung Song2017-03-021-0/+5
|\ \
| * | Launcher dump proto that will be used for:Hyunyoung Song2017-03-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | $ adb shell dumpsys activity provider com.android.launcher3/com.android.launcher3.LauncherProvider To see how the proto is filled: go/launcher-proto-dump b/31772480 Change-Id: I8e0f1e5e38148a3dfeabd2fc057392193b2625dd
* | | Merge "Fixing SDCard and package enabled state checks in ↵Sunny Goyal2017-03-021-4/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | PackageManagerHeler" into ub-launcher3-dorval am: ed7bef195c Change-Id: Ifb4ab24887d58fa1ffa85f86a579ef31aef75394
| * | Fixing SDCard and package enabled state checks in PackageManagerHelerSunny Goyal2017-03-011-4/+3
| | | | | | | | | | | | | | | Bug: 32365540 Change-Id: Iaac3e08ce55457ebbfb3633514ebc8ade6d200c5
* | | Use FolderIconPreviewVerifier to check if item is in preview.Jon Miranda2017-02-281-1/+3
| |/ |/| | | | | | | | | Bug: 35064148 Bug: 33600656 Change-Id: I71a03636276e6169c7eb8c68eecf31f37fde2d56
* | Added FolderIconPreviewVerifier class.Jon Miranda2017-02-281-6/+13
|/ | | | | | | | | | | This class verifies whether an item in a Foder is displayed in the FolderIcon preview, based on the item's rank. We use this class to determine which items in a Folder will be displayed in the preview. Bug: 35064148 Change-Id: Ia21bccbd95c348efeac62591ae3696a4c60b5339
* Using transaction when dropping tables, so that the DB never entersSunny Goyal2017-02-231-1/+1
| | | | | | | an inconsistant state Bug: 34720697 Change-Id: I55a26d63be6c06622da6ee3395bf1990f1a58a11
* Ignore tasks if the LauncherModel is still pending.Jon Miranda2017-02-231-0/+6
| | | | | | | | The tasks will be enqueued after the model is loaded when it gets to the final state. Bug: 31509386 Change-Id: Id72aaedb025a91a49b25e1ef103cc1976d603b21
* Simplifying Model data load state managementSunny Goyal2017-02-221-108/+74
| | | | | | | | | | | Instead of maintaining 3 different states, each tied to a subset of data, maintaing a single state that represents all the data. Individual subset data is invalidated in rare cases and these invalidates are tightly tied to the UI. This also allows us to add new data to the model, without worring about classifying the data into a subset. Bug: 34112546 Change-Id: Id9cb273de35b79e84a2ef8d6556fcf1e72fb4b75
* Merge "Launcher3: fix app shortcuts for suspended apps" into ub-launcher3-masterTreeHugger Robot2017-02-211-2/+5
|\
| * Launcher3: fix app shortcuts for suspended appsCharles He2017-02-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL fixes app shortcuts for suspended packages. 1) When DO/PO suspends an app, its pinned shortcuts are instantly grayed out, but this is not persisted after the launcher restarts (e.g. device reboot). We now enforce the launcher to check the suspended state when loading the workspace, and gray out pinned shortcut icons accordingly. 2) When DO/PO suspends an app, its app shortcut popup is still available. We now temporarily disable the popup when the app is suspended, and persist the state across restarts. Bug: 32365540 Test: manual, by following the steps in the bug above Test: manual, by restarting the launcher package Change-Id: I983d7c17fa198beca23b66459b50bd67b447bdd2
* | Merge "Separating methods for updating the model to a sepatate class." into ↵TreeHugger Robot2017-02-161-309/+8
|\ \ | |/ |/| | | ub-launcher3-master
| * Separating methods for updating the model to a sepatate class.Sunny Goyal2017-02-161-309/+8
| | | | | | | | | | | | | | Removing static access to model update methods, to allow for better access control and testing Change-Id: I9afe004dbf1b2fe50df422fd28bceea9230a4704
* | Merge "Making methods in PaackageManagerHelper non-static" into ↵TreeHugger Robot2017-02-091-8/+5
|\ \ | | | | | | | | | ub-launcher3-master
| * | Making methods in PaackageManagerHelper non-staticSunny Goyal2017-02-021-8/+5
| |/ | | | | | | | | Bug: 34112546 Change-Id: Ia3db3e2f56d26e314000e302b51e6d38607c525d
* / Clean up around 1) Log.VERBOSE and 2) dumpHyunyoung Song2017-02-011-19/+10
|/ | | | | | | | | b/31772480 Note: in the follow up CL, I will add the dump result of the bgDataModel to a proto Change-Id: I5261cff0fb29cedd1dd772b8b15f67095ad5b967