Commit Graph

243 Commits

Author SHA1 Message Date
Winson Chung
d19e69d0bc 6/ Update pip to use shell main thread
- Remove some currently unused pip interface methods
- Remove some usages of handler
- Remove update thread (will eventually run on shell main thread)

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: If97e5182e396029120f0d0fb9e730ece93cddcc8
Signed-off-by: Winson Chung <winsonc@google.com>
2021-01-27 05:39:01 +00:00
Nataniel Borges
732cde8f57 Merge "Enable RotateAppPairs tests" 2021-01-26 16:21:32 +00:00
TreeHugger Robot
c64d83723f Merge "Disable visibleLayersShowInConsecutiveEntries assertion" 2021-01-26 14:31:26 +00:00
TreeHugger Robot
c79f0ed9d5 Merge "Enable Pip tests" 2021-01-26 09:28:36 +00:00
Nataniel Borges
5de871ffd2 Enable RotateAppPairs tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 162923992
Test: atest FlickerTests
Change-Id: Ie691d8ae11672337e46529b26cc358f99e5a0bf4
2021-01-26 08:48:29 +01:00
Nataniel Borges
beaddd2cde Disable visibleLayersShowInConsecutiveEntries assertion
This assertion is ~30% flaky at the moment

Bug: 162923992
Test: atest FlickerTests
Change-Id: I288b5f19ee45bd708a4c47b161f6b7f5405968b5
2021-01-26 08:45:06 +01:00
Evan Rosky
27923b5a68 Merge "Add support/adapter for recents animation via shell transition" 2021-01-26 00:29:40 +00:00
Yuncheol Heo
857ebd3ccd Merge "Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView." 2021-01-25 19:39:13 +00:00
Nataniel Borges
82d51f03ab Enable Pip tests
The tests are stable in postsubmit, so they can be moved to presubmit

Bug: 171049720
Test: atest FlickerTests
Change-Id: I116157823f192ce31473d2d7d33ae7b8bf4e7a43
2021-01-25 18:34:56 +01:00
Nataniel Borges
1257711e65 Merge changes from topics "media-projection", "merge-specs", "single-assertion"
* changes:
  Use MediaProjection for screen recording
  Split app pair tests into individual assertions
  Compatibilize tests with new runner
2021-01-25 14:06:18 +00:00
Sergey Nikolaienkov
322819916e Merge "Filter out WmShellFlickerTests that are not supported on TV" 2021-01-25 10:12:46 +00:00
Nataniel Borges
9d110213e9 Use MediaProjection for screen recording
Use media projection instead of the shell command for screen recording.

Test: atest FlickerTests
Bug: 177077842
Change-Id: I9ac7351bf04004b5512316232637fd5cc2dd5fcc
2021-01-25 08:58:32 +01:00
Nataniel Borges
d04791d65c Split app pair tests into individual assertions
After this CL each assertion in the AppPairs test will appear as independent tests

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id704301b3396c4330001ef639faed6e978237f10
2021-01-25 08:58:27 +01:00
Nataniel Borges
143d584efd Compatibilize tests with new runner
Runner now prints each assertion individually to aid debugging.

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I1c9a49ec3c283e5e034f0223573fca3ccafaf64c
2021-01-25 08:58:21 +01:00
Ben Lin
70a82b9076 PiP pinch-to-resize: Enable two finger movement and slight rotation.
Bug: 166478885
Test: Use two fingers and rotate and move PiP around
Change-Id: Ie9be757c95eb4bde66664ed3b8057b13f1d5bb5d
2021-01-23 09:10:10 +00:00
Yuncheol Heo
4664023109 Move setTaskAlwaysOnTop from TaskView to BubbleExpandedView.
Bug: 178212126
Bug: 175918200
Test: [Car] launch Dialer and check Dialer button is highlighted.
Test: [Phone] launch DetailDialog and check Navigation bar.
Change-Id: Ic10dca7e25a8828f8da36130ec78d2e24c765609
2021-01-22 23:24:25 -08:00
Evan Rosky
710ff71169 Add support/adapter for recents animation via shell transition
This does the basics to adapt recents animation to shell transition.

Replaces startRecentsActivity with a normal startActivity. Once
we make a full switch to shell transitions, we can hopefully remove
it.

Updates the TransitionHandlers in shell and RemoteTransitions to
support attaching a WindowContainerTransaction to a transition's
finish. For recents, this is used to move the "pausing" app (the
one getting animated into the recents carousel) back to the front
if the gesture doesn't go all-the-way into recents.

Bug: 162503077
Test: enable shell transit. launch an app, use gesture to open
      recents. use gesture to start going to recents, but then
      release early to return to the app.
      atest ShellTransitionTests
Change-Id: Ied54f1b2c70c5c129b2f5798117d6d8a85360998
2021-01-22 13:43:55 -08:00
Wale Ogunwale
a47141f5ee drag-n-drop support for main/side stage split-screen
Switch shell dnd to use new split-screen infra.

Test: exiting tests pass
Bug: 176061049
Change-Id: Iff299502d1126320dc0935a9925f0c74d3f3beee
2021-01-21 10:34:56 -08:00
TreeHugger Robot
92f15b66e9 Merge "2/ Fix flaky in WMShellFlickerTest legacySplitScreen tests" 2021-01-19 09:27:52 +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
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
Evan Rosky
c7bd598702 Merge "Add support for remote transition playback in shell transitions" 2021-01-15 18:23:09 +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
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
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
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
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
Winson Chung
8dd46b0ef1 Merge changes I3657efcc,Iabdf5ee9
* changes:
  Re-implement TvPipController
  Refactor .tv.PipNotification
2021-01-12 05:21:15 +00: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
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
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
TreeHugger Robot
feb8ef30aa Merge "2/ Migrate some common shell classes to use executors" 2021-01-08 23:26:57 +00:00
TreeHugger Robot
86cb49109a Merge "Mark mutability explicitly in tests" 2021-01-08 21:28:55 +00:00
Winson Chung
68d5d7cdfe 2/ Migrate some common shell classes to use executors
- Remove Handler usage in some (non-feature specific) shell code
(Note: The shell main thread will still be the sysui main thread)
- Add explicit executor for display organizer

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: I9a354f742167b907c32537eb022e22c0d5bfb97a
2021-01-08 11:17:03 -08:00
TreeHugger Robot
eab713e351 Merge "Do not click on TVs in PipKeyboardTest" 2021-01-08 19:13:12 +00:00
Mady Mellor
fd8a0240c0 Mark mutability explicitly in tests
Fixes: 176869010
Test: atest BubbleTest
Change-Id: I5ace7342b3c20cf2946f86ed463fe7ae40105820
2021-01-08 10:33:52 -08:00
Sergey Nikolaienkov
068369c26a Refactor .tv.PipNotification
Make TvPipNotificationController (formerly PipNotification) responsible
for handling broadcasts sent from the Pip StatusBarNotification.
Previouslt TV PipContoller was in charge of that.
Also, as mentioned above, rename PipNotification to
TvPipNotificationController.

Bug: 153784643
Test: atest WMShellFlickerTests:TvPipNotificationTests
Change-Id: Iabdf5ee9d464653e233aee9044ac8cbb26478dea
2021-01-08 15:31:36 +00:00
Sergey Nikolaienkov
bfc6604163 Do not click on TVs in PipKeyboardTest
Implement an alternative way of showing/hiding IME in PipKeyboardTest on
TV - via "re-launching" the ImeActivity with a particular action. The
original way - calling UiObject2.click() on the EditText does not work
well on TVs, because the touch events injected by the Instrumentation to
emulate the click force TV into the touch mode.

Bug: 176413558
Test: atest WMShellFlickerTests:PipKeyboardTest
Change-Id: Id3462eba548c8ed639ba44437db573928348c1e6
2021-01-08 15:30:15 +00:00
TreeHugger Robot
f1882fe75c Merge "Fix Tv Pip tests" 2021-01-08 11:21:34 +00:00
TreeHugger Robot
6581a7d0ac Merge "Fix and clean up Tv Pip Menu" 2021-01-08 09:44:55 +00:00
wilsonshih
aefbd7ba69 Specify the default theme for splash screen window.
By default if application didn't specify a theme, PhoneWindow will
get the default theme by Resources#selectDefaultTheme for itself
and currently it could be Theme_DeviceDefault_Light_DarkActionBar,
which will shows an ActionBar on splash screen window, and looks
bad for starting window.
For this case, use Theme_DeviceDefault_DayNight for splash screen
window should be a better choice.

Bug: 73289295
Test: atest StartingSurfaceDrawerTests
Change-Id: Ia47afcb26c7aaa7781a24e3fe8122e58901776dc
2021-01-08 15:03:38 +08:00