Commit Graph

34 Commits

Author SHA1 Message Date
Samuel Fufa aa038af6b3 Scale Icon badges for shortcut and widgets
Test: Manual
Bug: 141262820
Change-Id: I03edc986e3fe1876b6b7ed179b96864d587cb137
2019-10-04 17:06:33 -07:00
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 cfbeab15f5 fix the issue update handler tries to cache a shortcut without valid
bitmap.

Change-Id: Ie400fdb811928015903319eed69879de1728539a
2019-09-16 20:38:44 +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
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
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
Sunny Goyal e529a86fbd Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
2019-08-07 15:51:25 -07:00
Hyunyoung Song ae86d22dfb Guard against NPE inside BaseIconFactory
Bug: 137253043

This is a bandage fix.

Ideally, we should really figure out why TaskIconCache will be sending
null icon drawable to BaseIconFactory.

Change-Id: Ie005006baeddc9a3379283fe7139e590daad9a57
2019-07-18 00:06:04 +00:00
Sunny Goyal 70266689b7 Using a common gradle dependency path
Change-Id: If01b0d7ebd6719935ac467a5f085b0517b133bbc
2019-06-21 12:31:29 -07:00
Lyn Han 1c1b86bf51 Dot location getters
For use by SystemUI-Bubbles flyout-to-dot animation

Bug: 129158983
Test: manual (Bubbles dot looks good)
Change-Id: I53287efcfe3e02b4ba0572d62f138cc52f7f66a6
2019-06-20 22:34:44 +00:00
Hyunyoung Song f69426c484 Add shape detection logic only for circle icons
b/119330044

Change-Id: I93042effa8417167d844f073275e8b941e861e60
2019-06-03 14:05:20 -07:00
Tony Wickham e1cb93f957 Always place notification dots directly on adaptive icon path
- Calculate point on icon path nearest to top right corner, and
  use that as center for the dot
- Cleanup code related to dot offset

Test:
Set each style (different icon shape) and verify dot is in correct
placement for each of:
- Folders
- Icons in folders
- Icons in all apps
- Icons on workspace

Bug: 124414511
Change-Id: I036ed3677e8af222f00d4fad4a36a7e4d9b49ad9
2019-05-06 10:42:55 -07:00
Sunny Goyal 905262c1a7 Adding utility method to get adaptive icon scale
Change-Id: I5ff190c3b794bb13309375782ccd420e85b59091
2019-05-03 21:31:46 -07:00
Hyunyoung Song 2bf3f37f5a Fix icon shape refresh for widgets list / legacy shortcut black bg issue
Bug: 118085499
Change-Id: Ifc3c711815567f40f109e95bcb76c01f23b4a3a2
2019-04-02 11:00:50 -07:00
Hyunyoung Song de87a22773 Assign default adaptive icon background color
Bug: 126327184
Change-Id: I8c6db3cc0c2bf334862b60b0aa27aee4850039f1
2019-03-04 09:47:45 -08:00
TreeHugger Robot bd7678635e Merge "Prevent NPE inside iconloader library" into ub-launcher3-master 2019-02-12 18:09:08 +00:00
Hyunyoung Song f04391896a Prevent NPE inside iconloader library
Bug: 120439430

Even though there is @NonNull annotation, customers may not respect
this annotation.

Change-Id: I01679d01f6920c3cc945c4abe757b907f150aa23
2019-02-12 09:59:15 -08:00
Hyunyoung Song 224b028092 Increase icon cache version
Bug: 123939586

TL;DR;; For users that lost the change icon shape setting in home settings,
their icons will start upgrading to circle resulting in inconsistent
shapes.

Change-Id: Ibe5f1cdcc39a6b8688c287f46bcc7d7b09302b27
2019-02-12 09:23:04 -08:00
Sunny Goyal a5de7c7b52 Using android Q sdk in gradle
Change-Id: I5476b64b5279b5333a6bb241e67f35bf81dfe830
2019-01-30 11:41:02 -08:00
Sunny Goyal 8c48d8bea6 Changing min sdk to 25
Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
2019-01-29 11:29:52 -08:00
Sunny Goyal 90e3fbca62 Updating folder shape when icon shape changes
> Removing unnecessary threading logic and the code was running on main thread anyway

Bug: 118757840
Change-Id: I7a012db5a0dbe2c23bd6ff2cd39679a803731ee8
2019-01-23 16:43:26 -08:00
Hyunyoung Song a8dbe9267a Make createIconBitmap public method
Bug: 122545624

Change-Id: I47ff6ec20f9d34856a727bdf3e328acee0db7f32
2019-01-08 16:00:25 -08:00
Hyunyoung Song c55a350da8 Refresh icon cache when icon shape path has changed
Bug: 120505990

$ adb shell cmd overlay enable --user 0 com.android.theme.icon.roundedrect
$ adb shell cmd overlay disable --user 0 com.android.theme.icon.roundedrect
$ adb shell cmd overlay enable --user 0 com.android.theme.icon.teardrop
$ adb shell cmd overlay disable --user 0 com.android.theme.icon.teardrop

Change-Id: I06663b9727f7434aae737d39977f1e6cf09bffbf
2019-01-04 11:57:52 -08:00
TreeHugger Robot ddf3592803 Merge "Move BadgeRenderer to iconloader library" into ub-launcher3-master 2018-12-01 00:37:30 +00:00
Tony Wickham 8912b04c80 Move BadgeRenderer to iconloader library
- Rename BadgeRenderer to DotRenderer
- Move drawing parameters to new class DrawParams
- Add leftAlign param
Change-Id: I69de56c13280ba5e7e1ea3868c23edfac01012e9
2018-11-30 16:28:56 -08:00
Sunny Goyal b891eebbb5 Fixing shortcut icons are not getting correct color extraction.
> Avoiding color extraction for icons which have already be evaluated
> Fixing color extraction from hardware bitmaps

Bug: 111343544
Change-Id: I624866e892465684871fbc130003e32945d86460
2018-11-30 01:41:56 -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 066ace1b88 Replacing setAlphaComponent with setAlphaComponentBound for better animation interpolation
setAlphaComponent throws expetion for invalid range, which can cause brashes in overshoot
interpolation

Bug: 118390004
Change-Id: Ic9c5ff3d660eba353b982c4c47ccfaf329b3e296
2018-11-06 09:59:03 -08:00
Sunny Goyal 3ebe28a82b Fixing wrong directory pack for icon lib classes
Change-Id: Ic3690198b1c6204e322ba7b0f46ccef5dfa97181
2018-11-05 22:27:55 -08:00
Hyunyoung Song 719eee2be2 Create iconloader library
Bug: 115891474
Test: Builds everything

Change-Id: I1d75702d4e5a10d694eeb839784a629de2f74dd2
2018-11-02 14:18:45 -07:00