summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Integrating suggested app by handling new status flags for shortcut items.Mario Bertschler2017-08-241-1/+1
| | | | | | | | Guarded via feature flag SUGGESTED_APP. Bug: 62483883 Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
* Promise icons don't support popupTony2017-06-021-1/+3
| | | | | Bug: 62253847 Change-Id: I1123f3d1efad65e74957b1404b5b2c95ba392713
* Launcher3: fix app shortcuts for suspended appsCharles He2017-02-211-1/+2
| | | | | | | | | | | | | | | | | | 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
* No more UserHandleCompatSunny Goyal2016-12-151-14/+13
| | | | | Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
* Changing DeepShortcutManager to have a singleton contructor insteadSunny Goyal2016-11-211-1/+13
| | | | | | | | | | 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
* Updating version check method namesSunny Goyal2016-11-021-6/+6
| | | | Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
* Removing some TODOs with proper system APISunny Goyal2016-09-301-9/+4
| | | | Change-Id: I0d0e667cd6af8a7b9dbf3d0fd417f009ae402519
* Reloading workspace when the shortcuts permission changesSunny Goyal2016-08-101-0/+12
| | | | | | | | | > Check for permission on every onResume > If the permission is different than last known permission, reload and rebind workspace. Bug: 30789422 Change-Id: Idfa445815e29e2336505779545507d106b33a253
* Handling IllegalStateException which can be thrown by the system when the ↵Sunny Goyal2016-08-011-5/+5
| | | | | | | user is locked Bug: 30411561 Change-Id: I0d7fc0aaecba01b1aaac95b98654f6e3ee090ce8
* Adding quiet mode support for shortcutsSunny Goyal2016-07-291-2/+2
| | | | | | | | | | | > 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
* Implement ranking for shortcuts.Tony Wickham2016-07-191-3/+5
| | | | | | | | | | | - Manifest shortcuts are closest to the original icon, in rank order, followed by dynamic shortcuts in rank order. - Also prevent pinned shortcuts from showing in container if they aren't also dynamic (only manifest and dynamic show in container). Bug: 29822383 Bug: 29946657 Change-Id: I5cdb2ef3700daedca01987f64c245beb3f4aa5ee
* Address comments on original shortcuts UI CL (ag/1061538).Tony Wickham2016-07-131-2/+1
| | | | | | | | - Only add shortcut touch listener to APPLICATION item types, not SHORTCUT. - Load shortcuts on LauncherModel worker thread instead of using AsyncTask. - Avoid a couple of unnecessary object allocations. Change-Id: I31b911b91df71335542545602fe137e270c745d7
* Add status to DeepShortcutManager api calls.Tony Wickham2016-07-131-17/+25
| | | | | | | | | 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
* Use reflection to call LauncherApps.startShortcut().Tony Wickham2016-07-011-2/+10
| | | | | | | This is necessary because it now returns void instead of boolean, but we don't yet have the latest SDK with this change to compile against. Change-Id: Ie4ca718bbe828fd9addfaf003a74b35d32410891
* Long-press on an app to reveal its shortcuts.Tony Wickham2016-06-291-0/+7
| | | | | | | | | | | | | | | - Add ShortcutsContainerListener to icons on workspace, folders, and all apps. This handles long-press and forwards following touches to the DeepShortcutsContainer that is created. - Drag over shortcut before lifting finger to launch it. - Shortcuts are rendered in pill-shaped DeepShortcutViews, which are inside DeepShortcutContainer on DragLayer. - The shortcut container orients above or below the icon, and left or right-aligns with it. Biases for above + left-align. - Long press a DeepShortcutPill to drag and pin it to the workspace. Bug: 28980830 Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
* Surround shortcut API calls with try-catch.Tony2016-06-271-8/+33
| | | | | Bug: 29732661 Change-Id: Iba96eedab67e7715f34139c64f96b1a81ba30ea5
* Making some shortcut manager calls protected by MR1 version checkSunny Goyal2016-06-231-30/+72
| | | | Change-Id: Ifdfa95a58aa18a825c1838c61055928dbe0ea3be
* Add support for launcher shortcuts.Tony Wickham2016-06-211-0/+136
- 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