Commit Graph

583 Commits

Author SHA1 Message Date
Jerry Chang
70fb265591 Merge "Make divider bar flings smoother when snap-to-dismiss split" into sc-v2-dev 2021-08-09 14:06:59 +00:00
Jerry Chang
bc1eba66ec Make divider bar flings smoother when snap-to-dismiss split
Bug: 195699800
Test: dismissing stage split with divider bar will fling the divider bar
      smoothly to the edge of the screen before split been dismissed.

Change-Id: Ic3bb2d9bc6da82773b7818c70dc535a5cea8e437
2021-08-09 11:30:10 +08:00
Evan Rosky
bc047eeedd Differentiate seamless rotations in shell transitions
Shell owns the whole display rotation animation now. So, we
can just provide enough information for it to decide when
seamless is requested/appropriate. The default behavior (when
not explicitly animating) is already a jump-cut/seamless, so
just skip the rotation animation if we are doing seamless

Bug: 194693472
Test: atest SeamlessAppRotationTest ShellTransitionTests
Change-Id: I64748f5910c04784fd9818818b029fa5f1339c6c
2021-08-05 10:11:52 -07:00
Mady Mellor
3289ae9f64 Update the flyout width to be smaller on large screens
On phone we use 60% of the screen which is huge on
tablet. This change uses 30% of the screen for the
flyout on large screens & enforces a minimum for
that value.

Test: manual - get a long message in a bubble on a
               tablet, it should have similar width
               as it does on phone.
Bug: 186776550
Change-Id: I500c566edd9941dc2bd149692eaf95c6e6f4aa61
2021-08-02 14:03:01 -07:00
TreeHugger Robot
0b7f506aa9 Merge "[DO NOT MERGE] Full - Compatibilize winscope with master" into sc-v2-dev 2021-07-30 14:47:23 +00:00
Jerry Chang
581d500ee6 Merge "Fix the content of the bottom split being truncated while showing IME" into sc-v2-dev 2021-07-30 12:17:48 +00:00
Jerry Chang
da44526b9b Fix the content of the bottom split being truncated while showing IME
Freeze the configuration size when shifting split layout so that client
apps can calculate insets properly and won't get config or relaunch.

Fix: 192410210
Test: atest WMShellUnitTests
Test: verified the content of the bottom split won't be truncated when
adjusting split layout with IME and won't get relaunch.

Change-Id: I38da063ffacc19b691c14b74d118949293414492
2021-07-30 16:00:57 +08:00
Evan Rosky
cc3b202fab Merge "Add some more transition filter properties" into sc-v2-dev 2021-07-30 01:41:51 +00:00
Evan Rosky
adb7e53532 Add some more transition filter properties
These are needed for keyguard transitions. The ones added are:

A NOT requirement which will reject transitions with a matching
change.

The ability to match containers that aren't independent.

Checks for global transition flags as well as individual change
flags.

Match only if container is a task.

Bug: 191799478
Test: atest ShellTransitionTests
Change-Id: I963c6c91cdfc0b71a75ba9656261bb0e237f11f1
2021-07-29 15:05:24 -07:00
Jason Chang
47abd6c2b2 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: I1cba57040d1b3d78a096f8336359fd0e3d64e52f
2021-07-29 19:06:03 +00:00
Wei Sheng Shih
8ea3583b8d 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: I28623c6b9596275536a1e3f979cd9650f8082b3e
2021-07-28 14:49:43 +00:00
Nataniel Borges
3dab1eaeec [DO NOT MERGE] Full - Compatibilize winscope with master
Bug: 194813677
Test: none
Change-Id: I88e0e6d5b75ae3511491d6711279b951b3d9c761
2021-07-28 07:23:14 +00:00
Winson Chung
c7f047b287 Disallowing dragging to fullscreen
- Removing some tests related to dragging tasks to fullscreen and
  dragging non-resizeable tasks (supported now)

Bug: 182981887
Test: atest DragAndDropPolicyTest

Change-Id: I492b69ab81964e94db2e23b3ee11093e62040a35
2021-07-27 13:32:32 -07: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
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
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
TreeHugger Robot
989aee5581 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: I3136887f13ca30c8ec72d6288b2c17e9a321c85f
2021-07-18 17:45:53 +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
TreeHugger Robot
2bd69d1eda Merge "Add adb command to toggle side stage outline border" into sc-v2-dev 2021-07-14 04:03:59 +00:00
Wei Sheng Shih
76d20eedf6 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: I46ebb85f40dab8cd27f520fbdac81656fea52d51
2021-07-14 01:50:27 +00:00
Jerry Chang
0b106a923d Add adb command to toggle side stage outline border
Make the outline boarder of the side stage default off. Add an adb
command to toggle on/off the boarder.

$adb shell dumpsys activity service SystemUIService WMShell
setSideStateOutline <true/false>

Bug: 189839391
Test: verified the adb command could toggle on/off side stage outline
border.

Change-Id: I4c09b072b384badd206f0e81eca6daa033ac8565
2021-07-14 01:09:22 +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
Tony Huang
152f01c18f Merge "Set stage outline layer to top" into sc-v2-dev 2021-07-12 10:17:33 +00:00
Tony Huang
efbc8c1028 Set stage outline layer to top
Outline do not set layer before so it will show behind tasks layer
then it will be invisible. Set its layer to top to ensure it's
visible.

Also fix context error message bug by replacing display context to
window context.

Fix: 192902371
Fix: 192527238
Test: Enable spilt and disable it many times and check outline display
Test: Check ContextImpl log
Change-Id: Ic1796965d7254d2276d4c05c662e940820c8d995
2021-07-12 16:44:23 +08:00
Chris Li
56f9dc1299 Skip AppPairs and LegacySplit flicker tests when Shell transition is on
AppPairs: no plan to update to Shell transition soon
LegacySplit: will be replaced by StageSplit in sc-v2

Bug: 183993924
Test: pass existing
Change-Id: I1cd485126356ae5d628b13cc33f883d61430285d
2021-07-11 13:02:01 -07:00
Bill Lin
6412447d27 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: Iaaa00752187baa50b75e14aedd25c08cfbc31e98
2021-07-10 01:10:53 +00:00
Bill Lin
1e1856fc4d 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: Ibcef8192752d2a20bf9b047e2d02f925a23346d9
2021-07-10 01:10:49 +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
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
Bill Lin
8db534922d 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: I678c86456cea4da5cee5be133fde3bba4881da10
2021-07-09 02:02:24 +00:00
Bill Lin
7f162ddaf0 Merge "Improve SystemUIBootTiming performance in OneHandedController" into sc-dev 2021-07-09 02:00:33 +00:00
Chris Li
c769062301 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: I8c2e257e5a2b7d89814288d5d8cd2e24af76c722
2021-07-08 22:03:19 +00:00
Chris Li
64c167d613 Merge "Skip stage-split stateChange tests when using shell transit" into sc-v2-dev 2021-07-08 20:12:32 +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
e7ed99bfc2 Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-dev 2021-07-08 18:05:40 +00:00
Leon Jeng
979db138fe 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: Ib61cabd6c4d77d4fa5cd3f64b2272fcd684db153
2021-07-08 10:01:44 +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
2d8b03190d 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: Ic80035d84e4e2f2a5471bd4f85cc90ff61cda49f
2021-07-08 07:01:54 +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
Chris Li
ae54032e9a 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
2021-07-07 12:50:53 -07:00
Evan Rosky
12056ba8f2 Skip stage-split stateChange tests when using shell transit
with shell transitions, the transition itself manages stage-split
state.

Bug: 183993924
Test: atest StageTaskListenerTests
Change-Id: Ic742d3a23c080d68812a5795ab490b56eea7e4a4
2021-07-06 03:42:31 +00:00
Vadim Caen
c56fa470bd Merge "Implement the legacy splash screen behavior" into sc-dev am: 2be72d030b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14920934

Change-Id: If3cb25fa466589eed613c1b122e638533631a549
2021-07-05 15:46:35 +00:00
Vadim Caen
f08dae3158 Implement the legacy splash screen behavior
For apps opted out of the new splash screen, we show the full background
drawable.
Ensure there has send the splash screen background color to
StartingWindowListener.

Bug: 182880656
Test: manual set useLegacy to true then verify legacy splash screen.
Test: atest WmTests:ActivityRecordTests
Test: atest StartingSurfaceDrawerTests

Change-Id: Icf662f3c5f368f447e718f82f78dc25b909ca9be
2021-07-01 15:05:06 +08:00
Jorge Gil
7e3e33bb3c Merge "Check the min menu size when exp. to normal bounds" into sc-dev am: 47aa9f156e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15144952

Change-Id: If7c231a6a9a03b7d71222727bf1d803186710029
2021-06-30 03:33:15 +00:00
Jorge Gil
47aa9f156e Merge "Check the min menu size when exp. to normal bounds" into sc-dev 2021-06-30 03:32:16 +00:00
jorgegil@google.com
dcb5e60c38 Check the min menu size when exp. to normal bounds
The normal bounds may be too small to fit all menu
icons, so before expanding to the normal bounds,
first check that the expected menu size will fit and
if not adjust the bounds so that it will.

Bug: 191296663
Test: atest PipBoundsAlgorithmTest
manual - verify vertical YT video fits all three actions

Change-Id: I531d86501927a6a3ffeb069193c592366ef8f584
2021-06-29 10:39:00 -07:00