Commit Graph

485 Commits

Author SHA1 Message Date
Evan Rosky
c7bd598702 Merge "Add support for remote transition playback in shell transitions" 2021-01-15 18:23:09 +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
Yuncheol Heo
cde9548a2c Migrate touchable inset calulation from BubbleStackView to TaskView.
Bug: 165794075
Test: Run Bubble demo and check if we can still touch the task inside TaskView.
Change-Id: I15b019cbcda96cdcbdf623495991ca44bc3bc2ed
2021-01-08 18:15:14 -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
TreeHugger Robot
bb45c563c4 Merge "Mark mutability explicitly on the bubble overflow intent" 2021-01-08 21:13:18 +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
edf0e38932 Mark mutability explicitly on the bubble overflow intent
Fixes: 175352055
Test: TH / manual - check that bubble overflow opens fine
Change-Id: I7b987fd8a19930e08538e56c0377981c9a9a1756
2021-01-08 11:06:42 -08: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
Evan Rosky
eb299faeed Merge "Basic support for split-screen in new transition system" 2021-01-08 18:00:31 +00:00
Sergey Nikolaienkov
dd86cfbd57 Re-implement TvPipController
Re-working TvPipController (formerly tv.PipController) taking into
account recent migration to WmShell.

Bug: 153784643
Test: atest WMShellFlickerTests
Change-Id: I3657efccece24e12783b582db26ebe93468c6fa5
2021-01-08 15:31:36 +00: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
Winson Chung
c6c603078b Make Pip usage of FrameCallbackScheduler an actual class
Bug: 175330528
Test: Builds with new dynamic-animation library
Change-Id: I1632bd87a0f02940317a38a87b074d303f80b8c7
2021-01-07 15:45:27 -08:00