Commit Graph

501 Commits

Author SHA1 Message Date
TreeHugger Robot
5bb5544909 Merge changes I057989ea,Ic2b318e4,I266d4a03
* changes:
  Fix some deprecation warnings in WM Shell.
  Clean up SysUI Kotlin warnings
  Clean up some deprecation warnings in SettingsLib
2021-01-21 02:16:27 +00:00
Hongwei Wang
418ac0a7ee Merge "Delay the PiP menu attachment" 2021-01-20 21:37:56 +00:00
Wale Ogunwale
a648085407 Merge "WindowContainerTransaction for setting adjacent roots" 2021-01-20 20:10:12 +00:00
Winson Chung
94891df66a Merge "Move the overflow ui to the bubble window" 2021-01-20 17:48:55 +00:00
Wale Ogunwale
c04c4c1098 WindowContainerTransaction for setting adjacent roots
Ability to specify that 2 root tasks are adjcent there by allowing them
to occlude their parent. Similar to how the legacy primary/secondary
split windowing modes are used to occlude their parent.

Also, occlude parent if a child in multi-window mode as a matching
bounds.

Bug: 177166639
Test: AppConfigurationTests#testSplitscreenPortraitAppOrientationRequests
Change-Id: I7d54bfa188700a76b0bca911d2011123c21553ad
2021-01-20 06:37:04 -08:00
Hongwei Wang
ba4ded96a4 Delay the PiP menu attachment
The flash at the end of entering PiP transition in gesture navigation
mode is a regression from ag/12997165. Fixed by delaying
PipMenuController#attach late (when the leash is set to transparent) in
the process to avoid any artifacts on the leash caused by addShellRoot.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/dFdpJHvTCP6NmNEkDHrtei
Bug: 174814759
Test: see video
Change-Id: I7e74253f94b16977d04e27c2ab76fd3178001630
2021-01-19 17:51:41 -08:00
Winson Chung
ebf6903682 Move the overflow ui to the bubble window
- An activity always runs on the main looper of the process
  and this simplifies threading since all bubble data will
  run on the shell thread
- The BubbleExpandedView will not initialize the task view
  when mIsOverflow is set.  We still snapshot the overflow
  view to keep the existing selection animation logic the
  same between overflow/task bubbles

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SytemUITests

Change-Id: If3632a3030c58c9ec334afcb06aac4c51e28938b
2021-01-19 14:39:39 -08:00
Yuncheol Heo
cbb25bcfc3 Merge "Fix NPE in TaskView." 2021-01-19 21:54:49 +00:00
TreeHugger Robot
92f15b66e9 Merge "2/ Fix flaky in WMShellFlickerTest legacySplitScreen tests" 2021-01-19 09:27:52 +00:00
TreeHugger Robot
7ecc9ac716 Merge "Refactor OneHanded mode UiEventLogger implementation" 2021-01-19 08:55:19 +00:00
Tony Huang
83254fb5f8 Merge "Use queue to defer all task events" 2021-01-19 07:18:53 +00:00
Bill Lin
91f0e46305 Refactor OneHanded mode UiEventLogger implementation
1) Move UiEventLogger from static to non-static
2) Rename to OneHandedUiEventLogger to align wm-shell components
3) Remove unused code from OneHandedUiEventLogger
4) Refine the call of stopOneHandedWithUiEvent()
5) Only register TaskStackListenerCallback when enabled
6) Override getId() in the enum to ensure UiEventLoggerImpl
   can obtain the event corresponding id accordingly

Fixes: 176513465
Test: adb shell cmd stats print-logs
Test: manual + statsd_testdrive -terse 90
Test: atest WMShellUnitTests
Change-Id: Ic2fb1a2bbf87e647b0883d50b64ced53aa37d613
2021-01-19 10:11:58 +08:00
Yuncheol Heo
97ae10814c Fix NPE in TaskView.
Bug: 177646952
Change-Id: I14c0244e2d4b494491092c09f96bb50d9c2ceaaf
2021-01-18 13:59:15 -08:00
Bill Lin
c952210248 2/ Fix flaky in WMShellFlickerTest legacySplitScreen tests
b/177374067 indicate OpenAppToLegacySplitScreenTest still flaky
1) Extend the filter in visibleLayersShownMoreThanOneConsecutiveEntry()
   - Toast window
2) When going split transition, waitForAppTransitionIdle() at end
3) Enable navBarLayerIsAlwaysVisible() & statusBarLayerIsAlwaysVisible()

Test: atest com.android.wm.shell.flicker.legacysplitscreen
Test: Set TEST_REPETITIONS to 100 and run flicker test stressfully
Bug: 177374067
Bug: 176923301
Bug: 176134495
Change-Id: I1caface176f4af591d5383877c81b786eb23ba58
2021-01-18 11:47:32 +08:00
Tony Huang
28fb865b01 Use queue to defer all task events
It has two layer defer currently, it should only remain queue
events method. Remove using of mDeferTaskOrgCallbacksConsumer
and extand using of queue method to onTaskAppeared,
onTaskVanished and onBackPressedOnTaskRoot.

Bug: 171749427
Bug: 177551997
Test: check split screen, PiP and bubbles work normally
Test: atest WmTests:WindowOrganizerTests
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: Ic8fea93117f45b60f15b06773eefbbde11e48fd5
2021-01-18 11:44:19 +08:00
Evan Rosky
c7bd598702 Merge "Add support for remote transition playback in shell transitions" 2021-01-15 18:23:09 +00:00
Michael Wright
64dcb6e4b6 Fix some deprecation warnings in WM Shell.
Also, it seems like the vibrate call was always broken by conflating
effect IDs with durations. Fixed that, which should hopefully provide a
better haptics experience.

Move things to use more Kotlin idioms along the way as well.

Bug: 177652618
Test: manual
Change-Id: I057989eab8f6728953c2c4f0d7489a5aa0e9bf2d
2021-01-15 15:36:48 +00:00
Evan Rosky
6d4c6ec276 Merge "Revert "Use queue to defer all task events"" 2021-01-15 00:08:16 +00:00
Evan Rosky
30f3544f65 Add support for remote transition playback in shell transitions
This adds IRemoteTransition interface for other processes (like
launcher) to register for playing transition animations.

Then there are 2 supported ways to "register":

1. Is to attach an IRemoteTransition to ActivityOptions. To
   support this pathway, requestStartTransition now takes a
   TransitionRequest object which can contain whatever info
   is needed at the time. One piece of that is the passed-in
   IRemoteTransition.

2. Is to register directly with shell (via systemuiproxy for
   now) with a TransitionFilter. This filter allows shell
   transitions to dispatch a transition to a remote without
   need to make queries over binder.

This also hooks up launcher animations by converting the new
transition info to the old RemoteAnimationTargetCompat stuff.

Bug: 169035082
Test: launch app from launcher and observe the icon animation.
      atest ShellTransitionTests
Change-Id: I8014a6f46cffda3a48a1a4ae101e2643078f4a14
2021-01-14 14:50:51 -08:00
Evan Rosky
1dd669ae2b Revert "Use queue to defer all task events"
This reverts commit 4c564ef04f.

Reason for revert: suspected culprit for b/177551997

Change-Id: Idf7ae363faba73bf4c79185b4069201f7173e1ab
2021-01-14 21:42:52 +00:00
Jerry Chang
d19771c9af Add double tap callback for divider bar
Add a callback in split layout to notify registered listener when users
double tapped the divider bar. Use this callback to switch side stage
position.

Bug: 176061049
Test: atest SplitLayoutTests
Test: manual check stage position changed when double tapped divider bar
Change-Id: Id3929b01a194b8eb0838cc892156bbbe48dc8690
2021-01-14 18:07:30 +00:00
Winson Chung
f74cdbed2f Merge changes I0ea9aae2,I369e83cb
* changes:
  5/ Update splitscreen to use shell main thread
  4/ Update HideDisplayCutout and AppPairs to use shell main thread
2021-01-14 03:38:50 +00:00
Wale Ogunwale
a0f9c56968 Merge "Additional interfaces for main/side stage split-screen model" 2021-01-13 22:17:35 +00:00
Evan Rosky
bf982054fe Merge "Finish incomplete merge" 2021-01-13 19:52:22 +00:00
Winson Chung
c31ec3d518 Merge "Migrate FrameTracker to use ST Jank information" 2021-01-13 19:36:00 +00:00
Evan Rosky
94c1b01e6e Finish incomplete merge
Bug: 177440160
Test: builds
Change-Id: Idfb134838e44a72e2c1eef31740e0e2eea47b6b8
2021-01-13 11:19:27 -08:00
Wale Ogunwale
8531eb85a4 Additional interfaces for main/side stage split-screen model
Add some more interfaces APIs for manipulating main/side stage
split-screen.
Also, renamed pinTask/unpinTask to moveToSideStage/removeFromSideStage
for consistency.

Test: Command line
Bug: 176061049
Change-Id: Ic5b909c42e027e6f4809931c6dc92af1bf79b050
2021-01-13 11:12:38 -08:00
Evan Rosky
f2a23c72aa Merge "Refactor default transit animations into handler for testing" 2021-01-13 18:23:05 +00:00
Wale Ogunwale
8f2ca80002 Merge "Baseline support for main/side stage split-screen model" 2021-01-13 16:05:41 +00:00
Jin Seok Park
fcfb4c19e6 Merge "Replace using integer with UserHandle for user id" 2021-01-13 08:40:15 +00:00
Tony Huang
681d9d5f53 Merge "Use queue to defer all task events" 2021-01-13 06:36:12 +00:00
Wale Ogunwale
707fb0fbb6 Baseline support for main/side stage split-screen model
Bug: 175416931
Test: atest StageCoordinatorTests StageTaskListenerTests
Test: atest MainStageTests SideStageTests
Change-Id: Ib5f000599d09d6a07b559aa8a06e5786541f2324
2021-01-13 13:00:46 +08:00
Wale Ogunwale
f717288022 Merge changes from topic "reparentTasks"
* changes:
  1/ Refactor LegacySplitScreenTests
  Support WCT#reparentTasks and WCT#setLaunchRoot
2021-01-12 22:47:36 +00:00
Bill Lin
218868bb9a 1/ Refactor LegacySplitScreenTests
1) Separate NonResizable activity tests
2) Fix flaky in visibleWindowsShownMoreThanOneConsecutiveEntry
3) Fix flaky in OpenAppToLegacySplitScreenTest
4) Align implementation of ExitLegacySplitScreenFromBottomTest

Test: atest WMShellFlickerTests
Bug: 176897747
Bug: 176923301
Bug: 176134495
Change-Id: I1e3efdbb1645f6d1a77950101e2c9f5b34856a2f
2021-01-12 11:43:19 -08:00
Winson Chung
cb4810a673 5/ Update splitscreen to use shell main thread
- Remove some usages of handler
- Remove separate executor for transaction updates (until it's clear
  we need to offload them)
- Only animations running on the main shell thread are using the animator
  handlers, so repurpose that to be for the main thread until we need it
  for things that actually run on the animation thread (for transitions)

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SplitScreenTests
Change-Id: I0ea9aae2deddafb620f1f41658e8366443bf9aaa
2021-01-12 10:05:06 -08:00
Winson Chung
813664c88c 4/ Update HideDisplayCutout and AppPairs to use shell main thread
Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: I369e83cbc85fea80b0db4d58ba8d05d12fbd09e3
2021-01-12 10:05:06 -08:00
Winson Chung
5b43185172 3/ Update OneHanded to use shell main thread
- Clean up some usages of handlers and explicit main loopers to use
  the shell executors
- Remove the update thread (will eventually move to the shell main thread)
- Make timeout handler non-static (it only has one instance at the moment)
- Post calls from shell back onto the sysui thread

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: I1db0f0d8e7f83eeb7e4581fb266ffd77aa73fea1
2021-01-12 10:05:03 -08:00
TreeHugger Robot
68e55ddbad Merge "Move shell Transitions into a package" 2021-01-12 07:59:50 +00:00
Tony Huang
4c564ef04f Use queue to defer all task events
It has two layer defer currently, it should only remain queue
events method. Remove using of mDeferTaskOrgCallbacksConsumer
and extand using of queue method to onTaskAppeared,
onTaskVanished and onBackPressedOnTaskRoot.

Bug: 171749427
Test: check split screen, PiP and bubbles work normally
Test: atest WmTests:WindowOrganizerTests
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: I1556d8352c97bfb8d8f55bfe30f49d266ba624fe
2021-01-12 15:47:56 +08:00
Winson Chung
8dd46b0ef1 Merge changes I3657efcc,Iabdf5ee9
* changes:
  Re-implement TvPipController
  Refactor .tv.PipNotification
2021-01-12 05:21:15 +00:00
Wale Ogunwale
b71323aa91 Support WCT#reparentTasks and WCT#setLaunchRoot
Allows for bulk reparenting of tasks from one container to another and
also setting launch root in the same call to wm-core.

Bug: 175416931
Test: CTS and split-screen tests pass!
Change-Id: I362f89bc0ccc14e4152a2040a7198fd542ffe4d5
2021-01-11 20:46:36 -08:00
Evan Rosky
1229c01a4e Refactor default transit animations into handler for testing
In order to make shell transitions testable, this makes the
default animations into a TransitionHandler. This is also cleaner,
more consistent, and will make expanding the default animations
easier later.

The reason this is needed is because animations themselves aren't
very amenable to testing, so to test the interface logic, we need
to be able to replace the default handler with one that simulates
just the contract of the default handler (don't claim any requests,
but always perform animation).

Also added some tests for both basic transition flow and for
the TransitionHandler contracts

Bug: 169035082
Test: atest ShellTransitionTests
Change-Id: I92e367af155831c11f583322e95151a2cb645caa
2021-01-11 19:33:20 -08:00
Evan Rosky
57000adf8e Move shell Transitions into a package
For organization.

Bug: 169035082
Test: builds/runs (no logic changed)
Change-Id: I224ab5f19df7ce49a2112dcf7c900a3fc310532d
2021-01-11 19:29:29 -08:00
Winson Chung
f1937d8e76 Merge "Make Pip usage of FrameCallbackScheduler an actual class" 2021-01-11 16:30:21 +00:00
Jin Seok Park
2db6bcb67a Replace using integer with UserHandle for user id
Official API guideline is to use UserHandle for user id to ensure
type safety and avoid conflating user IDs with uids.
See go/android-api-guidelines#use-userhandle

Bug: 174762061
Test: build
Change-Id: I1db55e19fe086544f428783898af623422d37a0d
2021-01-11 17:49:56 +09:00
Jason Chang
21538ffb10 Merge "Fix after turning the Dark theme on, users can not clearly identify the screen has entered one handed mode" 2021-01-11 08:44:25 +00:00
Jason Chang
7e8e7441ee Fix after turning the Dark theme on, users can not clearly identify
the screen has entered one handed mode

Add a new DisplayArea feature color background layer to fix it.

Bug: 157124724

Test: manual
Test: atest WMShellUnitTests
Test: atest DisplayAreaPolicyBuilderTest
Change-Id: I16beddb182125551621d0083dba2f259140d7b78
2021-01-11 13:45:31 +08:00
Wei Sheng Shih
819c691ba3 Merge "Specify the default theme for splash screen window." 2021-01-11 03:10:49 +00:00
Jason Chang
d79f5dcf33 Merge "Fix triggering One-handed mode introduces gesture conflict issues (1/n)" 2021-01-10 03:38:37 +00:00
Yuncheol Heo
f3929238b0 Add TaskViewFactory.
- This CL also changes TV.setListener to have a separate Executor.

Bug: 165794075
Test: atest TaskViewTest BubblesTest NewNotifPipelineBubblesTest
Change-Id: Ib0324ec06d088694556f8cef6cee726d9789ce2c
2021-01-08 18:17:45 -08:00