This CL updates the nullabality on methods associated with IconCache in Launcher.
Bug: 242895652
Test: manual
Change-Id: I4832c0950141c8a52c8a9e62659ccabb082897c8
Moving the part where widget icon is generated from WidgetsListHeader (UI thread) to IconCache (backend)
Test: Open widget picker -> switch to work widget picker -> verify that Battery and Weather are badged
Fix: 226132413, 209995894
Change-Id: I3d649f2b26d7d8e7b756129b5bae4433ea344d43
Bulk Icon loading causes all icons that share a component name to share a title and bitmap. This didn't work for deep shortcuts since they were already being loaded individually. Added a check to filter out deep shortcuts.
Note: If future traces show that individual deep shortcut loading is taking too long, then deep shortcut loading can be refactored into bulk icon loading.
Fixes: 224891898
Test: manual
Change-Id: I112fcd4a889071e5b523d56731bad8ecdee08abc
The previous icon loading path checked that the LauncherActivityInfo was not null and did nothing otherwise. Updating bulk icon loading path to do the same.
Fixes: 223219500
Test: manual
Change-Id: I79b7f15c65183f42ed6a23fec05558c250150cb6
Clearing the launcher data with bulk workspace icon loading caused blank app icons to appear. Added fallback title and icon loading flows to the bulk icon loading flow.
Test: manually cleared launcher data
Fixes: 216590478
Bug: 195674813
Change-Id: I8e24a166be9f591155d538dfec865d047131b756
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
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
This reverts commit 455ba62b5d.
Reason for revert: Breaks tests on all targets
Bug: 196825541
Bug: 197570389
Change-Id: Ida6792a09c54dee46105b6b914a0dd1545bdf48d
> Closing existing preview if a new request comes for same host token
> Closing in-memory icon db when closing preview
> Removing unnecessary wait blocks on UI thread and rendering
view asynchronously
> Fixing preview loading failing on LauncherAppState access
Bug: 186712316
Bug: 187140897
Test: Manual
Change-Id: I045930b007e5dc015320224a197eee20a8354d17
Also separating icon provider for recents from Launcher as it used a fixed size
Bug: 183641907
Test: Verified on device
Change-Id: I6ea3caa0066d1483bfb8a81f0e8aaa472c813afe
Bug: 184878454
Test: Open the full widget picker and observe the conversation widget
from SystemUi is listed under conversations.
Change-Id: I53cd74d80ce3c4ff77a92cd660ca9283416e9fd3
- Skips SearchTarget reapplication if the id has not changed
- Resolves Incessant subtitle on short row
Bug: 181510793
Test: Manual
Change-Id: Ic10ef9682fd3700616b7b1b7a60e82b5f2250fd3
> Also fixing slice icon loading, such that the request is cancelled
if views are recycled quickly
> Loading widget label on dg thread and cancelling request if views
are recycled quickly.
Bug: 179068415
Test: verified locally
Change-Id: Id5a524e2bf596862330a8170394aef9ffd708544
Invert the condition check in IconCache so that, if a shortcut is
already using a non-default icon, do not replace it with default icon
again.
Bug: 162783875
Test: add weather shortcut, backup, restore, verify its icon is not
replaced by default droid icon
Change-Id: Idaf4ce4afa84d21f7192a2f4ce41a6f8daa8d3f2
(cherry picked from commit 61e8ae1d9d)
> Removing support for legacy shortcuts (with embedded icon)
> Unifying pattern for storing the data in prefs
Change-Id: Ife250807c7ce5337969d25444ee23c751bc2a487
go/grid-migration-preview
With this change, we can see actual grid migration in wallpaper preview.
The approach here: we use a tmp table (favorites_preview) here specifically for this preview (to write off the migration results), and load from this tmp table workspace items if migration is necessary and successful. Otherwise, we load from the current workspace.
UPDATED: this change should be completely compatible with the new multi-db grid migration algorithm. Here is why
1. In LauncherPreviewRender#renderScreenShot, I added a check to decide which grid migration preview method we should call. Once v2 preview method is implemented, it should be integrated with other parts of this change perfectly (the reason will be mentioned below).
2. While we have multiple DBs, mOpenHelper in LauncherProvider always points to the current db we are using. Queries using CONTENT_URI is routed to whatever DB mOpenHelper points to, so it works perfectly to directly operate on CONTENT_URI even when we use multi-db underneath the hood.
3. With 1 and 2 mentioned, I believe in order for this preview change to support multi-db, we only need to implement the V2 grid migration algorithm. Because most of what we are doing in this change is wrapped in GridSizeMigrationTask, it's perfectly safeguarded.
Bug: 144052839
Change-Id: Ie6d6048d77326f96546c8a180a7cd8f15b47e4c4
> Multiple instances of LauncherIcon created when
LauncherIcons refers IconCache which in turn creates new LauncherIcons
> Widget icons are never cached as they were using low res icons
> Shortcut drag icons are not loaded synchronously
when using PinItemRequest flow
> Wrong lastUpdatedTime is used in iconCache for shortcuts
> IconUpdateHandler does not ignore managedUser promise icons
Change-Id: Ie7eed68a30fad11d1861b6c70c380953a15ae1cf
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers
Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
background thread. Added a feature flag to toggle on/off this
feature.
Bug: 140242324
Test:
1. (Custom Shortcut) Long click on google maps -> widgets -> drag
driving mode to workspace.
2. Open chrome -> add to home screen -> add -> add automatically.
3. InstallShortcutReceiver
In Launcher.completeAddShortcut, commend out the code that
calls PinRequestHelper.createWorkspaceItemFromPinItemRequest,
then open chrome -> add to home screen -> add -> add
automatically.
4. ShortcutDragPreviewProvider
qdb -> long press on suggested app that has deep shortcut
-> drag to workspace.
Change-Id: If7babe4eddf5434909bf686b4e9bde15e444d9fd
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
This reverts commit 28dc8de660.
Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.
Change-Id: I5d67ac0c4c867a40e882b7a46be446f8f7f63ac7
This reverts commit 52908c9adc.
Reason for revert: roll-forward and fixes the crash due to access icon cache on main thread
Bug: 141568904
Change-Id: I1274db349c4f508d9cf59735b5f15180bb0ec033
We want to load from/save icons to icon cache for pinned shortcuts only
to reduce memory footprint.
Bug: 140242324
Change-Id: I25c7d59e29c6e27752b36c2c3c226849d4e177af
This reverts commit f3d58f1f84.
Reason for revert: Rolling forward for development and fixes.
Bug: 140242324
Change-Id: I954cface2e50a5a9a5e143d2ea29fbcebb298ede
This reverts commit 050f9b1279.
Reason for revert: Test failure on ub-launcher3-master (b/140998509)
Possible Root Cause: This happens when fallback image or default icon was
used for shortcut icon, but shortcut caching logic do not have the logic
to create either fallback image or default icon. So upon updating icon cache,
the icon remains to be null, causing an NPE.
Change-Id: I1ee3bb7a3cab2af5730c2ee77d9370c1578a9ad6
Deep shortcuts now supports icon cache.
When workspace is being loaded, we will now attempt to load deep
shortcuts from memcache/db.
The icon for deep shortcuts loaded in the workspace is saved to
memcache/db after the workspace is loaded.
Bug: 140242324
Change-Id: I49da8319ad203476fe1e45683e2848dbde3473f2
value, refresh icon cache
Bug: 135638690
Bug: 138964490
Test: manually toggled feature flag UI on/off
$ adb shell device_config put launcher APP_SEARCH_IMPROVEMENTS [true|false]
when launcher is in foreground and also when it is in the background
Afterwards, saw if "bank" would show BofA app or not
Change-Id: I98b62bd07b14a225168217d7eb9bfdfc7f74435d
> Adding resource based allowing projects to control cache behavior
> Fixing missing comments from ag/5470467
> Adding support for no-immemory cache
Bug: 115891474
Change-Id: I691206805430cd93d3be78119bc249cefd79790a