Commit Graph

23 Commits

Author SHA1 Message Date
Pinyao Ting
52908c9adc Revert "Revert "Revert "cache shourtcut image"""
This reverts commit d13f0c5c45.

Reason for revert: app crashes when adding widgets automatically b/141568904

Change-Id: I5b97f440716c93b1bd93c899e3e1d40e8bbd2885
2019-10-01 09:44:11 -07:00
Pinyao Ting
ddd0ff44ba Exclude shortcuts in popup from IconCache.
We want to load from/save icons to icon cache for pinned shortcuts only
to reduce memory footprint.

Bug: 140242324
Change-Id: I25c7d59e29c6e27752b36c2c3c226849d4e177af
2019-09-20 15:24:22 +00:00
Pinyao Ting
d13f0c5c45 Revert "Revert "cache shourtcut image""
This reverts commit f3d58f1f84.

Reason for revert: Rolling forward for development and fixes.

Bug: 140242324
Change-Id: I954cface2e50a5a9a5e143d2ea29fbcebb298ede
2019-09-16 20:20:38 +00:00
TreeHugger Robot
3463d1c5f9 Merge "Revert "cache shourtcut image"" into ub-launcher3-qt-future-dev 2019-09-16 19:20:48 +00:00
Pinyao Ting
f3d58f1f84 Revert "cache shourtcut image"
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
2019-09-16 18:00:26 +00:00
Hyunyoung Song
057059665e When DeviceConfig/FeatureFlag value is different than the previous value, refresh icon cache
am: e17a699618

Change-Id: I5c2e54c069fc03172f471f9655cd8b09b5ac6dce
2019-09-12 15:05:19 -07:00
Pinyao Ting
050f9b1279 cache shourtcut image
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
2019-09-12 09:14:43 -07:00
Hyunyoung Song
e17a699618 When DeviceConfig/FeatureFlag value is different than the previous
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
2019-09-11 10:38:14 -07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Sunny Goyal
934ebd087b Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
Merged-In: I1183e63a6556ebfb3eee5df23d149e09728193a9
(cherry picked from commit e529a86fbd)
2019-08-14 22:12:49 +00:00
Sunny Goyal
e529a86fbd Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
2019-08-07 15:51:25 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Sunny Goyal
8c48d8bea6 Changing min sdk to 25
Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
2019-01-29 11:29:52 -08:00
Sunny Goyal
202fabfe10 Adding reusable version of IconCache and IconFactory
> 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
2018-11-09 15:44:07 -08:00
Sunny Goyal
1a9cbd3c88 Moving BaseIconCache to icon lib
Change-Id: I4fb56dcd6231a848d152e690edaf8885efbc995a
2018-11-08 15:18:25 -08:00
Sunny Goyal
9a4c5be23e Moving some utility classes to icon lib
Change-Id: I0cc19ea02fb0732e9e1778a18c0d2c229232d179
2018-11-07 13:16:07 -08:00
Sunny Goyal
e62d2bb165 Removing some Launcher3 dependencies from BaseIconCache
Change-Id: Ic80ed4a5cd2fc414cd6c27096d798e7f0b8efc72
2018-11-06 14:51:55 -08:00
Sunny Goyal
678f47c0c9 Removing some launcher cross dependency in BaseIconCache
so that it can eventually be moved to icon library

Change-Id: I65e3ad34322a10695c1ba114f5e60c4418747f05
2018-11-05 17:22:09 -08:00
Winson Chung
cc8dbf31db Caching clean up, remove dependency on old shared lib loading/caching logic
- Clarify caching policy, we only cache the last N task snapshots
- Pull out necessary logic from RecentsTaskLoadPlan (deprecated) into
  launcher class RecentTasksList which also manages the invalidation of
  the last loaded list
- Pull out logic from task loading logic in the shared lib into separate
  classes TaskThumbnailCache and TaskIconCache, and have each task view
  manage the load request for data

Bug: 117603579
Test: Thumbnails still load

Change-Id: I938e4dea19e7f5d24724c32194d254ca003e89aa
2018-10-23 00:01:07 +00:00
Hyunyoung Song
cda96a5b43 Setup make icon-loader library
Bug: 115891474

Test: make -j10 icon-loader
Next step: Launcher will depend on icon-loader in next CL

Change-Id: I797ddb857cf8be79f3be6ca2f174c593ca3713a5
2018-10-19 14:33:46 -07:00
Sunny Goyal
ac8154a23d Caching widget labels in icon cache to avoid lookup at startup
Change-Id: Ie026ee47905454bd70e774d422cd7fe142aec7e2
2018-09-28 16:36:33 -07:00
Sunny Goyal
0b3053c9fc Extracting icon caching logic into a base class.
This will allow using the cache cache for other type of objects,
like shortcuts and widgets.

Change-Id: I38616d031cb051f93e724d9cc0e8fe9a822b9e3a
2018-09-25 16:36:06 -07:00
Sunny Goyal
f840f10d50 Removing additional rpc due to icon cache update
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
2018-09-21 15:27:03 -07:00