summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Code cleanupSunny Goyal2015-06-051-7/+0
| | | | | | | | > Removing obsolete logging > Removing unused methods > Removing resource leak warning due to non-static handler class in launcher Change-Id: Ic38cc8aea82899b0b5ee3235f04e5964e49245fb
* Updating widget list when iconCache updatesSunny Goyal2015-06-041-0/+3
| | | | | | | | | > Fixing bug where items were not getting removed from the memcache > Fixing bug where package entries were not getting removing because of component mismatch. Bug: 21612532 Change-Id: Ie56f3272f7fb7e1a37c5ff9bfa523d814edc1a02
* Fixing different bitmap sizes in different orientationsSunny Goyal2015-06-031-4/+5
| | | | | | | | | > Using a single bitmap icon size > Picking up appropriate density for satisfy the required icon size > Fixing some icon size assumptions during icon animations Bug: 19514688 Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
* Removing some synthetic method creationSunny Goyal2015-06-021-2/+2
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Merge "Fix widget tray crash on screen rotation introduced by ag/694693" ↵Hyunyoung Song2015-05-221-4/+8
|\ | | | | | | into ub-launcher3-burnaby
| * Fix widget tray crash on screen rotation introduced byHyunyoung Song2015-05-221-4/+8
| | | | | | | | | | | | | | | | ag/694693 b/21402209 Change-Id: Idae97fca971d90f5fbba658411491147cb023c8d
* | Refactoring DeviceProfileAdam Cohen2015-05-211-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* | Icons are not updated to TYPE_APPLICATION during restoreSunny Goyal2015-05-211-3/+3
| | | | | | | | | | | | | | | | | | | | > Use low res only for app shortcuts > Running icon migration after restore > Running icon migration again for all users > Deduping shortcuts added from widget tray Bug: 20945600 Change-Id: I3bb47545fdd9832510069026fbae8966d2311cc1
* | Merge "Breaking icon update task so that it doesn't block worker thread" ↵Sunny Goyal2015-05-211-61/+51
|\ \ | | | | | | | | | into ub-launcher3-burnaby
| * | Breaking icon update task so that it doesn't block worker threadSunny Goyal2015-05-211-61/+51
| | | | | | | | | | | | | | | Bug: 20945600 Change-Id: Iaf516577898b51ad6e8a813d7f018ecad969c100
* | | Merge "Load PackageItemInfo in background thread to prevent ANR" into ↵Hyunyoung Song2015-05-211-6/+10
|\ \ \ | | |/ | |/| | | | ub-launcher3-burnaby
| * | Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-6/+10
| |/ | | | | | | | | | | | | | | | | | | | | - Decoupled widget model from widget view, and placed the creation to LauncherModel. - As a result packagemanager operation, iconcache retrieval is all done inside LauncherModel on background thread b/21311085 b/21325319 Change-Id: I294698527db58b89f3da558090a367530c058776
* / Do not trim folder titleSunny Goyal2015-05-211-2/+4
|/ | | | | Bug: 21297281 Change-Id: I633780f8207aabc8362f016e6b5a6e720cee1b86
* Merge "Moving LauncherAccessibilityDelegate to accessibility package" into ↵Sunny Goyal2015-05-201-2/+2
|\ | | | | | | ub-launcher3-burnaby
| * Moving LauncherAccessibilityDelegate to accessibility packageSunny Goyal2015-05-191-2/+2
| | | | | | | | Change-Id: I510204a5a12abf2da2757f3e3f8b0e8869a6b04a
* | Unify sorting between all apps and widget trayHyunyoung Song2015-05-191-34/+0
|/ | | | | | | | | | | | | | | | | - selected locale names are shown before latin - case independent sorting - main app > enterprise app Future possible refactoring: - Move all the *ItemInfo data structures to model package - Rename the comparator based on NOT what data structure it supports but what functionality it supports (locale? case independent? main app > enterprise app?) b/21271658 b/20339403 Change-Id: I8a776467392e21d5014e85cd3f51931a3ef89724
* Removing some thread priority management logicSunny Goyal2015-05-181-48/+11
| | | | | | > Not saving folder id in onSaveInstance as it is not used. Change-Id: I176beb77cafe27ec4b7500d65dc86287d2f2e0cb
* Starting the loader if the previous loader is not complete, instead of ↵Sunny Goyal2015-05-181-2/+10
| | | | | | | binding page synchronously Bug: 21107637 Change-Id: If04952c7d5c8a38a739ce5536ecac394011ab61a
* Preventing homscreen getting filled with secondary user apps, when launcherSunny Goyal2015-05-151-1/+1
| | | | | | | | starts for the first time > Sorting the apps in the work folder by install time Change-Id: Ia475b4ff3197d90e6dffe070c12c0aa16be9e292
* Removing empty folders in loaderSunny Goyal2015-05-121-0/+16
| | | | | Bug: 21050720 Change-Id: Id174bb1e18b070e32273d66649f0e286e3546f89
* Trim all whitespace from titles and labels.Winson Chung2015-05-081-18/+15
| | | | | | Bug: 20953160 Change-Id: I1610df5e445a4139522226f68fa6439926bc70c6
* Widgets should also be bound when binding all apps.Hyunyoung Song2015-05-071-2/+4
| | | | | | b/20915830 Change-Id: I772156f8a8d361f485fb4d7edc447c2cee2edf23
* Merge "Skipping package update tasks if loader has not yet run." into ↵Sunny Goyal2015-05-071-0/+4
|\ | | | | | | ub-launcher3-burnaby
| * Skipping package update tasks if loader has not yet run.Sunny Goyal2015-05-061-0/+4
| | | | | | | | | | Bug: 20754508 Change-Id: Id2ddcff42cd41e4f9875ad6ef95f648365502b75
* | Updating the icon cache after all apps has been bound.Sunny Goyal2015-05-061-39/+63
|/ | | | | | | > Updating the cache DB version to reset existing cache. Bug: 20834835 Change-Id: I298ca9ddcc4dd270b25b767447ecde01ef41a916
* Merge "Adding workprofile shortcuts after the loader has completed" into ↵Sunny Goyal2015-05-061-10/+51
|\ | | | | | | ub-launcher3-burnaby
| * Adding workprofile shortcuts after the loader has completedSunny Goyal2015-05-041-10/+51
| | | | | | | | Change-Id: Id466d8e164feeac427d969d6bc0ed3ca7a218ac4
* | Use valid context inside LauncherModel when calling loadAndBindXXXHyunyoung Song2015-05-051-1/+3
| | | | | | | | | | | | b/20851075 Change-Id: Ie3feb387a142d4e11a0a18bbcc4fd4932cfe4439
* | update widgets model when package is updatedHyunyoung Song2015-05-041-6/+8
| | | | | | | | | | | | | | Fixing a bug where onProviderChanged is called before Package update. And icon loaded on the widget tray is the default icon. Change-Id: I4ffea846d057920fd894537432ac5881642bc570
* | Merge "WidgetTray performance improvement (less sorting): Part 1" into ↵Hyunyoung Song2015-05-041-10/+12
|\ \ | | | | | | | | | ub-launcher3-burnaby
| * | WidgetTray performance improvement (less sorting): Part 1Hyunyoung Song2015-05-041-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - No longer return sorted list from the package manager since, the only time the widget list requires to be sorted is when recycler view renders them. - Made getWidgetsAndShortcuts private to guarantee that widgets are being loaded in the worker thread. Change-Id: I2c35973c1226e831514380dd38fc2f88b1b91d02
* | | Handling managed profile creation in the model as the activitySunny Goyal2015-05-011-0/+3
| |/ |/| | | | | | | | | can get killed in the background. Change-Id: I95f62cf268fe642c9a2bb4975eb92bf8e12d23a9
* | Various managed profile fixesSunny Goyal2015-05-011-10/+12
|/ | | | | | | | > When matching existing shortcut, match the uri as intent doesn't implement equals > Fixing user matching when searching for apps in all-apps Bug: 20749743 Change-Id: I14f3e2134e774727176e865d74108ef79de874d6
* Simplifying add to workspace by not going through the worker threadSunny Goyal2015-04-291-124/+28
| | | | Change-Id: I3260786bee257aea93ade49e6fa18008232addbe
* Removing some unused method params from CellLayoutSunny Goyal2015-04-241-1/+1
| | | | | | | > Replacing various distance calculations with Math.hypot > Moving findVacantCell to Utilities Change-Id: I0cb194b603e52b3bb2b29a095bb4da2bb408ab13
* Adding LongArrayMap as a replacement for HashMap<Long, E>Sunny Goyal2015-04-241-34/+40
| | | | Change-Id: I4710e6db69abcdbd897a8401fc8b980c09e2ffef
* Clearing all pending runnables when Launcher is destroyed.Sunny Goyal2015-04-231-30/+19
| | | | Change-Id: I00596c11116b5579c1f013b268b6c0b5239f0aa7
* Fixing missing updates in package install sessionsSunny Goyal2015-04-221-47/+149
| | | | | | | | | | | | > Ensure icon cache never returns null icon > Enabling install shortuct receiver only after workspace has finished binding > Making all the model changes for package installs on worker thread and only posting the updaes on the UI > Making shortcut exists check on the loaded items and not on the DB > Explicitely using worker thread for PckageInstallListener > Removing backward compatibility support from PackageInstallerCompat Change-Id: I9592771b9670c1c1c84c8208cae8dafa7b393e65
* Merge "Using a different userManager class as getUserForSerialNumber gives a ↵Sunny Goyal2015-04-221-4/+14
|\ | | | | | | valid userHandle for deleted user." into ub-launcher3-burnaby
| * Using a different userManager class as getUserForSerialNumber givesSunny Goyal2015-04-211-4/+14
| | | | | | | | | | | | | | | | | | | | a valid userHandle for deleted user. > Also chaching the user handles during loader to avoid multiple calls for UserManager Bug: 19389411 Change-Id: I95af3b41b2c9d2ea41d9a75b1020656f57f5e4c9
* | Remove duplicate calls to getSortedWidgetsAndShortcutsHyunyoung Song2015-04-211-13/+23
|/ | | | | | | | Note: this is a manual CP of the CL that was submitted to ub-launcher3-almonte b/19904873 Change-Id: I2e56bc0c7524caa2ef3c5fb00f35cb032cd1860b
* Updating drop button targetsSunny Goyal2015-04-161-2/+8
| | | | | | | | > Splitting DeleteDropTarget into delete and uninstall > Showing UninstallDropTarget for app shortcuts on workspace > Showing InfoDropTarget only when developer options is enabled Change-Id: I4396571d2199d1581bb9c733aef88ab9b0ebd79d
* Automatically adding managed profile shortcuts to homescreen.Sunny Goyal2015-04-101-71/+37
| | | | | | | | | | | | When the managed profile is created, a "Work" folder is created and added to the homescreen. All work profile apps are added to this folder and icons for subsequent installs (withing a fixed time frame) are automatically added to this folder. If this folder get deleted or the time-frame expires, icon for any new install is placed on the homescreen. Bug: 17410319 Change-Id: I49f4e437707d5eabe4eec85320765bf6ba7fde97
* WidgetTray revamp workHyunyoung Song2015-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - RecyclerView is rendering - Animation is connected - Drag and drop is now handled - UI tweaking: background, margins, more to come. - Flicker and preview not loading issue: fixed height for the horizontal scroll view. - Shortcuts are added - Widget Preview loading should support shortPress for drop - UI tweaks left: overlay of arrow when there are more items to scroll - icons are added in the section header - Sorting of widget sections and widget horizontal list - Adding all the padding constants to dimen.xml file - RecyclerView should only support one view type For items to be addressed in follow up patches OR CLs, TODO is added to the comment. b/19897708 Change-Id: Ibfc4da1696a23d20bada93db46e126706eb13cdc
* Ensuring that work-profile applications are mixed in with other apps.Winson Chung2015-04-061-35/+0
| | | | | Bug: 20046158 Change-Id: I833c1a1467889db07f9ec33ca77641322901958e
* Removing ContentObserver from LauncherModel, and calling reloadSunny Goyal2015-04-011-15/+13
| | | | | | whereever necessary Change-Id: Ia4a8abdfe2be9703f3217a60527d3a1220b33bdc
* Rewrite: Widget preview loader logicSunny Goyal2015-03-201-4/+5
| | | | | | | | | > Widget previews are saved in data dir instead of cache dir > Expiring widget previews similar to IconCache > Removed support for setting thread priorities Bug: 19865031 Change-Id: Ib6033c2b1ff8ae61bba8762ca994ccd8217d3c75
* Reducing method count by eliminating synthetic accessorsAdam Cohen2015-03-201-26/+27
| | | | | | | | | | | Elimates 304 methods based on dex analysis The java compiler generates sythetic accessor methods for all private fields, methods and contructors accessed from inner classes. By marking them package-private and @Thunk instead, sythentic accessor methods are no longer needeed. These annotated elements should be treated as private. Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
* Don't clobber widgets with the same component.Robin Lee2015-03-191-20/+27
| | | | | | | | | By not storing them in a HashMap keyed against ComponentName (which is almost guaranteed to conflict with other widgets when managed profiles are in play). Bug: 19444068 Change-Id: I6ffce78e8aaf265196239670404cbdaff9fa09be
* Lazy loading high res iconsSunny Goyal2015-03-171-9/+13
| | | | | | | > Loading low-res icons for icons which are not visible on the homescreen. Change-Id: I8ac7bf09f6030ed554cb60a4cd402f3f36ffe12b