Commit Graph

1709 Commits

Author SHA1 Message Date
Wei Sheng Shih
32832d9264 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: I7a84249d6a0550d6307f5b3b0e0c2628b5aeb108
2021-07-23 13:48:32 +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
504d9d2c8a 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: Idd26d598e12ccbf9febfa9ac954ebf58a648b8e8
2021-07-23 12:08:45 +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
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
46ec4b0601 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: Ibb65f7dbd658399a311534d6d1325c2b0c2cbaf5
2021-07-22 23:33:48 +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
2730ad4539 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: I4f8c199c613f74b813e6426e5ebcbbc8d40e4d08
2021-07-22 22:30:16 +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
eddf948d71 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: Id8269fd9a67aba5f5f47ea0738212db022546d75
2021-07-22 20:31:46 +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
f1493ded90 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: Ia179a14816f1330ef6853fee84c0bd4bb359da4a
2021-07-22 10:25:01 +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
6a1256345e 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: Ic2d53d2a8640ebd2b3e589cfb3b226059eed5a32
2021-07-21 03:05:27 +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
d87deceb6e 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: I1059c3c96a81084f1fb55b2f99590f4b33bfdbd5
2021-07-20 20:55:45 +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
39e2268eae 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: If692ba732f26e114ea41f4e939768cb782a6e19b
2021-07-18 17:45:47 +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
47dc082e47 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: Ie972597bfe9e2d9ba342977992945bfa93c2ed25
2021-07-14 01:49:00 +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
b174f409cc 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: Icbb73b71e35d18189623549a715763d8445dce6a
2021-07-10 01:10:53 +00:00
Bill Lin
9e70c42838 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: I5360b11f2c7cce3f68c3c1133d13049480b0280e
2021-07-10 01:10:37 +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
Jason Chang
c29f0ed07a 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: Ic18a792eae8fdeffb3ef013859e79e1aedd58083
2021-07-09 11:41:51 +00: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
Jason Chang
97b75f09ed Add metrics log for One-handed mode Shortcut toggle switch
To write metrics log for One-handed mode Shortcut toggle switch state.

Bug: 192641587

Test: Local add logs to verify before writing metrics logs API call
Test: atest SystemUITests
Test: atest WMShellTests
Change-Id: I02fda724bf2960355d78f1a26ac6d65225687176
2021-07-09 03:24:58 +00:00
Bill Lin
bf112d0345 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: Id0ed788a5ee73ce7f96299ec982b2b9ed446bbf2
2021-07-09 02:01:27 +00:00
Bill Lin
7f162ddaf0 Merge "Improve SystemUIBootTiming performance in OneHandedController" into sc-dev 2021-07-09 02:00:33 +00:00
Chris Li
886a6697a8 Merge "Revert "Revert "Not show size compat UI when task is not visible""" into sc-dev am: 50c03ea7ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15237129

Change-Id: I96bff925796ffb4fffe341b1f47837ed947d464b
2021-07-08 22:02:11 +00:00
Chris Li
a23a2bb5db Revert "Revert "Not show size compat UI when task is not visible""
This reverts commit 76370b6fe6.

Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java

Fix: 193069342
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
2021-07-08 12:09:40 -07:00
Chris Li
499ae14a2b Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev am: e7ed99bfc2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156978

Change-Id: I61290dd22d7b09da8bd0c9844dff7bc5bc17767a
2021-07-08 18:15:30 +00:00
Chris Li
e7ed99bfc2 Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev 2021-07-08 18:05:40 +00:00
Leon Jeng
4e86d92f71 Revert "Not show size compat UI when task is not visible" am: 76370b6fe6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232572

Change-Id: I81a2d61f20edb535a66db95b147d4524a6af61ff
2021-07-08 10:00:56 +00:00
Leon Jeng
76370b6fe6 Revert "Not show size compat UI when task is not visible"
This reverts commit adb92508c0.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=coral-userdebug&lkgb=7530814&lkbb=7530923&fkbb=7530923, bug b/193105445

Bug: 193105445
Change-Id: I697229da6986d6466d7f13872e9ae7a727b80838
2021-07-08 09:48:10 +00:00
Chris Li
1402f79d1b Merge "Not show size compat UI when task is not visible" into sc-dev am: 927c644bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225378

Change-Id: Id466815f9039f9a8c1991f9b225757989536b5c7
2021-07-08 07:00:02 +00:00
Bill Lin
3aafe19994 Improve SystemUIBootTiming performance in OneHandedController
Fix race condition in SystemUIBootTiming issue.

1. Avoid updateOneHandedEnabled() called twice during init
   a. [O] come from setOneHandedEnabled()
   b. [X] come from setSwipeToNotificationEnabled()
2. Passively waiting shortcut enabled changed callback, and then
         query setting ACCESSIBILITY_BUTTON_TARGETS status.
3. Add a new flag isShortcutEnabled to cache shortcut enabled
   state.
4. By new OHM Settings UX design setSwipeToNotificationEnabled()
   should NOT setEnabledGesturalOverlay().
5. Remove redundant auto enabled Toast and print in log instead.
   (In general case, user is not able to see the Toast)

Test: atest google/perf/boottime/boottime-test
Test: atest SystemUITests
Test: atest WMShellTests
Test: manual factory reboot, OHM should disabled by default
Bug: 192612924
Change-Id: I8b24c99bc8bd5bfb17c73a6bb8494109d9a8170d
2021-07-08 14:14:25 +08:00
Chris Li
927c644bfa Merge "Not show size compat UI when task is not visible" into sc-dev 2021-07-08 05:53:15 +00:00
Chris Li
1245aefa49 Remove TaskInfo#topActivityToken usage in size compat for security
Security report shows that this can cause leak token of different app.

Replace the functionality with a callback to the TaskOrganizerController
to restart activity when size compat restart button is clicked.

Bug: 186776724
Test: manually verify the restart button still works
Change-Id: I097b9f02e8435e6765695b9d5a531a4e165bac66
Merged-In: I097b9f02e8435e6765695b9d5a531a4e165bac66
2021-07-07 21:09:24 -07:00
Chris Li
adb92508c0 Not show size compat UI when task is not visible
Before, when a size compat task was hidden, the size compat UI might
still be showing. Now, remove the UI when the task is no longer visible.

Bug: 193069342
Test: manually verify the size compat button is not showing in recents
Change-Id: Ia17a97f5e7a9af497d8da16b31bb5169dd502d53
2021-07-07 17:46:08 -07:00
Ben Lin
8d8342cc99 Merge "PiP: Update accessibility window as menu shows/hides." into sc-dev am: c701a4c904
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15191317

Change-Id: I69f7a6a1aab9feb8d9c45cb7275c17d1ab2621b0
2021-07-08 00:15:29 +00:00