summaryrefslogtreecommitdiff
path: root/src/com/android/launcher3/model/AddWorkspaceItemsTask.java
AgeCommit message (Collapse)Author
2021-11-12Fix LauncherProvider newScreenId issueAndras Kloczl
Remove maxScreenId from LauncherProvider and whenever we need a new screenId, query the database to calculate a new screenId. Also converted and refactored AddWorkspaceItemsTaskTest and added some extra test cases. Test: manual & AddWorkspaceItemsTaskTest.kt Bug: 199160559 Change-Id: I185f6823fed171d778af0130497f5ffaf89c0a70
2021-08-26Two panel home empty page removing logic changeAndras Kloczl
- Don't remove a single page if it's empty, only if both pages are empty. - Add back empty pages after they were removed while the phone was on single panel home. - On two panel home don't add new workspace items onto the second screen Test: manual Bug: 196376162 Change-Id: I4c54ffa3b359a236deb3ab67adb54111e77ec896
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-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-06Fix icon adding issue on two panel homeAndras Kloczl
Test: manual & PromiseIconUITest & RequestPinItemTest Bug: 192431856 Change-Id: I4a6319fa33c9359057f87d9c008eb139410593b5
2021-06-25Remove expensive logging.Schneider Victor-tulias
Removed expensive logs added for debugging. Removed unused code. Fixes: 168788486 Test: none Change-Id: I0579275633361d2d67399c773e6376af74c9f1b1
2021-06-15Skip item infos that fail session info verification.Schneider Victor-tulias
trichromelibrary.canary is failing session info verification, but is still being added as blank icon on the workspace in some cases. Added logic to skip apps that fail this verification until the root cause can be found. Bug: 168788486 Test: none Change-Id: I8a7fe76f321de493b2c6c67ba6922eae23067ff3
2021-05-06Updated launcher logging.Schneider Victor-tulias
Updated logging to help track down b/168788486 Bug: 168788486 Test: manual Change-Id: I064f0eb70f0281fb09083b95c321857d17e31a7d
2021-04-22Add logging for adding pending icons to the workspace.Schneider Victor-tulias
Added more logging to help track down b/168788486 Bug: 168788486 Test: manual Change-Id: I309ad3abbedaeb538c97dd4929bedf6407fdfcf1
2021-04-06Add logging for adding pending icons to the workspace.Schneider Victor-tulias
Added logging to help track down b/168788486 Bug: 168788486 Test: manual Change-Id: I96b38be7c02793f1b6649e6c0de5cdf47dca6edb
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-04-09Moving model data structures to a separate fileSunny Goyal
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2019-12-11Updating some non-final static objectsSunny Goyal
Updating various static objects to use a standard pattern so that it is easier to track and cleanup those objects Bug: 141376165 Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
2019-11-04Add additional shortcutExists check to prevent same app from being auto added.Jon Miranda
am: f788bbb0c4 Change-Id: I42f0c4d75f8be38b9e81c5932fc1def710a68f36
2019-11-04Add additional shortcutExists check to prevent same app from being auto added.Jon Miranda
Since we made the change to treat all auto added workspace items as promise icons, the initial shortcutExists check breaks since its comparing the promise intent to the actual app intent. This additional shortcutExists check can compare the proper intents. Bug: 143803446 Change-Id: Ifa27b15205d6e17f83a4437ac175d51815688c84
2019-10-30Merge "Fix bug where Files app keeps getting added to the workspace." into ↵Jon Miranda
ub-launcher3-qt-future-dev am: 23df556ec4 Change-Id: I408d6c3d537124b8c8bfa4670261435d004eb7d3
2019-10-30Fix bug where Files app keeps getting added to the workspace.Jon Miranda
Caused by mainline updates where Files app session commit is broadcasted. Launcher workaround is to not auto-add system apps to the workspace. Bug: 139663018 Change-Id: Id61532bd0df2cd5f3bdfc28a3616ba5e5ff3d18a
2019-10-28Storing BitmapInfo instead of icon and color directly in itemInfoSunny Goyal
This will allow subclassing BitmapInfo to support custom icon/dynamic icons which can be loaded on the background thread instead of going through IconFactory which runs on UiThread Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-24Add support for work profile promise icons.Jon Miranda
- 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
2019-10-24Fix work profile promise icon bugs.Jon Miranda
- 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: I2db2d8da449c37eb248a59fbc9e7b517f50855c1
2019-10-02Removing static instance of LauncherAppsCompat and unnecessary wrapper classesSunny Goyal
Bug: 141376165 Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-09-30Removing static listeners from PackageInstallerCompatSunny Goyal
Bug: 141376165 Change-Id: I2b49d53a05a04c622ed5a7b723109a6cc230d230
2019-08-22Fix RequestPinItemTest, broken by my manual merge.Jon Miranda
Bug: 139880994 Change-Id: I7f6e1dda6cf4497bccf7ea682739bacd12079d4d
2019-08-22Add support for adding promise icons for new install sessions by user.Jon Miranda
- Added flag PROMISE_APPS_NEW_INSTALLS - Promise icons only added if flag (above) is on, as well as the setting for "Add icon to Home screen" - Maintains a list of session ids of promise icons that have been added to the home screen, so that if the user manually removes the icon, we do not add it back to the home screen when the install is completed. - Queues all applications as promise icons, and replaces with actual app info when its being added to the workspace. Bug: 135633159 Change-Id: I411db59f9bd1b346d98b9bb73f5376a5983b8de5
2019-07-25Separating apps list callback from model callback and simplifying various eventsSunny Goyal
Bug: 137568159 Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-17Moving some utilities methods to separate classSunny Goyal
Change-Id: I5094b22ddc77c45590cea1a5f5dead0dc7580abf
2019-04-16ShortcutInfo renamed to WorkspaceItemInfoSunny Goyal
Will get rid of ShortcutInfoCompat in a follow up cl Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-01-07Fixing workspace screens not including page 0Sunny Goyal
Instead of maintaining a workspace screen array, calculating it from the current set of items as needed. Bug: 122262946 Bug: 119500058 Change-Id: I85bb0e55a4442ab9bcac390a601da0cb2583c26a
2018-12-10Bye bye workspace screens tableSunny Goyal
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
2018-10-08Converting long item IDs to intSunny Goyal
> 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
2018-02-27Deprecate work folderTony Mak
FIX: 73876183 Change-Id: I9d15df247eed3500c679cba085c680b75581cffb
2017-10-06Moving install queue updates to worker thread.Sunny Goyal
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
2017-08-17Fixing duplicate/inconsistent definitions for model and callbacksSunny Goyal
> 2 implementations for filtering workspace items > 2 implementations for binding widgets > duplicate logic for add and update appInfo Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
2017-06-14Replace use of java.util.HashMap with android.util.ArrayMap inRajeev Kumar
AddWorkspaceItemsTask class Bug: 62466540 Change-Id: Iae1e7a639754d08ad7dbb90b20e2e4e205a078f8
2017-06-08Adding support for loading workspace in the absence of Launcher.Sunny Goyal
> LoadWorkspace can be called with a LoaderResult which does not bind anything. > Synchronous bind does not look for a valid page id, and will fallback to the current pageId similar to full load flow Bug: 37616877 Change-Id: If14491dc79c5b85ae1019cc93e4e08759df3387d
2017-05-22Simplifying logic for managed for icon additionSunny Goyal
> Checking for duplicate icons before adding new icons For O and above, icon addition is controlled using SessionCommitReceiver. As long as the Launcher is the default app, it will keep adding icons on the homescreen. Apps installed while launcher was not the default homescreen, no icons will be added. For below O, icons are added based on package event. As long as the Launcher process is running, it will keep adding icons on the homescreen. Apps installed while the launcher app was dead, no icons will be added. Bug: 37528649 Bug: 37082950 Bug: 34112546 Change-Id: Ic99501fa476c00474a479f2a36c24614bfa3f4bf
2017-03-28Minor Refactoring only: no functional changeMario Bertschler
- organizing imports - remove redundant modifiers on LauncherCallback interface - fix typos Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-21Enable Promise App Icon in All Apps.Mario Bertschler
- feature flag defaults to true - avoid adding additional workspace shortcut if promise shortcut already exists - handle promise app removal in package added callback for success case Change-Id: I694701e35cc94481a9c337df3a17b1e5aa2c3b4c
2017-02-16Separating methods for updating the model to a sepatate class.Sunny Goyal
Removing static access to model update methods, to allow for better access control and testing Change-Id: I9afe004dbf1b2fe50df422fd28bceea9230a4704
2017-01-18Adding support for requesting addition of shortcut/widgetSunny Goyal
on the workspace. Bug: 33584624 Change-Id: I664366822fe8088742faff2cce006239ab0771bc
2017-01-12Removing promiseIntent property from ShortuctInfoSunny Goyal
> 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
2016-12-15No more UserHandleCompatSunny Goyal
Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-12Adding support for app widgets in the InstallQueueSunny Goyal
Bug: 32904959 Change-Id: I0d07a0c59d266493ae30a42579c1fa69b805009e
2016-11-30Moving ShortcutInfo creation in InstallShortcutReceiver to background threadSunny Goyal
> Creating shortcut info requires iconCache access Bug: 21325319 Change-Id: I3317d8b6824aa05b836f3ed3626f169d4d34f783
2016-11-09Moving various runnables in LauncherModel to individual tasksSunny Goyal
> Adding tests for some of the runnable Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a