Commit Graph

1517 Commits

Author SHA1 Message Date
Evan Rosky
6f56237160 Merge changes I710805c8,Ie26d634b into sc-v2-dev
* changes:
  Create a LegacyTransitions to manage combined WCT + remoteanimation
  Aggregate stage-split operations into WCT
2021-07-19 15:31:15 +00:00
TreeHugger Robot
ae942fcf7d Merge "Fix OHM H/W key shortcut dosn't work appropriately" into sc-v2-dev 2021-07-19 03:23:57 +00: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
Evan Rosky
6139cf51b2 Create a LegacyTransitions to manage combined WCT + remoteanimation
Use this to implement Drag-to-split transition

BYPASS_INCLUSIVE_LANGUAGE_REASON=using existing API.

Bug: 192291727
Test: drag from taskbar into split and observe. Also,
      drag same-app into split and observe no-op.
Change-Id: I710805c85c7d57ae8eebe18e5df7fca899f1b882
2021-07-16 19:06:14 -07:00
Evan Rosky
e9f13e1341 Aggregate stage-split operations into WCT
Previously different operations were just applying transactions
as they were called. We need better control over this for
synchronization purposes, so we basically pass wct into these
operations so that everything can be aggregated into one WCT
if desired.

Bug: 192291727
Test: existing tests pass (this is a refactor)
Change-Id: Ie26d634bcd3ab6baf4d2a4788986689914a58c13
2021-07-16 17:17:33 -07:00
Mady Mellor
6de523e30b Merge "Only load the overflow data once" into sc-v2-dev 2021-07-16 17:59:01 +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
Bill Lin
420036710b Fix OHM H/W key shortcut dosn't work appropriately
When one-handed mode disabled
1. Turn on the shortcut of the OHM with hold volume keys
2. Hold the volume keys
Should trigger one-anded mode

Due to S/W & H/W shortcut keys are mapping to different settings
S/W : ACCESSIBILITY_BUTTON_TARGETS
H/W : ACCESSIBILITY_SHORTCUT_TARGET_SERVICE
We should check both status of the them.

Bug: 193411296
Test: atest WMShellUnitTests
Change-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
2021-07-16 11:09:57 +00:00
Mady Mellor
c88902ca0b Only load the overflow data once
We would also try loading the overflow data if it was empty
but this works poorly if it's becoming empty due to an app
cancel because we could load contents that are about to be
removed.

I think this can safely work if we just load it based on
the flag.

Adds a test related to this that was only in BubblesTest to
 NewNotifPipelineBubblesTest as well

Test: atest BubblesTest NewNotifPipelineBubblesTest
Test: - have nothing in bubble overflow
      - post 3 bubbles, cancel all, get a bubble, look in the overflow
      => the 3 bubbles shouldn't be there
Bug: 193560795
Change-Id: I1ec2d637281807ae3a2ec7430cff6627b074fa78
2021-07-15 22:13:04 +00:00
Mady Mellor
5474359369 Fix dismiss not working in landscape
In stack animation controller only one target would ever
be added so when the target is re-created after rotating
then it wouldn't be used.

Test: - have some bubbles, drag them around, rotate device, try to
        dismiss them => they can be dismissed in landscape
      - get more bubbles, rotate back to portrait, try to dismiss
        them => they can be dismissed in portrait
      - drag the stack around the edges of the screen and verify that
        the only magnetic spot is where the dismiss target is
Fixes: 193008696
Change-Id: I6b24b1f9d301d37749dc67c95392fd6c8451df00
2021-07-15 19:21:45 +00:00
Tony Huang
f6b894be70 Merge "Migrate rotation animation to shell transition" into sc-v2-dev 2021-07-15 05:48:27 +00:00
Tony Huang
b9559a6f80 Migrate rotation animation to shell transition
Migrate rotation animation in wm core to wm shell and used in
shell transition.

Bug: 190002115
Test: manual rotation the device
Change-Id: Ib3404eeb7ac647774ea3be2707c9515371ab0976
2021-07-15 10:33:49 +08:00
Tony Huang
dda8850a7e Fix main stage full screen after lock phone
We will set main stage to full screen when it visible but side
stage not visible, but we should not do it when phone unlock.
Add isSleeping check to avoid such problem.

Fix: 193605614
Test: pick any 2 apps to stage split then lock and unlock phone.
Change-Id: I0fd99960ca0c5a10ac33b23f92f01d9b48877379
2021-07-14 17:38:05 +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
Ben Lin
26ab789b77 Merge "PiP Transition: Support auto-enter PIP" into sc-v2-dev 2021-07-12 18:02:57 +00:00
TreeHugger Robot
a48cf0c2ea Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-07-12 14:05:17 +00:00
Bill Yi
fa14bbb966 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iaf7e215a10a33572728d0cd72df17e79271e44e4
2021-07-12 11:55:14 +00: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
1334cfb90d Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev 2021-07-10 01:03:56 +00:00
Ben Lin
689ae63434 PiP Transition: Support auto-enter PIP
Bug: 165793917
Test: Enable Shell transition, enter PIP via gesture (auto-enter)

Change-Id: Icbec8d1af36d9904bc192e27cef434eca083f6d6
2021-07-09 16:37:10 -07: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
206ad5db63 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: If2a40b20a577f56084854de918b3a1776e92247b
2021-07-09 11:42:23 +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
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
Evan Rosky
33edb79a30 Merge "Hooks for interracting with stage split components using legacy recentsanimation" into sc-v2-dev 2021-07-08 22:05:54 +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
Evan Rosky
17b6a3939f Hooks for interracting with stage split components using legacy recentsanimation
Recents is pretty complicated, so the best way to deal with this is to
have launcher notify/query shell when entering recents. This gives
shell a chance to prepare and then provide relevant leashes (for now
just the bar, but it may include others in the future like side-
outline).

Bug: 192292305
Test: Enable SPLIT_SELECT and go to recents from split.
Change-Id: Iff6b14a1b0b95f207bdaa341c62fc6582659e923
2021-07-08 09:03:29 -07:00
Evan Rosky
5ca3820ae6 Hook up split-launch to legacy transition system
Part 1 of hooking up stage-split to legacy stuff. This
actually routes the legacy remoteAnimation through shell
in order to gather the dividerbar and interract with the
WindowProcessController

Bug: 192279476
Test: atest WindowOrganizerTests.
      use SPLIT_SELECT to launch 2 apps in split and observe.
Change-Id: I4f8802e6eb33f068fae0e4b3c12942bea76e332b
2021-07-08 09:02:59 -07: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
9d86a7b10f Merge "Remove TaskInfo#topActivityToken usage in size compat for security" into sc-v2-dev 2021-07-08 03:49:35 +00:00
Jerry Chang
5917a9cc73 Merge "Prevent flickering between fullscreen and multi-window of main stage" into sc-v2-dev 2021-07-08 01:36:39 +00: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