summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/model
Commit message (Collapse)AuthorAgeFilesLines
* Filling in content values on the worker threadSunny Goyal2019-04-251-30/+32
| | | | | | | | | | Writing to disk hapens on the worker thread, so if we create content values on UI thread, some values can change before it is written to disk. This happens in case of shortcuts, where the badge is applied after the icon is queued, but before it is written Bug: 131303610 Change-Id: Ic35b17071d4ed3e5c5fee9f003a225e4ffdc74f3
* Removing ShortcutInfoCompat and directly using ShortcutInfoSunny Goyal2019-04-225-22/+21
| | | | Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
* ShortcutInfo renamed to WorkspaceItemInfoSunny Goyal2019-04-1611-95/+93
| | | | | | Will get rid of ShortcutInfoCompat in a follow up cl Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
* Fixing restore flag not getting persistedSunny Goyal2019-04-091-1/+2
| | | | | Bug: 127766994 Change-Id: I8e887232b9fc31a850f7675c79b329ce8897db71
* Adding a utility class to listen for app launchesSunny Goyal2019-03-261-0/+56
| | | | Change-Id: I62e82a6e04b7101773d98c6e7aec574facd053fe
* Make QSB_ON_FIRST_SCREEN a boolean.Jon Miranda2019-03-153-5/+3
| | | | | Bug: 118140522 Change-Id: Ic8e47e71f538b0b0caff6f630566665d05a65522
* Merge "Fixing launcher UI not reapplied properly when IDP changed as a ↵TreeHugger Robot2019-03-112-15/+22
|\ | | | | | | result of display changes" into ub-launcher3-master
| * Fixing launcher UI not reapplied properly when IDP changed as a result of ↵Sunny Goyal2019-03-062-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix bug where folder items preview remain in low res state.Jon Miranda2019-03-081-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | - We update the ranks of all folder items after loading, to ensure there are no gaps caused by removed folder items. This also ensures that we load the high resolution icons for all preview items. - FolderIconPreviewVerifier#setFolderInfo was not always called - Init mGridSize with [1, 1] to prevent divide by zero error in case setFolderInfo is not called Bug: 126268196 Change-Id: I856489968665a39303e2922c78cf90f2b3ee6ebb
* | Add launcher support for restoring work profile items onto workspace.Jon Miranda2019-03-071-3/+3
|/ | | | | Bug: 111301511 Change-Id: I40decf4c763401c97afcc2bfa7954a1f3a03f536
* Merge "Removing diagnostics" into ub-launcher3-masterTreeHugger Robot2019-01-303-20/+0
|\
| * Removing diagnosticsvadimt2019-01-253-20/+0
| | | | | | | | | | | | | | | | Now that b/117332845 is fixed Bug: 117332845 Change-Id: If8c137b9c7cc386dfc5b5af4b81a3efbfa33f770 Tests: None
* | Changing min sdk to 25Sunny Goyal2019-01-294-12/+5
|/ | | | Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
* Fixing workspace screens not including page 0Sunny Goyal2019-01-074-34/+31
| | | | | | | | | Instead of maintaining a workspace screen array, calculating it from the current set of items as needed. Bug: 122262946 Bug: 119500058 Change-Id: I85bb0e55a4442ab9bcac390a601da0cb2583c26a
* Merge "Migrating some runnables to lambda operations" into ub-launcher3-masterTreeHugger Robot2019-01-041-86/+35
|\
| * Migrating some runnables to lambda operationsSunny Goyal2018-12-271-86/+35
| | | | | | | | Change-Id: Ied7b6ca14594c72bc671127baf4f84fdcdb35b93
* | Adding support for backing up favorites tableSunny Goyal2019-01-032-71/+217
| | | | | | | | | | | | | | | | | | | | | | Favorites table is copied as a separate table name during the first grid migration. On subsequent migrations this backup table is used if it exists, otherwise new backup is created. The backup table is also removed if there is any insert or delete operation on the db (outside of the migration operation itself). Bug: 111850268 Bug: 121048571 Change-Id: I6f02f4a355c369ee99d89430971be258f7516f6e
* | Remove widgets which have invalid size in DBSunny Goyal2018-12-271-0/+5
|/ | | | | Bug: 120638555 Change-Id: I23746af44e4390da7b09869e181919e7eac26e58
* When undoing a removal, always return to the page it came fromTony2018-12-212-3/+3
| | | | | | | | | | | | | | 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-106-58/+35
| | | | | | | | | | | | | 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
* Changing the format for device profile definitionSunny Goyal2018-12-071-9/+3
| | | | | | | | | Device profiles are defined such that the grid size is fixed and only the icon and text sizes change. For every grid size option there are multiple display configurations. Bug: 118758696 Change-Id: I54aac9106c576324b02530913c447e849b4ae1da
* Fixing shortcut icons are not getting correct color extraction.Sunny Goyal2018-11-304-10/+18
| | | | | | | | > Avoiding color extraction for icons which have already be evaluated > Fixing color extraction from hardware bitmaps Bug: 111343544 Change-Id: I624866e892465684871fbc130003e32945d86460
* Moving BaseIconCache to icon libSunny Goyal2018-11-081-1/+1
| | | | Change-Id: I4fb56dcd6231a848d152e690edaf8885efbc995a
* Removing UserManagerCompat wrapper for getting baded labelSunny Goyal2018-11-051-5/+5
| | | | | | | This removes some crass dependency on Launcher compat implementation making it easier to move iconCache to a separate library Change-Id: If5fab0c82d98089cde6f54b6a374fb7bb2db5ae8
* Merge "Removing some launcher cross dependency in BaseIconCache so that it ↵TreeHugger Robot2018-11-061-4/+5
|\ | | | | | | can eventually be moved to icon library" into ub-launcher3-master
| * Removing some launcher cross dependency in BaseIconCacheSunny Goyal2018-11-051-4/+5
| | | | | | | | | | | | so that it can eventually be moved to icon library Change-Id: I65e3ad34322a10695c1ba114f5e60c4418747f05
* | Create a launcher LoaderResults override.Rajeev Kumar2018-11-051-53/+28
|/ | | | | | | | This change disables shortcuts/widgets binding on Android Go devices. Bug: 112904271 Test: Manual test Change-Id: I3dbcd23dc448ff9ca5fe6c32958dcffb51c4bcf5
* Create a launcher model override.Rajeev Kumar2018-11-021-240/+0
| | | | | | | | This change disables shortcuts/widgets loading on Android Go devices. Bug: 112904271 Test: Manual test Change-Id: I2c40f87a8f5d752525c99d254693a4e0a9eeeb2b
* Deepshortcuts - only keep the per package shortcut count in memory.Zak Cohen2018-10-226-38/+26
| | | | | | | | | | 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-195-9/+9
| | | | | | | | | Bug: 115891474 Test: make -j10 icon-loader Next step: Launcher will depend on icon-loader in next CL Change-Id: I797ddb857cf8be79f3be6ca2f174c593ca3713a5
* Make flags UI available on release build of launcherRyan Lothian2018-10-152-12/+27
| | | | | | | The UI will only be shown on eng/userdebug platform builds. Bug: 117223984 Change-Id: I27843f2d856a4a19f3fe53c4d306606eaa5714a2
* Converting long item IDs to intSunny Goyal2018-10-088-98/+98
| | | | | | | | > 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
* Groundwork for runtime-toggleable feature flagsRyan Lothian2018-10-082-2/+5
| | | | | | | | | | This is the first step in adding a flag toggler UI to launcher. The change migrates a single flag (QSB_ON_FIRST_SCREEN) from a boolean constant to a boolean method. In future, that will allow us to return different values at runtime. Bug: 117223984 Change-Id: I1e62c91dd941b8145166021bc0aa157733e62ea0
* Adding temporary logging to diagnose testPendingWidget_autoRestoredVadim Tryshev2018-10-053-0/+20
| | | | | | | | This test fails Bug: 117332845 Test: running Launcher Change-Id: I300c856992b3d1f559c4c31525a45e2c4a960f11
* Caching widget labels in icon cache to avoid lookup at startupSunny Goyal2018-09-283-26/+65
| | | | Change-Id: Ie026ee47905454bd70e774d422cd7fe142aec7e2
* Move IconNormalizer/ShadowGenerator/LauncherIcons to icons packageHyunyoung Song2018-09-265-7/+7
| | | | | | | | | Bug: 115891474 Sending out the package name changing CL first before I make LauncherIconsHandler and tests around it. Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
* Extracting icon caching logic into a base class.Sunny Goyal2018-09-251-1/+2
| | | | | | | This will allow using the cache cache for other type of objects, like shortcuts and widgets. Change-Id: I38616d031cb051f93e724d9cc0e8fe9a822b9e3a
* Removing additional rpc due to icon cache updateSunny Goyal2018-09-215-12/+25
| | | | | | | | | | 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
* Fix auto install add of installed activityTobias Dubois2018-09-071-10/+7
| | | | | | | | | | Reset the restore status for auto install icons where the activity is installed and enabled so the item is not stuck in the auto install state. Bug: 112664405 Test: manual - See issue Change-Id: I37116b6e6ecbe4215d96627f9b1ea6909d12a6c0
* Gracefully fallback to new ComponentName if one is renamed/removedTony Wickham2018-09-052-42/+37
| | | | | | | | | | | | | | | | | | | | | Previously, if a developer renamed their launcher activity, we removed all instances of their icon from the home screen, since technically the activity they pointed to no longer exists. However, in the vast majority of cases, the developer simply renamed their activity and nothing should change from a user's perspective. So instead of removing icons that no longer point to a valid activity, we now redirect them to point to the first activity in the manifest (or remove them if there is none). Test: - Install app with Activity A and place on home screen - Rename A to B and reinstall - verify home screen icon remains - Add new launcher activity C - verify icons still go to B - Force stop launcher and rename B to A - verify icons go to A (same activity) - Remove activity A - verify icons go to C - Remove activity C - verify icons are removed Bug: 28907647 Change-Id: If9da251bd588908c4c425e7dd32e38fcbe54bab2
* Add undo snackbar for deleting itemsTony Wickham2018-08-302-6/+70
| | | | | | | | | | | - 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
* Using a placeholder icon shape instead of low-res/blurry iconSunny Goyal2018-08-273-3/+3
| | | | | Bug: 111142970 Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
* Migrating to android-xSunny Goyal2018-08-142-2/+4
| | | | Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
* Retiring some feature flagsSunny Goyal2018-07-102-17/+1
| | | | Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
* Moving some abstract classes to interfaces, to better use java-8 featuresSunny Goyal2018-07-091-9/+5
| | | | Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
* Deleting invalid icons when an app is restoredSunny Goyal2018-05-301-10/+28
| | | | | | | | When a app is restored, it may not be in exactly the same state as it was when backed up. Some components might be missing, and some shortcuts may be disabled or unavailable Bug: 63525806 Change-Id: I09e6c0e9a9d2c1e8ccd73430f94bd065bdf2718e
* Reverting some debug logsSunny Goyal2018-04-041-14/+0
| | | | | Bug: 72481685 Change-Id: Ib9e52504d9513bd7fdede28f6c0798ca7873083d
* Pass intent extras as string arraylist.Jon Miranda2018-03-281-4/+4
| | | | | Bug: 74355094 Change-Id: I697d837e48d7de4a490d2ad74a9c1ec7987d0574
* Send directed broadcast to package installers that have active sessions.Jon Miranda2018-03-273-7/+200
| | | | | | | | | | | | | | | | For each installer, we send a broadcast that includes package names of items that: * Are being installed by that installer * Are on the first screen * Have an active install session The packages are seperated by: * Folder items * Workspace items * Hotseat items * Widgets Bug: 74355094 Change-Id: I573ed6b3b84314ef244486fcf8354bebdff8bbdf
* Fixing bug when model was not reflected properly on the UI.Sunny Goyal2018-03-054-19/+77
| | | | | | | 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