1545 Commits

Author SHA1 Message Date
Xin Li
8891d70334 Merge SP1A.210812.016
Merged-In: I8b62b9b9d7ae271bc623764d545db1320b4dc64f
Change-Id: I458ed7f2eb8603f5e89c1d73bc0f0d52b826973e
2021-09-28 19:26:36 +00:00
Bill Lin
6b31395252 Don't create one-handed-background-panel after rotation
From code flow, when onConfigurationChanged() by rotating
OneHandedBackgroundPanelOrganizer#showBackgroundPanelLayer()
will be invoked and then create one-handed-background-panel
even though OHM is not activated.
Besides, this could introduce overhead on SF.

Test: manual rotate and dumpsys check HWC layers
Test: atest WMShellUnitTests
Bug: 196306312
Change-Id: Ia766078d5c76b08ab5b24e0ce965ad1d085e4686
(cherry picked from commit 27da5b04d44e76e884f8148684eb36311923c651)
2021-08-17 01:10:13 +00:00
Jason Chang
7bf628ff7c Merge "Fix one-handed mode tap app to exit doesn't work in factory boot" into sc-dev am: 20c38783c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15472778

Change-Id: Ia1c142195635b51b006a0773ab628291f03b2dc7
2021-08-06 05:48:10 +00:00
Jason Chang
20c38783c2 Merge "Fix one-handed mode tap app to exit doesn't work in factory boot" into sc-dev 2021-08-06 05:36:49 +00:00
Jason Chang
413ab9d586 Fix one-handed mode tap app to exit doesn't work in factory boot
Root cause:
1. Design change "tap app to exit" -> always being true, and settings
remove this option.
2. Tuning performance, due to 1, no longer listens to the key change,
so we remove the listener.

Solution:
Change getSettingsTapsAppToExit() API to return default TRUE.

Bug: 195629000
Test: Build ROM and factory-reset to test
Test: atest WMShellUnitTests
Change-Id: Id3c265258ed28f7e0aa54505c339671885d28fa7
2021-08-06 01:53:39 +00:00
Bill Yi
ee8f81d6b4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I682d240e086e7ea706c7a513b84e6e0e872b2365
2021-08-04 10:09:24 +00:00
Jason Chang
63f15d32dd Merge "Fix tutorial background color not up-to-date occasionally" into sc-dev am: 3ebd024a80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15373613

Change-Id: I55abb1baa725c312038fb454f9a3737d88c13fe7
2021-07-27 16:12:56 +00:00
Jason Chang
3ebd024a80 Merge "Fix tutorial background color not up-to-date occasionally" into sc-dev 2021-07-27 16:00:30 +00:00
Vadim Caen
733a7c94c5 Merge "Do not draw icon background if it shouldn't be seen" into sc-dev am: ee08a68fd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175437

Change-Id: Icb38e71a17f5b143545622411a690ff8b2985638
2021-07-27 10:20:07 +00:00
Vadim Caen
ee08a68fd4 Merge "Do not draw icon background if it shouldn't be seen" into sc-dev 2021-07-27 10:05:17 +00:00
Jason Chang
f40204087c Fix tutorial background color not up-to-date occasionally
1. Fix bug in the legacy code flow
   - Obtain color from contextThemeWrapper Theme_DeviceDefault_DayNight
   - In OneHandedDisplayAreaOrganizer#finishOffset()
     Remove redundant call "cb.onStartTransition" due to
     ambugiuous.

2. Improve performance
   - Remove redundunt callbacks.
   - Avoid create/remove leash on each start/end cycle.
   - Dispatch Transaction to bkg leash through onAnimationUpdate()
     bkg leash apply the same Transaction of display area.
   - Adjust animation duration of Tutorial panel.
   - Move bkg leash depend on yPos value to reduce SF
     componsition overhead.

3. Improve code readibility
   - Code flow : Register -> onStart() -> show  background ->
     detach background -> Unregister -> remove leash.
   - Remove redundant synchronization due to wmshell already
     guarantee thread safe.
   - Move getTranslationFraction to SettingsUtil.
   - Move getTransitionDuration to SettingsUtil.

Bug: 194507756
Bug: 193589897

Test: Local verify when changing dark theme and wallpaper theme.
Test: atest WMShellUnitTests
Change-Id: Ib55753be9e9f4665c20ad34437f86bf80cc9f3b4
2021-07-27 15:20:19 +08:00
TreeHugger Robot
4422d05a6a Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev 2021-07-23 22:42:14 +00:00
Wei Sheng Shih
b793b6c9b8 Merge "Fine tune splash screen icon generation algorithm" into sc-dev am: e2ff050fbb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283495

Change-Id: Ica8dc3566cdd82ebc7c39e4dc84e812589ed7ebb
2021-07-23 13:47:25 +00:00
Bill Yi
3c9f786cfe Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I326b034f3bacb172f66f1c2ddd76bb9f359bcfe5
2021-07-23 13:33:10 +00:00
Wei Sheng Shih
e2ff050fbb Merge "Fine tune splash screen icon generation algorithm" into sc-dev 2021-07-23 13:31:27 +00:00
Wei Sheng Shih
cda4fc034e Merge "Correcting the package name used on splash screen window." into sc-dev am: 0793f65c95
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15358033

Change-Id: Idcbb4bb2347d12d2083fb6b0e6a4a0d1f7736de3
2021-07-23 12:08:23 +00:00
Wei Sheng Shih
0793f65c95 Merge "Correcting the package name used on splash screen window." into sc-dev 2021-07-23 11:54:28 +00:00
Vadim Caen
496b4cbb86 Do not draw icon background if it shouldn't be seen
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests
Bug: 193608336
Change-Id: I824137e67eaa0133337fcaf55c44fca46bac8010
2021-07-23 13:27:11 +02:00
wilsonshih
7a7722abe0 Correcting the package name used on splash screen window.
The top activity in TaskActivitiesReport can be filter out if the state
of top activity is INITIALIZING, this doesn't make sense for splash
screen, because the state of the top activity do can be INITIALIZING.
Create a filed targetActivityInfo in StartingWindowInfo to specify the
starting activity info.

Bug: 193459277
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ifec7aff644013a0426e0622162ab24f6b9fb3d8f
2021-07-23 16:50:01 +08:00
wilsonshih
331615ad61 Fine tune splash screen icon generation algorithm
Filter out the translucent pixels when compute the foreground colors
of an adaptive icon, which should make sense because the translucent
pixels on icon should only used for decoration, do not let it affect
the opaque pixels, also with this filter we won't drop down the
performance when using palette.

Bug: 193304878
Test: manual launch single color background apps.
Change-Id: Ia9873cf907d30bb7f30318a289a54159d0a51ee3
2021-07-23 12:44:43 +08:00
TreeHugger Robot
c942d2fb69 Merge "Skip operation on content overlay if task's vanished" into sc-dev am: 5cac66cb4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15353756

Change-Id: Ib7ec12471d9aab62828471967baab803ea9c0b04
2021-07-22 23:33:40 +00:00
TreeHugger Robot
5cac66cb4e Merge "Skip operation on content overlay if task's vanished" into sc-dev 2021-07-22 23:20:20 +00:00
Winson Chung
36fe682d24 Merge "Skip animating out bubble screenshot if surface is not ready" into sc-dev am: d4dd12ee06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15352585

Change-Id: I17f146a6fd4e81b24b8540adb90009ce5fce40ef
2021-07-22 22:29:45 +00:00
Winson Chung
d4dd12ee06 Merge "Skip animating out bubble screenshot if surface is not ready" into sc-dev 2021-07-22 22:10:46 +00:00
Hongwei Wang
1817bc47bd Skip operation on content overlay if task's vanished
The stack trace in b/194344478 and b/194280568 is actually from the
preceding ActivityThreadTest test, which does not fail but does crash
certain test cases after that.

Since we may set a start delay on the content overlay fading out
animation, there is chance that onTaskVanished happens before it is
actually started. It's also possible that onTaskVanished happens during
the content overlay fadeout. This CL should have addressed both cases.

Bug: 194344478
Bug: 194280568
Test: atest --iteration 5 \
      ActivityThreadTest#testHandlePictureInPictureRequested_overriddenToEnter \
      ScreenshotTests#testScreenshotSecureLayers \
      TaskStackChangedListenerTest#testTaskChangeCallBacks
Change-Id: I81c0622966df32e02db7cb5aa3cd42d7c4af735e
Merged-In: I81c0622966df32e02db7cb5aa3cd42d7c4af735e
2021-07-22 21:38:57 +00:00
TreeHugger Robot
6043cd6908 Merge "Apply theme color and fade-in transition effect at the top of One-handed mode" into sc-dev am: a08d1cb0f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15234619

Change-Id: I0ec888e0bcbe99a6a666920ea2455e01372a2d3a
2021-07-22 20:31:41 +00:00
TreeHugger Robot
a08d1cb0f1 Merge "Apply theme color and fade-in transition effect at the top of One-handed mode" into sc-dev 2021-07-22 20:09:53 +00:00
Jason Chang
966382b0c9 Apply theme color and fade-in transition effect at
the top of One-handed mode

1. Implement the Dynamic color theme at the top Tutorial area
but the color should not be the same as the recents UI.

2. Do not translate Tutorial icon & text vertically, then provide
quick subtle fade-in effect for Tutorial window.

3. Apply new icon for tutorial.

Bug: 193126258
Bug: 193589897

Test: Local verify when changing dark theme and wallpaper theme.
Test: Local verify Tutorial icon & text fade-in effect.
Test: atest SystemUITests
Test: atest WMShellTests
Test: Perfetto check enter & exit performance
Change-Id: I60f4e7a709f3a27fe6c7f480f1012caccdbbe5ec
2021-07-22 23:00:06 +08:00
Wei Sheng Shih
22bfc66d5d Merge "Using BaseIconFactory to draw legacy icon." into sc-dev am: 61d71ccaae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15301161

Change-Id: I5cd5265571ec18a2b12a2270cebe6463c17cc871
2021-07-22 10:20:44 +00:00
Wei Sheng Shih
61d71ccaae Merge "Using BaseIconFactory to draw legacy icon." into sc-dev 2021-07-22 10:06:34 +00:00
Winson Chung
b9b673fb4a Skip animating out bubble screenshot if surface is not ready
Bug: 193634894
Test: atest SystemUITests
Change-Id: Ifb2ba00be2e8dc497300feb39bacb88b9021df4a
2021-07-22 04:29:56 +00:00
wilsonshih
45abb0b357 Using BaseIconFactory to draw legacy icon.
Use the shared launcher library to draw legacy icon.

Bug: 193780874
Test: launch app which still using legacy icon from Launcher.
Change-Id: Id8ccb5b6c532880ff207526fd754e92fdd08e284
2021-07-21 21:25:51 +08:00
TreeHugger Robot
fcdb62892c Merge "Fix entering PiP transition in button navigation mode" into sc-dev am: 73ef335c0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15329896

Change-Id: I73c79942f7fc7fb44d881929121100aa768e53cd
2021-07-21 03:05:12 +00:00
TreeHugger Robot
73ef335c0f Merge "Fix entering PiP transition in button navigation mode" into sc-dev 2021-07-21 02:48:29 +00:00
Hongwei Wang
33c3fcc671 Fix entering PiP transition in button navigation mode
Included in this CL
- when there is no source rect hint, use a content overlay during the transition
- otherwise, take account the display cutout to offset/inset the source
  rect hint

Test with following variants when entering PiP in button nav
- from 0 / 90 / 270 rotation
- with or without source rect hint
- display cutout mode set to default or shortEdge

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cxk4vy8VenQPSv83vHEs22
Bug: 191310680
Test: manual, see the test cases listed and video above
Change-Id: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
Merged-In: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
2021-07-20 23:43:23 +00:00
Ben Lin
09755b5477 Merge "PiP: Allow customization of PiP minimum size." into sc-dev am: c312c6481b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14077517

Change-Id: Ief4c4e03a5042e08e17d358f7f16380bcaacea1e
2021-07-20 20:55:36 +00:00
Ben Lin
c312c6481b Merge "PiP: Allow customization of PiP minimum size." into sc-dev 2021-07-20 20:35:36 +00:00
TreeHugger Robot
b62b4923e3 Merge "Fix One-handed tutorial looks janky on entering transition" into sc-dev am: ed889bb867
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283490

Change-Id: Ia178db437d9a69e728531ea124b31ce54a582be9
2021-07-18 17:45:08 +00:00
Bill Lin
500e2b146d Fix One-handed tutorial looks janky on entering transition
According to systrace, one-handed-tutorial-overlay got
jank problem(SurfaceFlinger GPU Deadline Missed,
App Deadline Missed, Buffer stuffing).

1.setLayerType(LAYER_TYPE_HARDWARE) when create targetViewContainer
  setLayerType(LAYER_TYPE_NONE) when removeTutorialFromWindowManager
2.Rename isShowing() to isAttached()
3.Remove redundant float casting
4.Remove redundant increment param

Test: manual trigger OHM
Test: atest WMShellUnitTests
Bug: 193589897
Change-Id: Ieec397795b46dee9ca04375bfc26b09441688d08
2021-07-16 19:21:15 +08:00
Ben Lin
f75fffdc20 PiP: Allow customization of PiP minimum size.
Bug: 171596717
Test: None.
Change-Id: I9bb6f2740d25fce99a436f938e7b3cca819ffa98
2021-07-15 12:21:30 -07:00
Wei Sheng Shih
992684e112 Merge "Get starting window background color directly." into sc-dev am: a9a861134d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15020163

Change-Id: I717ea735897a965380600a5305448582517cd160
2021-07-14 01:48:55 +00:00
wilsonshih
3be521ad48 Get starting window background color directly.
SystemUI does not need to re-calculate background color of starting
window because Shell library is bound to SystemUI, so status bar can
get background color directly, also this can support to get the
background color from snapshot starting window.

Also fix the starting window listener did not receiveing background
color successful because makeSplashScreenContentView is execute on
another background thread, so there should block the splash screen
thread until the background color is estimated.

Bug: 192213918
Bug: 192659309
Test: manual launch apps from Notification and Launcher, ensure the
color is correctly send to SystemUI or Launcher.

Change-Id: I626cb23d7aebfe4e032fad285bfad374c0e11cea
2021-07-13 18:53:19 +08:00
Bill Lin
b7cd46426b Merge "Redesign One-haned tutorial UX behavior" into sc-dev am: 5ad4a8093c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15187818

Change-Id: I26effcc821b60576abee355ee0cc48830fea5715
2021-07-12 20:26:40 +00:00
Bill Lin
46a7a35230 Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev am: 1334cfb90d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15243692

Change-Id: Ib1b98cb9f536d134ad4400df8f36e8fe79431870
2021-07-12 20:26:30 +00:00
Jason Chang
4d9609f929 Merge "Add metrics log for One-handed mode Shortcut toggle switch" into sc-dev am: 56bb99d410
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15207284

Change-Id: Ic9fd871f1bc495273e92a7d034ee8883d73539ee
2021-07-12 20:19:09 +00:00
Bill Lin
caca5485ad Merge "Improve SystemUIBootTiming performance in OneHandedController" into sc-dev am: 7f162ddaf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175505

Change-Id: I004245f3f0fd9fec6f05b7a19b9d911b6b616e0d
2021-07-12 20:18:03 +00:00
Bill Lin
5ad4a8093c Merge "Redesign One-haned tutorial UX behavior" into sc-dev 2021-07-10 01:05:11 +00:00
Bill Lin
1334cfb90d Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev 2021-07-10 01:03:56 +00:00
Bill Lin
80b340a9aa Improve SystemUIBootiming_StartServices_avg
Previously, we tried to tuning boottime of SysUI
See go/systemuiboottiming_ohm
- Reduce access setting provide at SysUI start-up
- Remove unused obervers
  1. Timeout
  2. TapAppExit
- Update mShortcutEnabled state at ctor

Test: manual enable OHM shortcut, rebot
      make sure shortcut function works
Test: atest WMShellUnitTests
Test: asit/perf/boottime_test
Bug: 193225130
Change-Id: I2753f8b1e47622c00b9c6d2f4cd319c6e43634ea
2021-07-09 21:31:05 +08:00
Bill Lin
477c88a7d5 Redesign One-haned tutorial UX behavior
- Always show tutorial for user to know device state
  is in One-handed mode.
- Clean the redundant params from ctor

Test: manual trigger OHM
Test: atest WMShellUnitTests
Bug: 192648901
Change-Id: I10c3f3f29190b672fb88471df3cf374a994cdaa7
2021-07-09 19:05:05 +08:00