summaryrefslogtreecommitdiff
path: root/src/com/android/launcher3/model/LoaderTask.java
AgeCommit message (Collapse)Author
2021-11-24Fix ClassCastException in QuickstepModelDelegateSchneider Victor-tulias
- Added a casting check as an immediate fix to b/173838775 - Added logging to help debug the corrupt state where an item of type other than FolderInfo is used as an other item's container. - Added LoaderMemoryLogger for adding large logs that are only conditionally printed. Bug: 173838775 Test: manually checked logs Change-Id: I9491cb421b9fb807d5fb110b04ad069481de768f
2021-10-05Merge "launcher: create more space options" into sc-v2-devThales Lima
2021-10-05launcher: create more space optionsThales Lima
The grid doesn't have a constant space between cells anymore, so we need new attributes for the different spaces in different situations. Bug: 191879424 Test: checking cell size and extra space in dumpsys Change-Id: I4b6aae5b3fea281490c00cd13d0cd3a25372f21b
2021-10-04Support drag/drop on search resultssfufa@google.com
Bug: 199341710 Test: manual Change-Id: I9879c2a3769d4f930ab0289d2f26e4757971549d
2021-10-01Merge "Group weather widgets under the widget category" into sc-v2-devSteven Ng
2021-09-30Group weather widgets under the widget categorySteven Ng
Test: manual (see video in bug) and added PackageUserKeyTest Also tested pending conversation widget to ensure the right icon is shown. Fix: 201062480 Change-Id: If23c28bd93c54fb1747648309ab3c238a1810902
2021-09-29Improve all apps loading times.Schneider Victor-tulias
Updated loadAllApps to load all required icons in a series of bulk sql queries. This reduces the cost of SQL lookups (up to two lookups per user, rather than one lookup per icon) Bug: 195674813 Test: Added all icons to workspace, added duplicate icons, added icons for same component name from different users Change-Id: Ifda8980386084999c53d7f881e8967be0d57d263
2021-09-15Improve workspace loading times.Schneider Victor-tulias
Updated loadWorkspace to load all required icons in a series of bulk sql queries. This reduces the cost of SQL lookups (up to two lookups per user, rather than one lookup per icon) Bug: 195674813 Test: Added all icons to workspace, added duplicate icons, added icons for same component name from different users Change-Id: I56afaa04e7c7701f0d3c86b31c53f578dfa73fe6
2021-09-15Add tracing to help in launcher load time profiling.Schneider Victor-tulias
Bug: 195674813 Test: None Change-Id: I895a64bbba515ce7b7df8d093d40e0a5b6056d2e
2021-08-13Remove widget panelAlex Chau
- Remove all usage of LEFT_PANEL_ID and fixed left panel code - For preview renderer, load screen 0 + screen 1 instead - Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162) - Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162) Bug: 175939730 Test: manual and TaplTestsLauncher3#testWorkSpace Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
2021-08-04Merge "Don't delete widgets that violate min size requirement" into sc-dev ↵Steven Ng
am: 5fc53cbc22 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15455163 Change-Id: I2783668d3315537fd64b2a6175064abbcbbe132f
2021-08-04Don't delete widgets that violate min size requirementSteven Ng
Test: Manual Bug: 194766124 Change-Id: I4713e65e27da23d833bb60fb556ae8924a63e305
2021-07-28Removing GridMigrationTask-v1 since it has been disabled for a whileSunny Goyal
Also removing some data migration support Bug: 194937047 Test: Presubmit Change-Id: I392a5f6e49ec170f63056a7664de47229896f390
2021-07-22Removing UI dependency from LauncherModel in case of 2-panel layoutSunny Goyal
Bug: 175939730 Bug: 192431856 Bug: 185515153 Test: Manual Change-Id: I8baa1cf9e5a8a04d5b8bc38c1f4b0755265cd8a9
2021-07-15Binding Taskbar directly from Launcher modelSunny Goyal
This allows taskbar to be loaded even in case of 3P Launchers and removes dependency on LauncherActivity lifecycle Bug: 187353581 Bug: 188788621 Test: Manual Change-Id: I5a0988e0697b41677d4c58f0213aef14ec0c0972
2021-06-30Merge "Log widgets source." into sc-dev am: f9acf1d5d4Yogisha Dixit
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14690879 Change-Id: I2fa39b66ca31549f7754657b7d3bde6bdf8a5f59
2021-06-30Log widgets source.Yogisha Dixit
Test: manual (1) Upgrading to new DB version is successful (no errors thrown in logcat) (2) Widgets that were added with the old DB version have CONTAINER_UNKNOWN as their source container (3) Widgets that are added with the new DB version still log source container after reboot Bug: 185778648 Change-Id: Iaa38f0be6bc4cb0d29842f9a2ea0d08de000c930
2021-06-29Merge "Use category icon for pending conversation widgets" into sc-dev am: ↵Steven Ng
d35dcdec05 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15142493 Change-Id: Id2b6a1429d1b8f84e901fffc0e669c357888d9be
2021-06-29Use category icon for pending conversation widgetsSteven Ng
Fix: 192333050 Test: Manual Change-Id: Ie3895cd4747f1bec1c8ca9af82347bb0eafa7415
2021-06-18Merge "Log widget dimensions before deleting a widget violating min size" ↵Steven Ng
into sc-dev am: 21780405ac Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15015050 Change-Id: I8e2b4160bef59aa17f131a384642975eb0bfbd2c
2021-06-17Log widget dimensions before deleting a widget violating min sizeSteven Ng
Test: N/A Bug: 191223844 Change-Id: Id909ee19be1a1c7d70a09643422d9ed62a2d82a9
2021-05-24Add two panel home support for page binding logicAndras Kloczl
There's a logic which prioritizes the binding for the current page and defers the other pages' binding. If two panel home is enabled, we want to bind both pages together. LauncherPageRestoreHelper has been created to contain the logic for persisting restoring and calculating which pages to load immediately. Test: manual + run LauncherPageRestoreHelperTest robo test Bug: 174464691 Change-Id: I57ac3f7150303b95b272e922f44bda26f9d5ce2a
2021-04-19Additional debug logging to triage shortcut related issue.Pinyao Ting
Bug: 185614138 Test: flash and verify logs shows up in bugreport Change-Id: Ie7b45b5ffbd9ee2ed64f478647779e240f3255a7
2021-03-02Moving data sanitization before bindSunny Goyal
Data sanitization changes the launcher model data, which makes it out of sync with what Launcher is displaying. This would lead to widgetsIds getting deleted when they are created by Launcher on UI thread, but have not yet been updated in the model Also clearing all ghost widgets on every load. This would remove the flaky behavior where widget update depends on folder and other icons getting removed Test: Presubmit Bug: 181680555 Change-Id: I3cce69383d9d92a283c5197c3f99fbb539d93dbb
2021-03-02Merge "Move widget files into widget folder + add tests." into sc-devYogisha Dixit
2021-03-01Only fetching relevant widget info during first passSunny Goyal
This avoids loading resources for allwidget providers when they are not added to homescreen. Test: Verified on device Bug: 180867488 Change-Id: If9adde8eb035ecac75dc4e3e37cd3f0f526865e5
2021-03-01Move widget files into widget folder + add tests.Yogisha Dixit
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs. Test: Automatic: Ran all robolectric tests in launcher3, Manual: Added a widget, edited the widget, removed the widget Bug: 179807199 Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-01-28Fix incorrect launcher loading.Schneider Victor-tulias
Apps that were installed and downloading incrementally would be shown as fully downloaded on reboot. Updated LoaderTask and AppInfo.updateRuntimeFlagsForActivityTarget to account for this. Fixes: 178528867 Test: manual with hardcoded values Change-Id: I088e43ae886b4157bad9f4fa8d40373cf7f8235a (cherry picked from commit 6d0fec8ac774679eeed95a623bfda863db66fd66)
2021-01-12Revert "Revert "Add UI updates for incremental app installs.""Schneider Victor-tulias
This reverts commit 229497d1820f49450687bbc558041df97d0bf779. Reason for revert: Patching bugs Fixes: 176901235, 176992421, 176884453 Test: manual Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-07Revert "Add UI updates for incremental app installs."Schneider Victor-tulias
This reverts commit 84269d349d093b6b0bd2b68e2306f7e0475cd4f5. Reason for revert: causes b/176884453 and b/176992421 Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-05Add UI updates for incremental app installs.Schneider Victor-tulias
1. Changed Preload Icon UI to be grayscale while the app is not startable. 2. Added progress bar for when app is installed but still ownloading. 3. Updated Preload Icon progress and click handling to use new incremental api. Progress bar color updates will follow in a separate CL. Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing Bug: 171008815 Test: manual Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2020-12-10Synchronizing model data accessSunny Goyal
Test: Presubmit Bug: 173328873 Change-Id: Ifc1724e17ebfa2ee5f21bb3f272986b8a14fdbc1
2020-12-05Disable Database overwrite upon restorePinyao Ting
Launcher overwrites user's favorites table (icons in WorkSpace) upon new install session from Play Store with install reason being restore. The overwrite was introduced in the attempt to mitigate failed restore session due to asynchronous nature of user profile restore, but it has been causing general instability in backup and restore. Going forward Launcher should be moving away from table overwrite approach, this will be implemented in b/148284747. Bug: 171774227 Test: manual Change-Id: I91221544dbaeb42224ce9f595906b6d9f0e4aa89
2020-11-11Include more error logging for widget restorePinyao Ting
Bug: 171774227 Test: manually tested complete backup & restore flow Change-Id: Ieb4b39d80a24b4dff377ee74d24d9010acd0daca (cherry picked from commit ae1997b9d51f996dff41bd792a33176a112b1ef2)
2020-10-27Integrating snapshot logging in LauncherSunny Goyal
> Workspace snapshot is logged when the workspace loads (at most once a day) > Removing unnecessary thread jumping when logging folders > Preference snapshot is logged on process start and whenever something changes Change-Id: I93767de89b11522d843c0e8300d1f108c78f6d90
2020-10-15Fix the issue where shortcuts are removed in minimal device modePinyao Ting
When loading the workspace, Launcher pins/unpins shortcuts in comply with the loaded workspace. Since minimal device mode creates a mostly empty workspace, existing shortcuts are getting unpinned as a result. To mitigate the issue this CL compares the db name and only invoke sanitizeData when it matches the one defined in InvariantDeviceProfile. Bug: 170611866 Test: manual 1. add some deep shortcut in workspace (e.g. long tap on chrome, drag "incognito tab" to workspace) 2. opt-in to sunshine fishfood (g/sunshine-teamfood) 3. enable bedtime mode with minimal device in Settings -> Digital Wellbeing -> Show Your Data -> Bedtime mode -> Customize -> minimal device 4. toggle bedtime mode, wait for apps in minimal device to show, then toggle off bedtime mode 5. verify the deep shortcut still exist Change-Id: Ie18216ecb288e7481aa2404c4cb3ea418aee85cb
2020-09-30Remove widgets that no longer fit the workspace in their current spans.Jon Miranda
This can happen when display size changes. We compare span sizes of widget in the db to the min sizes of the widget in the current display size. If the widget can no longer fit in its existing spans, we remove it. Also update test widgets to have minWidth/minHeight of 1dp. This ensures that the spanX, spanY, min* values remain consistent between different test devices. Bug: 168818961 Change-Id: I723372e4582658f78b2f23ced9073cb77977a6b8
2020-09-29Revert "Remove widgets that no longer fit the workspace in their current spans."Jonathan Miranda
This reverts commit bf6e8ffbf030b6d419b808c28335bf8a8724e9bc. Reason for revert: broken tests Bug: 141313472 Change-Id: I1e93e21e2c6618dea6cd099a46c9b9d2ab3ab81c
2020-09-23Remove widgets that no longer fit the workspace in their current spans.Jon Miranda
This can happen when display size changes. We compare span sizes of widget in the db to the min sizes of the widget in the current display size. If the widget can no longer fit in its existing spans, we remove it. Bug: 168818961 Change-Id: I6b095d2eeaeda95bfa91baec89cb54660695b60b
2020-09-10Only load the first page in grid previewTracy Zhou
Bug: 160662425 Test: manual (verified correctness) Change-Id: I9dc3b7d7b84924ffb588470d4b6b20431a62b6cd
2020-08-27Removing MultiHashMap and using java-streams insteadSunny Goyal
This makes it easier to choose different collection implementations Change-Id: Ic44e128b7478fcbbb1b546027685e058945af3f9
2020-08-17Moving hotseat predictions to ModelDelegateSunny Goyal
Bug: 160748731 Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-11Caching last predictions and loading it with modelSunny Goyal
Adding support for persisting itemInfos on disk. This uses a separate xml file. Unlike prefs, it does not keep the items in memory and is just a wraper over reading/writing a file. Bug: 160748731 Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
2020-08-04Moving data sanitization to the end, as it need not blockSunny Goyal
the loading Change-Id: If1a966e546127efafd0afd7e3ca771f63a1fa544
2020-07-29Moving all-apps predictions to Launcher modelSunny Goyal
Predictions are loaded and managed by Launcher model and follow the model lifecycle. They are then bound to the callback which handles the UI Bug: 160748731 Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
2020-07-23Adding support for storing container based item list in the modelSunny Goyal
These items get updated automatically during various model tasks. Also simplifying the pinned shortcut state, by calculating the list of ppined shortcut on demand, instead of storing a refCount. Bug: 160748731 Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
2020-07-14Improve grid preview performanceTracy Zhou
After breaking down the time we spend in rendering preview under a different grid setting, I found out that we spend a huge amount of time loading the workspace. It takes a long time in non preview case (launcher workspace init), so to optimize we should try to cut down things that are not necessary for preview. Widget model loading (widget and shortcut updates) takes half of the time, and can be optimized with minimal risks / code changes. Bug: 160662425 Test: Manual Change-Id: I89029d0ddf6e2517077a0ba3fbbcfdcd60b268d9
2020-06-19Refactor FolderNameInfos.Jayaprakash Sundararaj
Bug: 159508969 Change-Id: I984e7a4fc321392d06157c705392c1ba5672f348
2020-06-08Removing multiple system RPCs to packageMAnager and userManager from UI threadSunny Goyal
Bug: 158427348 Change-Id: Ibb1837fe932000b69cf5683bb01727fc32abca91
2020-05-14Switch to new protocol for hybrid hotseatSamuel Fufa
- create predictor from items in bgModel instead of scanning views - Launcher no longer checks for duplicates before sending pin/unpin events - sending cached items from last prediction to reduce UI shuffle - Switch to using UserCache to persist and read ComponentKey Bug: 148814143 Bug: 156413231 Bug: 156200931 Change-Id: Ide6330bed8eb7f0c6fbec1d1ac21e7f67a9b2be2