summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Add support for work profile promise icons.Jon Miranda2019-10-241-2/+2
| | | | | | | | | | | | - We were not getting callbacks for sessions created under work profile. - We did not pass in the user when creating the workspace item infos. - Added check for if app is installed before adding item to workspace to prevent any stale promise icons. This seems to happen when uninstalling and then immediately reinstalling an application. Bug: 141556707 Change-Id: Ie0320f3ede70b6c7543cb60c3b95a2fe398eecb5 Merged-In: I2db2d8da449c37eb248a59fbc9e7b517f50855c1
* migrate custom widgets in comply with plugin frameworkPinyao Ting2019-09-251-4/+0
| | | | | | | Bug: 139888225 Change-Id: I8a3d0fe2689ad5ba24b19309728bbad0b6287f71 Merged-In: I8a3d0fe2689ad5ba24b19309728bbad0b6287f71 (cherry picked from commit c7a6c2979cc063dd493316d0d19cbc0501a23a64)
* Merge "Add Logs to track app uninstall and icon removal" into ↵Samuel Fufa2019-09-161-1/+2
|\ | | | | | | ub-launcher3-qt-future-dev
| * Add Logs to track app uninstall and icon removalSamuel Fufa2019-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | Some users are affected by a bug that keeps orphaned app icons after a package is uninstalled. Since we are unable to pinpoint to what exactly is causing this, we're adding logs so we could tell where exactly things are failing. Bug: 124817089 Change-Id: If168935115a7d323fd60c2b19426c1dbd43dbce3
* | Fix failing test testPromiseIcon_addedFromEligibleSession.Jon Miranda2019-09-131-1/+1
|\ \ | | | | | | | | | | | | | | | am: d6ae55d968 Change-Id: I733da069b9de54d11f8e736ccd84eca610d65f91
| * | Fix failing test testPromiseIcon_addedFromEligibleSession.Jon Miranda2019-09-121-1/+1
| | | | | | | | | | | | | | | | | | Test: Ran tests on device Bug: 140819614 Change-Id: I8ee6836d3a06f315518aa4829c8e2ddf8cf5f74d
* | | [DO NOT MERGE] resolve merge conflicts of ↵Jon Miranda2019-09-121-0/+29
|\| | | |/ |/| | | | | | | | | | | cfdeb0620579127e2b0bba74b616b281434ffca7 to ub-launcher3-qt-future-dev Bug: None Test: I solemnly swear I tested this conflict resolution. Change-Id: Id60ae2c08ec7aca6780fec1f873920f3857d598e
| * Fix bug where existing icon is removed when install session is abandonded.Jon Miranda2019-09-111-0/+26
| | | | | | | | | | | | | | | | | | | | - Ensure we only add promise icons for apps that aren't already installed to our internal list of session ids. - Ensure we only remove promise icons created from the install session when that session is abandonded. Bug: 140819614 Change-Id: I3c93865b5e96a9c7a160154b45a38eb90ac9d183
* | Moving various common executors to a single locationSunny Goyal2019-08-201-36/+10
| | | | | | | | Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
* | Separating apps list callback from model callback and simplifying various eventsSunny Goyal2019-07-251-43/+3
|/ | | | | Bug: 137568159 Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
* Disable fake landscape UISunny Goyal2019-06-191-1/+2
| | | | | Bug: 131360075 Change-Id: I21e0a6cdf332e2d16821c589f9630c254b595770
* Fixing ANR when loader task could run while helding the lock objectSunny Goyal2019-05-291-13/+11
| | | | | | | | | During AppWidgetRestoredReceiver, we call forceReload from worker thread which in turn starts the loader while holding mLock. This causes other loader calls on UI thread to cause ANR Bug: 133651528 Change-Id: Iabf983c4319bd6e6ef88e74fe6076289294454f9
* Remove tracing for fixed bugsvadimt2019-05-011-7/+0
| | | | | | Bug: 129434166 Bug: 131170582 Change-Id: Ia9b356594001d96c69ffbb7f8b767b2f54ed5feb
* Add tracing for non-loading modelvadimt2019-04-231-0/+7
| | | | | Bug: 131170582 Change-Id: Iffc3f5f38ce896c4cfd2df55bedcf43e2018a58f
* Removing ShortcutInfoCompat and directly using ShortcutInfoSunny Goyal2019-04-221-4/+4
| | | | Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
* ShortcutInfo renamed to WorkspaceItemInfoSunny Goyal2019-04-161-7/+7
| | | | | | Will get rid of ShortcutInfoCompat in a follow up cl Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
* Fixing launcher UI not reapplied properly when IDP changed as a result of ↵Sunny Goyal2019-03-061-52/+0
| | | | | | | | | | | | display changes > Removing unnecessary check when binding model data as its safe to bind old data, we should just not persist it (that check is already there in model writer) > Adding additional check in model bind to skip old bind if there are multiple binds Bug: 126259547 Bug: 118441555 Change-Id: Ic250d2af13797d3e70c6e1fc70da65ebe6ab8d70
* Fixing some Launcher crashes because of using old model data evenSunny Goyal2019-03-051-14/+15
| | | | | | | | after launcher has reloaded Bug: 126289691 Bug: 124288578 Change-Id: Id7fb29716241a13f4e03ee0fc0e879523de4f878
* Merge "Removing diagnostics" into ub-launcher3-masterTreeHugger Robot2019-01-301-15/+0
|\
| * Removing diagnosticsvadimt2019-01-251-15/+0
| | | | | | | | | | | | | | | | Now that b/117332845 is fixed Bug: 117332845 Change-Id: If8c137b9c7cc386dfc5b5af4b81a3efbfa33f770 Tests: None
* | Changing min sdk to 25Sunny Goyal2019-01-291-6/+4
|/ | | | Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
* When undoing a removal, always return to the page it came fromTony2018-12-211-3/+11
| | | | | | | | | | | | | | We were already returning to the current page, but this wasn't always right, e.g. when removing the last item on the last page. So now we mark the page the item was removed from, and bind that page first when undo is clicked. This also addresses an issue where we incorrectly returned to the first page if currentPage = INVALID_RESTORE_PAGE, which happens if there are no items on the first page. Bug: 118846684 Change-Id: I4ec1f64b24ba1cc308ce08bfb3111b5981fae99b
* Bye bye workspace screens tableSunny Goyal2018-12-101-66/+1
| | | | | | | | | | | | | Removing a separate table for workspace screens. List of screens are automatically parsed using the items in the favorites DB. Order of the screen based on the screen id and rearranging screens is no longer supported. In case the screens need to be rearranged, all the items in the favorites db will need to be updated with new screen ids. This makes backing up the DB (in the same database) easier as only one table needs to be duplicates. Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
* Moving come tests to RoboelectricSunny Goyal2018-11-121-2/+4
| | | | | | > Fixing resource loading in robo tests Change-Id: Id5b8a0e4916a2a200da7a41b03f19846834beb1f
* Deepshortcuts - only keep the per package shortcut count in memory.Zak Cohen2018-10-221-2/+2
| | | | | | | | | | Change to only keep the per Activity shortcut count in memory, not the list of ids. The full shortcuts are loaded at long press time so saves memory. Bug:117239104 Test:Manual and ran instrumentation tests Change-Id: Iee974ecba2c977216be4f078396ceed22b931f5d
* Setup make icon-loader libraryHyunyoung Song2018-10-191-1/+1
| | | | | | | | | Bug: 115891474 Test: make -j10 icon-loader Next step: Launcher will depend on icon-loader in next CL Change-Id: I797ddb857cf8be79f3be6ca2f174c593ca3713a5
* Improving tests to fix testBindNormalWidget_withoutConfig, and beyondVadim Tryshev2018-10-091-0/+5
| | | | | | | | | | | | | | | | 1. Make waitXXX methods fail if the condition diesn’t turn true. 2. Waiting for loading to complete in tearDown instead of reloading the model 3. Avoiding waiting for load-complete where loading didn’t start 4. Disabling last test in AddConfigWidgetTest 5. Waiting for loading to complete inside setupAndVerifyContents(), not outside 6. Unifying how we wait for loader to complete 7. Adding more logging Bug: 117332845 Test: running all Nexus tests Change-Id: I3070e1ac2b9161179cc3e0800b0cd8162807389a
* Converting long item IDs to intSunny Goyal2018-10-081-16/+15
| | | | | | | | > Items ids were already being typecasted to int when being bound on the UI > Using a consistent type allow better use of platform data-structures > Adding IntArray and IntSet as a replacement for various Collection classes Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
* More temporary logging to diagnose testPendingWidget_autoRestoredVadim Tryshev2018-10-051-0/+5
| | | | | | | | And waiting to loader to finish to improve determinism. Bug: 117332845 Test: running Launcher Change-Id: Icdfce969b61f8ceb952a2715037783458da4d4c4
* Adding temporary logging to diagnose testPendingWidget_autoRestoredVadim Tryshev2018-10-051-0/+5
| | | | | | | | This test fails Bug: 117332845 Test: running Launcher Change-Id: I300c856992b3d1f559c4c31525a45e2c4a960f11
* Caching widget labels in icon cache to avoid lookup at startupSunny Goyal2018-09-281-0/+13
| | | | Change-Id: Ie026ee47905454bd70e774d422cd7fe142aec7e2
* Move IconNormalizer/ShadowGenerator/LauncherIcons to icons packageHyunyoung Song2018-09-261-1/+1
| | | | | | | | | Bug: 115891474 Sending out the package name changing CL first before I make LauncherIconsHandler and tests around it. Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
* Removing additional rpc due to icon cache updateSunny Goyal2018-09-211-0/+1
| | | | | | | | | | When launcher loads, it fetches the list of apps twice, once for loading all-apps and again for updating icons. Instead reusing the previously fetched apps list. Also moving the icon loading in a separate package for further generalization Change-Id: Ibd2dae56e6027a31b633da030bc6b43a90b27e1b
* Add undo snackbar for deleting itemsTony Wickham2018-08-301-1/+6
| | | | | | | | | | | - Add methods to ModelWriter to prepareForUndoDelete, then enqueueDeleteRunnable, followed by commitDelete or abortDelete. - Add Snackbar floating view - Show Undo snackbar when dropping or flinging to delete target; if the undo action is clicked, we abort the delete, otherwise we commit it. Bug: 24238108 Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
* Migrating to android-xSunny Goyal2018-08-141-1/+2
| | | | Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
* Moving some abstract classes to interfaces, to better use java-8 featuresSunny Goyal2018-07-091-9/+6
| | | | Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
* Persist the updated item to DB when a shortcut info is badged for the first timeSunny Goyal2018-06-211-0/+1
| | | | | Bug: 110016648 Change-Id: I8e36b80e9c893de91bce208ceac93a3fcdb557d5
* Fixing bug when model was not reflected properly on the UI.Sunny Goyal2018-03-051-2/+5
| | | | | | | If launcher submits a job, and then reloads before the job is executed, the correct model is not reflected on the Launcher. In that case, we simply rebind the launcher Change-Id: I380242a4de13e7b2bc326d1a076f0a974435999c
* Ensuring that all the pending tasks are runSunny Goyal2018-02-221-5/+1
| | | | | | | | before marking the ViewOnDrawExecutor as completed. Also fixing model writer not updated on rotation Change-Id: I5ecd7ac865b939ffa4c02afe892bd773d9f275c3
* Revert "Revert "Synchronizing loader preload to avoid launcher getting stuck ↵Winson Chung2018-02-161-0/+9
| | | | | | | | | | in loading state,"" This reverts commit 73aa3025c0001e58c57d009053dee03c0108ca3e. Reason for revert: Post-drop revert Change-Id: Ife752d26e07d9c064c938ff8d33d40457b54217a
* Revert "Synchronizing loader preload to avoid launcher getting stuck in ↵Winson Chung2018-02-161-9/+0
| | | | | | | | | | loading state," This reverts commit a1b4911e2606c5b9f36d0692f0bd0856c6e24683. Reason for revert: Temporary revert for NL build Change-Id: I81527681bd00d49e590a99e238f4d57e5a619d16
* Synchronizing loader preload to avoid launcher getting stuck in loading state,Sunny Goyal2018-02-151-0/+9
| | | | | | | | | | | | | | | | | | which could be caused by the following sequence of events 1) Starts preload => execution moved to background thread a) check if loader is running ... execution moved to ui thread 2) Launcher starts 3) Cancels any running loader and starts a new loader .... Execution on background thread b) Cancels any running loader and starts a new loader Synchronizing (3), and [a, b] under same lock would avoid this case Bug: 73399920 Change-Id: I6b01f797fd6f4a2e5b3c078bb374ad40fcc311c8
* Preloading the LauncherModel in case launcher diesSunny Goyal2018-01-311-5/+1
| | | | Change-Id: Ibe529f31e96c645d45d51b9f3bf6c21b76b41254
* Making LauncherIcons thread safeSunny Goyal2018-01-091-1/+3
| | | | | | Creating a pool of LauncherIcons so that they can be used from multiple threads Change-Id: Idc7b5ddb47b6e338a5389f3c4faa6f63de108c72
* Dominant color is part of icon cacheSunny Goyal2018-01-031-1/+1
| | | | | | | | | > Calculating extracted color during icon generation and storing it in model and DB > Removing unused logic avoid various types of badge rendering > Icons are badged with extracted colors, while folder is badged with theme color Bug: 35428783 Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
* No more waiting around for resumeSunny Goyal2017-12-191-18/+9
| | | | | | | | Apply model updates as son as they arrive instead of waiting for onResume. Various workspace items do not use any configuration dependent resources. For Widgets, we wait until the host starts lietening before inflating the actual view. Change-Id: Icb2f5e5940c1ce6c27062ccd34eff87e80af5ab1
* Launcher state management cleanupSunny Goyal2017-10-171-1/+1
| | | | | | | | | | > Removing Widgets and related states > Fixing different durations being used when opening/closing all-apps > Removing some unnecessary object allocations when changing state without animation > Differentiating widget bootm sheel and full sheet in logs Bug: 67678570 Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
* Converting widget panel into a floating viewSunny Goyal2017-10-131-1/+2
| | | | | | | | | | | | | > The widget panel is only inflated when needed > Using the swipe up/down interaction for widgets tray > Removing additional view wrappers from all-apps > Widget tray is preserved across activity recreation > Launcher no longer has WIDGET state, the actual code around the states will be removed in a follow-up cl Bug: 67678570 Bug: 67585158 Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
* Moving install queue updates to worker thread.Sunny Goyal2017-10-061-3/+2
| | | | | | | | This avoids acquiring a lock for upating the sharedPrefs during onResume as all the logic runs on a single thread. Bug: 67305604 Change-Id: I1bbea382da9fafb403b4e9508f393f78db28478d
* Removing extraction service and palette api dependencySunny Goyal2017-09-291-3/+0
| | | | Change-Id: I30ad1a1462a97b6bc03f8e386ae3058c7fe022e5