summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fixing loadWorkspaceSunny Goyal2017-01-241-108/+109
| | | | | | | | > Adding checks on legacy shortcuts > Checking restore status based on package and not componentName Bug: 34123342 Change-Id: I442699e4ebb34ae66aa25c512bfcdc1b4fd5ae2a
* Moving icon generation out of ShortcutInfo constructor so that itSunny Goyal2017-01-181-0/+14
| | | | | | can be created on the UI thread Change-Id: If84e52041eb4ab20807f5cfd4b7f31d7b5f381ed
* Only marking items not already restored as restoreSunny Goyal2017-01-131-37/+21
| | | | | | | > Moving the restore property to LoaderCursor Bug: 34123089 Change-Id: I1f992ef086d65e0b3cf18d3b2cf37a4f254c97d2
* Removing promiseIntent property from ShortuctInfoSunny Goyal2017-01-121-5/+0
| | | | | | | | > Instead of checking promiseIntent != null, using isPromise() for consistency > Fixing bug where clicking a pending icon does not launch anything > Fixing bug where draging an icon on Info target, permanently hides the icon Change-Id: Ic8f6b56042dba42d5ed9aedb0f5947186e1a4208
* No more LauncherActivityInfoCompatSunny Goyal2017-01-111-3/+3
| | | | | Bug: 32745285 Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
* Removing static Context access using LauncherAppStateSunny Goyal2017-01-111-11/+13
| | | | | | | | > This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
* Enforcing background thread when accessing iconCacheDb.Sunny Goyal2017-01-101-6/+5
| | | | | | | | > Moving any icon cache access to background thread > Updating Apps list to avoid loading icons for ignored apps Bug: 21325319 Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
* Refactoring some loadWorkspace logic in a separate classSunny Goyal2017-01-101-473/+85
| | | | | Bug: 34112546 Change-Id: I8a43ed1646056aa1957ac3d6ea82018691df6386
* Removing logic around replacing icon during restoreSunny Goyal2017-01-051-30/+1
| | | | | | | | This logic was dependent on key-value based backup. Since we are using full-backup, the appropriate flags are never set. Bug: 18764649 Change-Id: I95a93eee63ac9c82acfb66abfdd1a5407974df46
* Simplifying IconCache access codeSunny Goyal2017-01-031-7/+9
| | | | | | | | Providing a way to access icon cache without LauncherAcitivtiyInfo. This allows fetching LauncherActivityInfo only when required, thus avoiding system RPC when the icon is already in cache. Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
* No more UserHandleCompatSunny Goyal2016-12-151-35/+34
| | | | | Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
* Ensuring that ShortcutInfo always has an iconSunny Goyal2016-12-131-29/+21
| | | | | | | | | > Making iconBitmap public instead of a getter (similar to AppInfo) > Removing getIcon() which can lead to IO on UI thread > Removing updateIcon and handling the update at the caller Bug: 21325319 Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
* Adding support for deep shortcuts in Install queueSunny Goyal2016-12-031-1/+4
| | | | | Bug: 32904959 Change-Id: Ida43bcf78da716defdf95eb704c31973bc390ea1
* Merge "Moving ShortcutInfo creation in InstallShortcutReceiver to background ↵Sunny Goyal2016-11-301-2/+10
|\ | | | | | | thread" into ub-launcher3-master
| * Moving ShortcutInfo creation in InstallShortcutReceiver to background threadSunny Goyal2016-11-301-2/+10
| | | | | | | | | | | | | | > Creating shortcut info requires iconCache access Bug: 21325319 Change-Id: I3317d8b6824aa05b836f3ed3626f169d4d34f783
* | Merge "Changing DeepShortcutManager to have a singleton contructor instead ↵Sunny Goyal2016-11-211-11/+11
|\ \ | | | | | | | | | of getting it from LauncherAppState" into ub-launcher3-master
| * | Changing DeepShortcutManager to have a singleton contructor insteadSunny Goyal2016-11-211-11/+11
| |/ | | | | | | | | | | | | | | | | | | of getting it from LauncherAppState This follows the design of other managers and makes it easier to access it from other processes and non-ui thread. Bug: 33032833 Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
* / Adding a utility class to enforce that icons are always flattened onSunny Goyal2016-11-191-27/+26
|/ | | | | | | the background thread. Bug: 21325319 Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
* Moving various runnables in LauncherModel to individual tasksSunny Goyal2016-11-091-886/+82
| | | | | | > Adding tests for some of the runnable Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a
* Updating version check method namesSunny Goyal2016-11-021-1/+1
| | | | Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
* Fixing static instance of Indexer being created in the modelSunny Goyal2016-10-191-9/+13
| | | | | | | | | | | | Indexer depends on the locale and should be created when ever the config changes. Moving the widget indexing to the adapter (similar to allApps) which gets created whenever the activity is recreated. This fixes the bug where widgets indexing breaks if locale changes while launcher process is alive Also fixing the bug in widget model cloning where the HashMap was not cloning the underlying ArrayList Change-Id: I7dbe6290e73299c4c07aa7fa564077a2649e1a4c
* resolve merge conflicts of 2fd0208 to ub-launcher3-masterTony Wickham2016-10-121-4/+7
|\ | | | | | | Change-Id: I20ad6eaace81786be080e28d6eb551908add6d90
| * Use Launcher.getLauncher(Context) instead of type-casting.Tony2016-10-071-4/+7
| | | | | | | | | | Bug: 32010039 Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
* | Moving come helper methods to corresponding classesSunny Goyal2016-10-101-64/+9
| | | | | | | | | | | | | | | | > Moving isPackageEnabled to InstallShortcutReceiver > Moving the deep shortcut map to the data model > Removing appInfo.flags. Instead fetching the flags when needed Change-Id: I654dd8acefa7b7d183b0419afbe112bef001d536
* | Remove shortcuts that no longer exist or are no longer pinned.Tony Wickham2016-09-231-21/+36
|\| | | | | | | | | | | am: 7695e603bf Change-Id: I525c3342a7559f1cd831cbd4f56c2acd8b6875b9
| * Remove shortcuts that no longer exist or are no longer pinned.Tony Wickham2016-09-221-21/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This change is in the onShortcutsChanged() callback.) - Remove all workspace icons that correspond to shortcuts that are now unpinned - Remove all workspace icons that have the same package and user handle as passed in onShortcutsChanged(), if they aren't included in the list of shortcuts that is also passed. These cases will happen for static and dynamic shortcuts, respectively, when an app's data is cleared. Bug: 30316501 Change-Id: I50db6567cb318d087012ab5d8208e765b81c6f99
| * Merge "Use promisedIntent instead of intent when deep shortcuts are ↵Tony Wickham2016-08-291-4/+7
| |\ | | | | | | | | | restored." into ub-launcher3-calgary-polish
* | | Separating all the static data in a separate class, BgDataModel.Sunny Goyal2016-09-091-245/+73
| | | | | | | | | | | | | | | | | | | | | This will allow moving all the Tasks defined in LauncherModel as separate intependent classes Change-Id: I0b2f82b90dc22590eb1cc360a5690e2e7f857b5c
* | | Using ItemInfoMatcher in place of similar interfaces and utility methodsSunny Goyal2016-09-081-101/+27
| | | | | | | | | | | | Change-Id: I7337b819fe8f42f7a5a1481b5ed5d99a8cf583c4
* | | Merge "Moving some image handling classes to .graphics package" into ↵Sunny Goyal2016-09-021-5/+4
|\ \ \ | | | | | | | | | | | | ub-launcher3-master
| * | | Moving some image handling classes to .graphics packageSunny Goyal2016-09-021-5/+4
| | | | | | | | | | | | | | | | Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
* | | | Moving AppsAvailabilityCheck into a separate classSunny Goyal2016-09-021-52/+14
|/ / / | | | | | | | | | Change-Id: Ieea1b5100d63752d928049ad9b1d3b4f84234f0d
* | | Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-291-4/+7
|\ \ \ | |/ / |/| / | |/ | | | | am: fc02c1b446 Change-Id: Ic4c7bc4dfbeb2260f411edd56df2df3769127365
| * Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-291-4/+7
| | | | | | | | | | | | | | | | | | | | This ensures that the intent has the package corresponding to the shortcut publisher, rather than a market intent. It also ensures that the intent has the EXTRA_SHORTCUT_ID attached. Bug: 31123204 Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
* | Adding a debug flag to prevent broken downlodas from getting removed duringSunny Goyal2016-08-291-4/+3
|/ | | | | | | | | restore After setting this flag apps do not need to have an active settion during restore which would simplyfy debugging backup-restore bugs. Change-Id: I89f2d3ec677281887f8bab8559ace991709caadc
* Checking for duplicate intent with proper source bounds.Sunny Goyal2016-08-231-1/+3
| | | | | | | | | Since we are doing a equality check on the intent, items which already have the bounds attached to the intent will not get matched, causing duplicate icons Bug: 27176189 Change-Id: Ia9ed9120b04e9c234304995aed13777a5773119e
* Adding support for pending widgets in AutoInstall layoutSunny Goyal2016-08-161-1/+9
| | | | | | | | | | | | | | > Pending widgets whill show a loading progress while the app is being installed. > Extra bind options can be defined using the tub tags <extra key="key-name" value="key-value" /> These are sent as widget options when the widget is bound. > If the widget has any config activity, it is not shown > Required attributes: className, packageName, x, y, spanY, spanY & screen Bug: 30279609 Change-Id: I1338618bfa5d86967339dffb68c12b1add6eb5d7
* Reloading workspace when the shortcuts permission changesSunny Goyal2016-08-101-5/+36
| | | | | | | | | > Check for permission on every onResume > If the permission is different than last known permission, reload and rebind workspace. Bug: 30789422 Change-Id: Idfa445815e29e2336505779545507d106b33a253
* Fixing potential ConcurrentModificationExceptionSunny Goyal2016-08-081-2/+1
| | | | | | | | mBgDeepShortcutMap is only accessed on the background thread. But the same instance of list of values was getting passed to the UI thread, instead of being cloned. Change-Id: Ie7d0442d895304489ce9323ea872b9091d668ae5
* Adding support for updating the pinned shortcuts without updatingSunny Goyal2016-08-041-8/+17
| | | | | | | the ID map Bug: 30654182 Change-Id: I30082bd87466a29b7bafe1e8cbf1446e1d1e4f3e
* Handling IllegalStateException which can be thrown by the system when the ↵Sunny Goyal2016-08-011-9/+24
| | | | | | | user is locked Bug: 30411561 Change-Id: I0d7fc0aaecba01b1aaac95b98654f6e3ee090ce8
* Adding quiet mode support for shortcutsSunny Goyal2016-07-291-120/+171
| | | | | | | | | | | > LauncherApps returns empty list when the user is locked. Not relying on LauncherApps in this case > When the user is locked, removing all dynamic shortcuts > Loading shortcuts from DB when the user is locked > Verifying the shortcuts again when the user is available Bug: 30411561 Change-Id: Ib6eb372c5b009cadb86a8f6e781f3f3cbf787ceb
* Only add shortcuts to the deep shortcut map if they are dynamic/manifest.Tony Wickham2016-07-281-1/+3
| | | | | Bug: 30475465 Change-Id: I93aff6330b86a3bfa3e6b5741ab759d835618f0b