summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Merge "Showing the shortcuts in the disabled state and removing ti from the ↵Sunny Goyal2016-07-281-3/+5
|\ | | | | | | menu when its disabled" into ub-launcher3-calgary
| * Showing the shortcuts in the disabled state and removing ti from the menuSunny Goyal2016-07-281-3/+5
| | | | | | | | | | | | | | when its disabled Bug: 30315906 Change-Id: Ice747e7be955d8bb2dd65191f7613e2afd4abc1c
* | Merge "Fading in the first screen, when launcher loads for the first time" ↵Sunny Goyal2016-07-281-18/+39
|\ \ | |/ |/| | | into ub-launcher3-calgary
| * Fading in the first screen, when launcher loads for the first timeSunny Goyal2016-07-281-18/+39
| | | | | | | | | | | | Bug: 29007436 Bug: 27705838 Change-Id: I95891d0bad19a67985b689bb96d6068dcd85004a
* | Check package name and user handle in onShortcutsChanged().Tony Wickham2016-07-281-3/+5
|/ | | | | | | | | Otherwise shortcuts with the same id would be updated, even if they were in different packages. Bug: 28980830 Change-Id: Ideefe3aaac83af38c03a38d821bac192ae55fe67
* Removing shadow and badging from the icon which is shown in the menuSunny Goyal2016-07-261-2/+17
| | | | | | | These are added as soon as the icon is added to the workspace Bug: 28980830 Change-Id: I725d2ee8994324f09d9ecf7bbbb0090a7ceb5769
* Fixing missing user check when updating shortcuts for an appSunny Goyal2016-07-201-6/+10
| | | | Change-Id: I889c555d3402fd71098af29b78eb6d959a071080
* Add status to DeepShortcutManager api calls.Tony Wickham2016-07-131-2/+11
| | | | | | | | | This way we can handle SecurityExceptions differently. For instance, if a SecurityException causes us to fail to get details for pinned shortcuts, we keep the pinned shortcuts in the database so that they will be loaded next time launcher has the correct permissions. Change-Id: I1102fce612ade10ad7f577b44a99c8cf087d5ccd
* Adding logic to pull in workspace data from another Launcher3 basedSunny Goyal2016-07-091-1/+9
| | | | | | | | provider. This allows OEMs to keep the user's homescreen intact while changing the default home app package. Bug: 28536314 Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
* Call bindDeepShortcuts() from runBindSynchronousPage().Tony Wickham2016-06-301-15/+13
| | | | | | | Otherwise Launcher's copy of the deep shortcut map is cleared when Launcher is re-created, such as on rotation, so the UI won't show shortcuts. Change-Id: I3bb6a904762dc4661cc2b5da28485e4bf778c9e7
* Surround shortcut API calls with try-catch.Tony2016-06-271-4/+1
| | | | | Bug: 29732661 Change-Id: Iba96eedab67e7715f34139c64f96b1a81ba30ea5
* Making some shortcut manager calls protected by MR1 version checkSunny Goyal2016-06-231-3/+3
| | | | Change-Id: Ifdfa95a58aa18a825c1838c61055928dbe0ea3be
* Merge "Add support for launcher shortcuts." into ub-launcher3-calgaryTony Wickham2016-06-221-24/+272
|\
| * Add support for launcher shortcuts.Tony Wickham2016-06-211-24/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This CL has no UI but provides the necessary backing for one. - Adds new item type: ITEM_TYPE_DEEP_SHORTCUT, to distinguish from ITEM_TYPE_SHORTCUT. We can reconsider these names. - Adds ShortcutCache, using LruCache for up to 30 dynamic shortcuts (pinned shortcuts are always cached in a HashMap). - DeepShortcutManager queries for shortcuts and other things like pin them. In a future CL it will use the cache, but for now it simply makes an RPC for all queries. - LauncherModel maintains counts for pinned shortcuts, pinning and unpinning when counts reach 1 or 0, respectively. - LauncherModel maintains a map of components to lists of shortcut ids, which Launcher gets a copy of after it is changed in the background. This will allow us to know how many shortcuts an app has immediately, and query for details as the UI is animating. Change-Id: Ic526f374dd10d72a261bae67f07f098fca8d8bca
* | Adding some tracing sections around launcher startupSunny Goyal2016-06-201-0/+7
|/ | | | | Bug: 29007436 Change-Id: I53afd9130a2dc70a2223f1623e862faf44370f26
* Adding a flag (enabled by default) to remove the all-apps button.Sunny Goyal2016-06-171-3/+2
| | | | | | | All apps can still be opened by clicking the caret. Bug: 29398447 Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
* Adding a DB update path to handle the QSB position changeSunny Goyal2016-06-151-18/+7
| | | | | | | | > Renamed the id of 1st screen to 0 and making space for the QSB by running the grid migration task. > Added a feature flag to easily disable the QSB-in-workspace behavior Change-Id: Ie3369f0d4433d916e9d6215d414770d4333f3e26
* Moving the QSB to the workspace grid.Sunny Goyal2016-05-271-9/+6
| | | | | | | | | | | | The QSB will only be resent on the first screen of the workspace covering the full width of the first row. If will not be movable. The first screen of the workspace will not be movable. The searchDropTargetBar no longer contains the QSB (it can be renamed in aseparate cl). Refactoring all QSB related logic by moving it to a custom view inflated only using xml. Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
* Refactoring out grid occupancy management in a separate classSunny Goyal2016-05-271-57/+31
| | | | Change-Id: I37a830c0f2eb0a0dd4f5fc78fa29127cb18cb3c2
* Removing logic for workspace migration from Launcher2Sunny Goyal2016-05-231-25/+8
| | | | Change-Id: I8a121d74862f665c58406f8d5c7eb1263e7ccff3
* Rearranging the provider checks to avoid packagemanager lookupsSunny Goyal2016-05-181-29/+1
| | | | | | | whenever launcher starts Bug: 28737985 Change-Id: I3ce3e2741b3224fa5419d7ceca496e1bb91f065c
* instead of unbinding items from the loader, unregistering listenersSunny Goyal2016-05-171-40/+5
| | | | | | | in activity.onDestroy() Bug: 28740269 Change-Id: I6bf2ad6aca43970fd10cfbcc113e609c227e07bf
* Removing icon_type columnSunny Goyal2016-05-111-1/+0
| | | | | | | | | Icon type is not used consistently. It is used initially during the loader. Afterwards, we save both the icon and resource to the db. Instead of changing the logic to always read the shortcut-resource first, and fallback to the bitmap if the resource is not available, always write the bitmap to DB whenever the shortcut is edited. Change-Id: I0ea5e88f8904bd3250ca669220b3e5d6aeef1bfd
* Adding a utility class for persistant logging.Sunny Goyal2016-05-091-16/+11
| | | | | | | The logs are kept for at max 48 hours. It uses two log files and switches between the two based on the day of the year. Change-Id: I9a99499b3445a62f29f62a5cd13db20b1783bcd3
* Removing dependency on getApplicationInfo method added in NSunny Goyal2016-04-071-17/+23
| | | | | | | This method is goiing away. We don't need this method anyway since LauncherActivityInfo already has the information Change-Id: Ic6afa1df14958b894925d730e01a2e2d2a6fb98c
* Fixing folder icon not getting redrawn when the contents changeSunny Goyal2016-04-061-1/+1
| | | | | | | | | | | | > Removing parent from ItemOperator as inconsistant values were being passed in workspace and folderPagedView > Fixing itemChanged causing multiple redraws, by passing a 'animate' parameter to explicitely request animation Bug:27740161 Bug:28015426 Change-Id: Ide7b266bde9aad5f450a3f808a59182fe01a5110
* Merge "Fixing bug where folders on the first screen and hotseat are not ↵Sunny Goyal2016-04-061-62/+9
|\ | | | | | | registered by the Launcher if there are folders on other screens" into ub-launcher3-calgary
| * Fixing bug where folders on the first screen and hotseat are notSunny Goyal2016-04-021-62/+9
| | | | | | | | | | | | | | | | | | registered by the Launcher if there are folders on other screens Instead of maintaing a static map of folder items, searching it in the workspace during item removal. Change-Id: I8aa93b3aa1d0bd812204471e3103f4bd29d1cd3d
* | Listen on new broadcasts for profile changes.Rubin Xu2016-04-041-1/+2
|/ | | | | | | The change is due to API review comments on the platform side. Bug: 27532254 Change-Id: I44133fbb5c3ee13d0523a72b25d2e1c5d1eba6a0
* Merge "No need to differentiate package event into app or updated based on a ↵Sunny Goyal2016-04-011-16/+2
|\ | | | | | | package is being updated or not" into ub-launcher3-calgary