Commit Graph

41 Commits

Author SHA1 Message Date
Hyunyoung Song 793f5c5186 Merging from ub-launcher3-qt-future-dev @ build 6018744
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-qt-future-dev_6018744.htmlMerge commit '9353b00616ac688d2df6b9f8513c4895bb4119d7' into merge_ub-launcher3-qt-future-dev_6018744

Change-Id: Ie6235a262b7bba0aa9f2a2962a7aa499a0a2cb53
Merged-In: I8a1e20d0b175f03a1a05c81749f07ab5314e872a
2019-11-20 08:40:59 +00:00
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
Hyunyoung Song 227daf0108 ub-launcher3-qt-qpr1-dev @ build 5818303
Test: presubmit setup on source branch

Bug: 112282235  Starting an app from Launcher sometimes takes > 10 sec
Bug: 125027540  Apps to be searchable in different languages
Bug: 132336512  Notification dots on pinned shortcuts
Bug: 135218095  Disable unnecessary services
Bug: 136277517  Widgets often don’t support scroll direction up/down, left/right and use forward/backward instead
Bug: 137777105  Make clearcut launcher logging feature parity with westworld logging
Bug: 137952354  OnResume() and onStop logging doesn't reflect the real source id for -1 screen
Bug: 137953006  Swiping/fling up from workspace logged as hotseat
Bug: 138273985  The pause app message takes more than 30 seconds to display after restarting the device.
Bug: 138683199  Pass the captured snapshot data to Launcher when recents animation is cancelled
Bug: 138729456  [Flaky test] java.lang.AssertionError: http://go/tapl : Can't find an object with selector: BySelector [CLASS='\Qandroid.widget.TextView\E', PKG='\Qcom.google.android.apps.nexuslauncher\E', TEXT='\QShortcut 3\E'] (visible state: Workspace)
Bug: 138743758  [Flaky test] java.lang.AssertionError: App still doesn't have Pause action: com.google.android.calculator
Bug: 138743792  [Flaky test] java.lang.AssertionError: ensureScrollable didn't add Chrome app
Bug: 138964490  Investigate if ToggleableFlags can be connected with DeviceConfig
Bug: 139416391  CTS tests crash when app_prediction service is disabled
Bug: 139498375  Flake:     java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
Bug: 139540363  Launcher goes in crash loop

Change-Id: Iaba4ed67e9fe4f8f5858324201e4c4e8711f59fa
2019-08-21 22:20:03 +00: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
Winson Chung 3fc9a1cf69 Merging ub-launcher3-qt-r1-dev, build 5749827
Test: Manual

Bug:136282913 P1 Swipe up from Assistant Fulfillment Card Jank
Bug:137129923 P1 Pixel launcher is leaking memory
Bug:137161198 P1 Unable to pull notification panel down with a swipe on home screen
Bug:137253043 P1 "Pixel Launcher keeps stopping" when scrolling through recent apps
Bug:137487381 P1 Overview goes back to fullscreen when swiping up during transition
Bug:137836033 P4 Fail to stop music due to "Swipe failed to receive an event for the swipe end"
Bug:138152531 P2 [Android Q][04713598] Launcher test cases are failed
Bug:138236583 P1 Icon scale is wrong when dragging from all apps or folders
Bug:138251824 P1 Flake: want to switch from background to overview; Swipe failed to receive an event for the swipe end
Bug:138252347 P1 qt-r1-dev Pixel Launcher flag ENABLE_HINTS_IN_OVERVIEW is Disable by Default
Change-Id: Idd0e987d26e1ffc75cdb9f90e9c08c26bb8c6503
2019-07-23 20:54:13 -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
Winson Chung 5cd4333b5c Merging ub-launcher3-qt-dev, build 5691374
Test: Manual

Bug:115582915 P2 [Testing] Make all launcher tests gesture-stable
Bug:121280703 P2 Finish implementation of PortraitLandscape annotation for tests
Bug:124524897 P2 Enable some tests in OOP mode
Bug:129158983 P1 Badge bubbles with app icon; use launcher lib for icon, dot, badge rendering
Bug:131116002 P2 Convert tests to TAPL and enable them
Bug:131356741 P1 use transferFocus to implement SWIPE DOWN on homescreen to open noti shade
Bug:131360075 P1 [Gesture Nav] Polish/finish landscape
Bug:132309376 P1 Launcher held ION buffers after clearing all apps in Recent Apps
Bug:132455160 P1 [Gesture Nav] Home to Overview Transition Improvement
Bug:132461400 P1 Fatal exceptions in Launcher3
Bug:132811175 P1 Jump cut if you quickly open an app after going home
Bug:133450867 P1 App window draws outside of icon shape during app to home transition
Bug:133765434 P1 [Flaky test] Launching task didn't open a new window
Bug:133867119 P2 Lab-only flake: want to switch from workspace to all apps; Swipe failed to receive an event for the swipe end
Bug:134609899 P1 Overscrolling on all apps leads to a wrong current task
Bug:135011207 P0 Corner Invocation / Inconsistent - F/C
Bug:135150619 P1 [Launcher] Trigger heapdump on RSS HWM measurements
Bug:135150767 P4 [Launcher] Test reduced resolution snapshots
Bug:135161289 P2 KB3 on qt-dev can't pick Launcher3GoIconRecents from vendor Makefile
Bug:135222111 P1 Major issues with hotseat when predictions are disabled
Bug:135287203 P1 Overview crashes on rotation
Bug:135299165 P1 Configuration changes might result in Launcher ending up in a corrupt state
Bug:135472635 P2 Bad overriden class: java.lang.ClassNotFoundException: com.android.quickstep.QuickstepProcessInitializer
Bug:135473571 P0 Pixel launcher keeps stopping in SuW
Bug:135571566 P4 Search bar is above icons. Even opening and closing launcher does not help
Bug:135686388 P1 Quickswitch sometimes jump
Bug:135687556 P1 Increase assistant gesture touch region on new devices
Bug:135766310 P2 Concerns over config changes during state transitions #2
Bug:135769778 P1 "System navigation changed" notification is shown during P4 setup
2019-06-26 18:36:10 -07: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
Winson Chung a3ed49d566 Merging ub-launcher3-qt-dev, build 5633311
Test: Manual

Bug:119330044 P1 [STOPSHIP] Add back shape detection in Launcher icons
Bug:123900446 P1 App to home animation should zoom into the app icon
Bug:132298752 P1 Adding widget locks home screen page
Bug:132757019 P1 Swipe up twice quickly from app in 2 button mode; can't access all apps
Bug:133518678 P1 In 2 button mode, flinging up strongly favours quickswitch
Bug:133806285 P1 All apps causes overview to peek in
Bug:133844237 P1 Respect limited width Exclusion Rects in bottom area?
Bug:133867119 P2 Lab-only flake: want to switch from workspace to all apps; Swipe failed to receive an event for the swipe end
Bug:134062513 P1 Quickswitch sends lifecycle events to -1
Bug:134094839 P1 Launcher kept crashing on OTA update
Bug:134096917 P1 Launcher animation component gets stuck during swipe up
Bug:134164918 P1 STOPSHIP: Disable chips hard-coded value in qt_dev Launcher
Bug:134172603 P1 Tracing for lab-only flakes
Bug:134442147 P1 Sometimes All Apps won't update on app install/uninstall/update
Change-Id: Ia530fbf9bb5fa67b602ce44aef0cc4a1d1494e13
2019-06-04 12:20:05 -07: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
Hai Zhang b0be237b3f Align badging logic with platform IconDrawableFactory.
The current logic in BaseIconFactory is only trying to add the user
badge if the user passed in isn't null and isn't the current user,
then if no such attempt is made, try to add an instant app badge. This
is causing user badge to disappear if the current user is a work
profile. Meanwhile, the badging logic in IconDrawableFactory is to try
to add the instant app badge first, and then always try to add the
user badge.

Bug: 132625654
Test: manually test as in b/128625591
Change-Id: Ia5b456f1f27095d546504266a1a90034105c9ae9
2019-05-20 13:11:12 -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