summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/IconCache.java
Commit message (Collapse)AuthorAgeFilesLines
* IconCache: Simplify application of custom titles from STKstable/cm-13.0-ZNH5YMarcos Marado2016-12-031-12/+8
| | | | | | | | | | | | | | | Instead of trying to deal with multiple icon-cache conditions, just apply the custom title to the entry right before using it. This deals with hot-swap, card exchange, and similar weird issues that were hitting stale cache entries, and is less aggressive than outright flushing the cache with every STK refresh. RM-290 Issue: FEIJAO-815 Change-Id: Iacd7da820f0404b4dc12394d9c9a571bdceadeb0
* Trebuchet: fix potential NPE when info is nullemancebo2016-09-161-8/+11
| | | | | | | | | Previously we were guarding against a null info object, but with the the STK rename patches we will throw an NPE if info is null issue-id: JALEBI-636 Issue: FEIJAO-815 Change-Id: I74e95f81b64361c1bb56307c0cc621f24e701648
* Trebuchet: STK app rename customization for latam region.Pragnya Paramita2016-09-161-2/+23
| | | | | | | | | | | App name is read from SIM in STK app and sent via a broadcast. Name is operator specific. Launcher receives the broadcast, read the name and renames the STK app in all apps screen and workspace. Change-Id: If64b278360a0b8433e23e6678f04cdf30fe2cef1 CRs-Fixed: 797995 Issue: FEIJAO-815
* Trebuchet: Handle random crash during theme change / user switchcretin452016-02-291-2/+7
| | | | | | | | | | | Sometimes the IconCacheDB fails to open in writable mode during a theme change or user switch. Don't bother updating the icon cache when this happens. It will update later just fine. Issue-id: CYNGNOS-2083 Change-Id: I022ef436ff07880c188642456afad847ad9f41d3
* Handle theme changesClark Scheff2015-12-161-1/+12
| | | | | | | issue-id: CYNGNOS-1434 NIGHTLIES-2149 Change-Id: I85208f3d6b572fb7a161db79cd3b74c1102dbba2 (cherry picked from commit 50f78e36b079bbe14bcb50064d28940358d42544)
* Reimplement CM Settings Overview Panel in the new Launcher Part 2Yvonne Wong2015-11-301-0/+16
| | | | | | | - Enables hiding the search bar from the workspace - Adds a reload launcher flag to reload only during onResume or newIntent if needed Change-Id: I0feb279f9003b268b5a129cef40d3665787ee451
* Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed ↵Sunny Goyal2015-08-281-2/+4
| | | | | | | profile app Bug: 23515512 Change-Id: I60678eccd4b60225ff30960f7197d633f72c7659
* Merge "Fixing widget restore" into ub-launcher3-burnabySunny Goyal2015-07-211-12/+23
|\
| * Fixing widget restoreSunny Goyal2015-07-201-12/+23
| | | | | | | | | | | | | | | | > Widget restore active flag was not cleared when the app was downloaded > Icon from session info was not getting cached Bug: 22413379 Change-Id: Ie096b929252200675a76dadd8c25cc3aa433671b
* | Resizing the bitmap before caching it in the DBSunny Goyal2015-07-201-2/+4
|/ | | | | | | | | > The icon size in the backup can be different that what is required by the device. We should resize the icon, before caching it. Bug: 22413328 Change-Id: Id77c53edf8ea5e95a2d32dbe22be553120279ebd
* Using highres icons for backupSunny Goyal2015-07-151-1/+1
| | | | | Bug: 22410445 Change-Id: I0fbc2d1217127556af806f12dbb5960712627ab7
* Using RGB_565 for low-res iconsSunny Goyal2015-07-011-27/+67
| | | | | | | | | > Using a non-transparent image with flat background for low-res icons > Changing the scale factor from 8 to 5 > The overall size change is 1/50 instead of 1/64 Bug: 22204941 Change-Id: I6cda4b4b3450c23a7bb8218ebd2de2b09af9c414
* Fixing backup restoreSunny Goyal2015-06-251-5/+11
| | | | | | | | | | | | | | | > Not deleting icons from cache, which have not been restored yet > Not checking if activity exists during DB migration. Missing components are removed during loader anyway > Backing up and restoring bitmaps even when iconType is resource. This allows us to show a proper bitmap icon, until the correct resource is available. > Loading proper shortcutResource icon for promiseIcons > Checking against promise intent when verifying duplicates > A launcher App intent can contain EXTRA_PROFILE Bug: 22094970 Change-Id: I982971338846733833ec133119393af0bea0eb08
* Cancelling launcher reload on mcc changeSunny Goyal2015-06-181-6/+4
| | | | | Bug: 21022833 Change-Id: Iccd477e7b1638d162e1a500cdb7a52b8d359c657
* Deleting empty folders based on DB stateSunny Goyal2015-06-121-1/+1
| | | | | | | | | > Previously folders were getting deleted based on in-memory loader state. If for some reason, an item failed to load, we would delete the folder from DB as well. Bug: 21354058 Change-Id: I5318ee8a99afa9cafd93ed2b9ef0e155f502a41b
* Updating widget list when iconCache updatesSunny Goyal2015-06-041-1/+4
| | | | | | | | | > 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-10/+2
| | | | | | | | | > 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-9/+9
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Merge "Ensuring that each CacheEntry has a default title and content ↵Winson Chung2015-05-281-3/+9
|\ | | | | | | description." into ub-launcher3-burnaby
| * Ensuring that each CacheEntry has a default title and content description.Winson Chung2015-05-281-5/+9
| | | | | | | | | | | | | | | | - Also defer adding entry to cache until we know that it has correctly loaded Bug: 21446070 Change-Id: Ia7aae65ecdc5d9d7741f75d3fb6e7b85daeafeff
* | Removing file IO used for checking configuration changeSunny Goyal2015-05-261-9/+0
|/ | | | | | | > This check was used for flushing the cache, but since the cache is backed by a DB, this has no effect as same icons are loaded again Change-Id: Ib7d8a8598c5d225d922e095c899dc11ad06f2b7a
* Refactoring DeviceProfileAdam Cohen2015-05-211-15/+1
| | | | | | | | | | | | | | | | | | | | -> 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
* Merge "Breaking icon update task so that it doesn't block worker thread" ↵Sunny Goyal2015-05-211-26/+69
|\ | | | | | | into ub-launcher3-burnaby
| * Breaking icon update task so that it doesn't block worker threadSunny Goyal2015-05-211-26/+69
| | | | | | | | | | Bug: 20945600 Change-Id: Iaf516577898b51ad6e8a813d7f018ecad969c100
* | Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-1/+1
|/ | | | | | | | | | | - 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
* Avoiding blocking worker thread when adding icons to DBSunny Goyal2015-05-191-12/+58
| | | | | Bug: 20945600 Change-Id: If12b21ac62c55c769838ce17d5421f147c396256
* Using BubbleTextView for widget section headersSunny Goyal2015-05-121-0/+3
| | | | | | > Loading highres icons on the worker thread. Change-Id: I5b68a86820aa4c132c156339e497354cf57f0fca
* Trim all whitespace from titles and labels.Winson Chung2015-05-081-5/+5
| | | | | | Bug: 20953160 Change-Id: I1610df5e445a4139522226f68fa6439926bc70c6
* Updating the icon cache after all apps has been bound.Sunny Goyal2015-05-061-1/+15
| | | | | | | > Updating the cache DB version to reset existing cache. Bug: 20834835 Change-Id: I298ca9ddcc4dd270b25b767447ecde01ef41a916
* Fixing missing updates in package install sessionsSunny Goyal2015-04-221-6/+10
| | | | | | | | | | | | > 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
* Wrong icon getting set for an app on secondary user during updatesSunny Goyal2015-04-131-2/+2
| | | | | Bug: 20163841 Change-Id: Ief91db56f7831f89e34c4540981a9d2db96b8bed
* WidgetTray revamp workHyunyoung Song2015-04-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | - 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
* Merge "Adding support for loading package icon in iconCache" into ↵Sunny Goyal2015-04-061-19/+58
|\ | | | | | | ub-launcher3-burnaby
| * Adding support for loading package icon in iconCacheSunny Goyal2015-04-061-19/+58
| | | | | | | | | | | | | | > package icons need to be retrieved from IconCache for the new widget tray Bug: 19897708 Change-Id: Iaafc5e16477aaa4e9a7c46b5abf8146cd1101ffd
* | Adding a system status column in icon cache & invalidating items based on itSunny Goyal2015-04-011-6/+23
|/ | | | | Bug: 20034430 Change-Id: Icd6c6426fc7ed26cd104bf22a9d2b0263cb0fa67
* Rewrite: Widget preview loader logicSunny Goyal2015-03-201-2/+2
| | | | | | | | | > 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-1/+2
| | | | | | | | | | | 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
* Using MainThreadExecuter instead of View.postSunny Goyal2015-03-181-3/+4
| | | | Change-Id: Ie7ba88bd3bb412d998ecb51095cbaa74b3b39c10
* Lazy loading high res iconsSunny Goyal2015-03-171-22/+103
| | | | | | | > Loading low-res icons for icons which are not visible on the homescreen. Change-Id: I8ac7bf09f6030ed554cb60a4cd402f3f36ffe12b
* Extracting out CacheKey to a separate classSunny Goyal2015-03-161-31/+11
| | | | Change-Id: Ifdd7cc79668b34298e3f788ee684080cecb86c3e
* Updating IconCache to maintain a persistent of iconsSunny Goyal2015-02-261-163/+250
| | | | | | | | | | > IconDB maintains a DB of icons keyed on ComponentName + User > During loader, icons & labels are loaded first from the DB, and if the entry doesn't exist, loaded using packageManager > After the loader completes, IconDB updates any entry which might have changed, while the launcher was dead. Change-Id: I7a6021cb6d1ca1e66fa5a0bdd21e1543e0cf66fc
* Fixing some IconCache methods not thread safeSunny Goyal2014-10-161-107/+69
| | | | | Bug: 17981568 Change-Id: I0d49604c2e38bc9017cba527d87e24e8b086f1da
* Updating icons for sortcuts when the target app updates.Sunny Goyal2014-10-071-1/+1
| | | | | Bug: 17398260 Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
* Cleaning up icon resizing codeSunny Goyal2014-10-071-3/+1
| | | | | | | | > For resizing icons, scaling them down instead of cropping them > Removing duplicate methods and variables Bug: 17663119 Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
* Updating promise icon's bitmap and label when onBadgingChanged is receivedSunny Goyal2014-09-191-1/+5
| | | | | Bug: 17583799 Change-Id: I68b4f9d4086c43bd949ad8b46b574ec78edb32db
* Null check in flushInvalidIconsSunny Goyal2014-09-151-1/+2
| | | | | | | | > Icons in a CacheEntry can be null, for a restored app. No need to flush such entries on DeviceProfileChange Bug: 17489687 Change-Id: If6e76206ae5bd8201c9928257706224f2f34c232
* Disabling debug logsSunny Goyal2014-09-091-2/+2
| | | | | issue: 17327468 Change-Id: If0cd46e1309f58eed52e773ef15e3259df10c905
* Handling label and icon from SessionInfo.Sunny Goyal2014-09-041-5/+47
| | | | | | | | | > The ShortcutInfo stores state as bit flags and not as ints > Intents of auto-install shortcut are automatically updated upon installation > Icons/titles for active sessions are cached in IconCache Change-Id: I2047849f67d4a8aaf2bc346b58110325bb4807d4
* Adding support for managed profiles in widgetSunny Goyal2014-08-201-0/+4
| | | | | | issue: 16892811 Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
* Updating the ui for widget restore flowSunny Goyal2014-08-121-15/+57
| | | | | | | | | | | | | | > Pending widget show a PreloadIconDrawable to indicate installation progress > Only the concerned widgets are reinflated on package install and not the whole workspace. > Adding support for storing default package icon in IconCache issue: 10779035 issue: 16737660 Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679