Commit Graph

828 Commits

Author SHA1 Message Date
Hongwei Wang
3cd3a80f30 Merge "Settle auto PiP transaction in WindowContainerTransaction" into sc-dev 2021-03-15 21:59:13 +00:00
Winson Chung
e3e90bd0c4 Merge changes from topic "revert-13608835-shell_feature_interfaces-HRAUSTBFGW" into sc-dev
* changes:
  Revert "1/ Add mechanism to expose shell feature directly (for Pip)"
  Revert "2/ Add mechanism to expose other features directly"
2021-03-15 20:46:18 +00:00
Winson Chung
64b8381c7d Revert "1/ Add mechanism to expose shell feature directly (for Pip)"
Revert "Add shell aidl files"

Revert "Update starting window init call for CarLauncher"

Revert submission 13608835-shell_feature_interfaces

Reason for revert: SysUI Studio aidl import issue
Reverted Changes:
I49a5a0419:2/ Add mechanism to expose other features directly...
I19425896d:Update starting window init call for CarLauncher
If048d2cd9:1/ Add mechanism to expose shell feature directly ...
Ibb8365d3c:Add shell aidl files
Ie41b0b77a:Update calls to go through the feature interface i...

Change-Id: I97e591a5e157dfd27a72a735b51a3ed80bf1bf91
2021-03-15 17:52:25 +00:00
Winson Chung
a33a496a6f Revert "2/ Add mechanism to expose other features directly"
Revert "Add shell aidl files"

Revert "Update starting window init call for CarLauncher"

Revert submission 13608835-shell_feature_interfaces

Reason for revert: SysUI Studio aidl import issue
Reverted Changes:
I49a5a0419:2/ Add mechanism to expose other features directly...
I19425896d:Update starting window init call for CarLauncher
If048d2cd9:1/ Add mechanism to expose shell feature directly ...
Ibb8365d3c:Add shell aidl files
Ie41b0b77a:Update calls to go through the feature interface i...

Change-Id: I8bacc844fc3f0447311b5a97c4d356f2fb80f3ce
2021-03-15 17:52:25 +00:00
Hongwei Wang
f4dfb7c4a3 Settle auto PiP transaction in WindowContainerTransaction
At the end of autoEnterPip transition, followings happen in sequence
- Transition finishes in Launcher side, which operates on the
  animation leash
- RecentsAnimationController.TaskAnimationAdapter#onCleanup has the final
  chance to set the Task leash
- PipTaskOrganizer gets onTaskAppeared callback and commits Task into
  pinned mode

What's been changed here
- Transition in Launcher no longer in charge of settle the final transaction
- RecentsAnimationController.TaskAnimationAdapter#onCleanup sets the
  Task leash to be in sync with the final state in Launcher side
- PipTaskOrganizer commits the final leash transaction together with
  WindowContainerTransaction that enters PiP

Known issue: transition from landscape is not polished

Video: http://rcll/aaaaaabFQoRHlzixHdtY/hT5SXvaCy28P4UtfuoKiDw
Bug: 181342797
Test: see video
Change-Id: Ieabd6991ea5174099714ec22970198bebde1e336
2021-03-15 10:40:13 -07:00
Nataniel Borges
1f9f16f880 Merge "Promote PIP postsubmit tests to presubmit" into sc-dev 2021-03-15 16:03:48 +00:00
Wei Sheng Shih
3a84db48e6 Merge "Fix launching app from work profile cannot show splash screen." into sc-dev 2021-03-15 08:03:27 +00:00
wilsonshih
cc41fa62d8 Fix launching app from work profile cannot show splash screen.
Unable to find resource if the application is installed from work
profile, which cause the splash screen window cannot build up normally.

Bug: 179819075
Test: atest ActivityRecordTests
Change-Id: I2e0254780707ea625c356d53d8b67fb1df0d9a4d
2021-03-15 11:30:14 +08:00
Charles Chen
91734009df Merge "Add more logs in RootTDAOrganizer" into sc-dev 2021-03-15 02:47:52 +00:00
Chris Li
3c2c7d9b42 Merge "Allow non-resizable to enter split screen from recent" into sc-dev 2021-03-13 22:31:52 +00:00
Winson Chung
b7e0678d36 Merge changes from topic "shell_feature_interfaces" into sc-dev
* changes:
  2/ Add mechanism to expose other features directly
  1/ Add mechanism to expose shell feature directly (for Pip)
2021-03-13 19:13:21 +00:00
Winson Chung
8e76243e57 2/ Add mechanism to expose other features directly
- Expose interfaces for splitscreen, one handed, shell transitions,
  starting window
- Make the shell code only reference the starting window controller and
  not the exported interface

Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: I49a5a0419996754e5e154df7af1e475268035a5a
2021-03-12 21:22:51 -08:00
Winson Chung
2b52dceafc 1/ Add mechanism to expose shell feature directly (for Pip)
- Also split impl and controller for ShellInit/ShellCommandHandler
  (as with ag/13502602)
- Example implementation of exposing a subset of the Pip interface to
  Launcher directly.  This has the benefit of reducing unnecessary code
  in SysUI just to pipe calls to the Shell.

  The controller implements the binder interface which is collected
  and exposed to Launcher when it binds to the overview  service
  and Launcher can call through the binders directly.

  Note: this requires the shared lib to also build with the Shell
  interfaces so changes to the Shell aidls will still require updating
  the shared lib (until the shared lib prebuilt can removed).

Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work

Change-Id: If048d2cd9a6b8e5014ba30c0deaed7a3e177605d
Signed-off-by: Winson Chung <winsonc@google.com>
2021-03-12 17:15:58 -08:00
Chris Li
f834092444 Allow non-resizable to enter split screen from recent
Before, LegacySplitScreen is not allowing non-resizable to enter split
screen. Now, it also checks supportsNonResizableMultiWindow.

Fix: 181377395
Bug: 176061101
Test: manual
Change-Id: Iae4c65b5c8b0a139dbf8af55caba9f6c99d1f470
2021-03-12 16:04:11 -08:00
Nataniel Borges
920cf61139 Merge "New enter pip assertion" into sc-dev 2021-03-12 16:35:46 +00:00
Nataniel Borges
575f4bf38f Merge "Generalize pip transitions and assertions" into sc-dev 2021-03-12 16:34:52 +00:00
Nataniel Borges
bfc834eeea Merge "Generalize apppairs assertions" into sc-dev 2021-03-12 16:34:42 +00:00
Mady Mellor
3ffd209994 Merge "Fix touches for manage menu" into sc-dev 2021-03-12 16:24:42 +00:00
Nataniel Borges
9bc15837b6 Promote PIP postsubmit tests to presubmit
The tests have been stable for the past 2 weeks in postsubmit and can be promoted to presubmit

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 174238224
Change-Id: Ie7cbd56940e4b5eacd25ba38d1fd0a5966b9a7e9
2021-03-12 15:05:34 +01:00
Nataniel Borges
8923c65435 Merge "Log WM trace on frame instead of transaction" into sc-dev 2021-03-12 09:40:15 +00:00
Wei Sheng Shih
e010b5d5b9 Merge changes from topic "pre_run_enable_starting" into sc-dev
* changes:
  Enable SplashScreen flag
  Fix several test failures for the new starting window.(10/N)
  Implement default exit animation for splash screen.(9/N)
2021-03-12 07:15:38 +00:00
wilsonshih
11af33eeaf Fix several test failures for the new starting window.(10/N)
1. Register TestStartingWindowOrganizer to mock add/remove starting
window.
2. Do not show starting window if not occluded.
3. Add ReadFrameBuffer permission so Car can get TaskSnapshot.
4. Correct package path for shell.startingsurface.
5. Do not show starting window for home type.

Bug: 73289295
Bug: 131311659

Test: atest TaplTestsLauncher3
Test: atest WmTests StartingSurfaceDrawerTests TaskSnapshotWindowTest
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I89930d2e8a05cca6197c36c780ee1843fe454354
2021-03-12 04:08:56 +00:00
wilsonshih
d52e491d2f Implement default exit animation for splash screen.(9/N)
Implement default exit animation on the view of splash screen, there
will be a two layers switch happen when playing exit animation. For
the detail please reference
go/improved_app_launch_animations and go/app-startup

Note: For this version we skip shift-up animation, need to fix the
flicker test so we can enable it.
Note2: Fix the possible missing splash screen view issue, but could
make the first window draw slower, keep tracking.

Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
WindowOrganizerTests SplashscreenTests

Change-Id: I796811d010ac70f256169dd03d5e05ef0ed79d28
2021-03-12 03:46:15 +00:00
Mady Mellor
66dcca8074 Fix touches for manage menu
The manage menu can overlap the expanded view (TaskView).

To fix this we need to adjust the touchableRegion in
TaskView. This CL adds a method to specify a region that
is not touchable on the TaskView.

Also removes some code associated with old method of doing
this when we had ActivityView.

Test: manual - 1) expand bubble, tap "manage"
               2) make sure you can tap each of the three
                  menu options
               3) make sure tapping outside the menu hides
                  the menu
               4) make sure interaction with TaskView is
                  normal after manage menu is hidden
Fixes: 171233619
Change-Id: I3ef75b84f1b5f5b24aa19b192c7c2b7545b91cad
2021-03-12 01:44:09 +00:00
Jerry Chang
6d17d410f9 Prevent caching unexpected IME shown state for legacy split
Due to DisplayImeController listens to insetsChanged and display
rotation at all time, it might caching unexpected IME shown state in
DividerImeController. Since RemoteInsetsControllerTarget only
controlling insets during split mode, it won't receive hideInsets event
when the target app request to hide IME. Thus leaving unexpected IME
state in split component. When the next time entering split screen,
it'll adjust split layout with wrong IME state.

Update to not caching IME shown state in DividerImeController if the
split is not activated.

Bug: 176846448
Test: atest WMShellUnitTests
Test: open IME and rotate and dock two apps in split mode, observed
the divider bar is interactable and there's no dim layer on the
secondary split

Change-Id: I2f63eebb208b8c987a0a05615ddef4f6feef10d6
2021-03-12 00:31:50 +08:00
Jorge Gil
fa63935a61 Merge "Update PIP menu accessiblity bounds when it is moved" into sc-dev 2021-03-10 23:51:52 +00:00
Winson Chung
56547bfd28 Merge "Hide the expand container when it's not visible" into sc-dev 2021-03-10 18:27:14 +00:00
Nataniel Borges
c0da8c3f13 New enter pip assertion
Rename previous assertion to "pip app always visible" and create a new one asserting that pip window becomes visible

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521701
Change-Id: I237c8369b58a766b60f4eb96b7dc465e86f96679
2021-03-10 15:29:14 +01:00
Nataniel Borges
41b7c17297 Generalize pip transitions and assertions
Share code and assertions between the transitions to improve maintainability

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521849
Change-Id: Ie24ac84e0ffcaa6ef786865b9f5d5220fea4263f
2021-03-10 14:07:31 +01:00
Nataniel Borges
8cbe35fa80 Generalize apppairs assertions
Share code and assertions between both transitions to improve maintainability

Test: atest FlickerTests:com.android.wm.flicker.apppairs
Bug: 167521849
Change-Id: I591a6eda408a169d92732f8c1497fef51b27797f
2021-03-10 14:06:35 +01:00
Nataniel Borges
3f0a1f40a5 Merge "Fix enter pip parameters" into sc-dev 2021-03-10 10:37:29 +00:00
Winson Chung
b3e1bce06e Hide the expand container when it's not visible
- Update the expand container margins when available actions change
- Also defer pressed state feedback until slight duration (like in
  scrolling containers)

Bug: 182338349
Test: Try dragging pip with close menu, ensure no feedback is visible
      until the full menu shows
Change-Id: I09c88349d03ad85254ff6f5e4757a8a447149735
2021-03-09 23:38:41 -08:00
jorgegil@google.com
a5547def07 Update PIP menu accessiblity bounds when it is moved
Bug: 179337864
Test: atest PipHomeTest
Change-Id: I37ffbade283861f0013f29a86855146fd2c012de
2021-03-09 16:18:14 -08:00
Bill Lin
d6a9853d3b Merge "Fix OneHandedGestureHandler incorrect InputMonitor behavior" into sc-dev 2021-03-09 08:19:08 +00:00
Wei Sheng Shih
db3d82a4e3 Merge "Starting window performance tuning.(8/N)" into sc-dev 2021-03-09 08:00:12 +00:00
wilsonshih
11598e8243 Starting window performance tuning.(8/N)
Create splashscreen thread with priority -10 in shell for starting
window controller, the definition is moved from
AMS#TOP_APP_PRIORITY_BOOST to Process#THREAD_PRIORITY_TOP_APP_BOOST.

Create and set SplashScreenView object on the starting window after the
first simple view on the starting window drawn, in this way the
transition can be prepare early than wait the actually view was draw,
which can save some time.

Bug: 73289295
Bug: 131311659
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
Test: atest SplashscreenTests
Change-Id: Ibb430a66d6b329e74d62de047fbf37205cb66a96
2021-03-09 11:13:03 +08:00
Josh Tsuji
e3c4133374 Merge "Land PIP softly (using the same physics settings as Bubbles)." into sc-dev 2021-03-09 01:44:53 +00:00
Hongwei Wang
63b565d61f Merge "Use SyncTransactionQueue in PiP" into sc-dev 2021-03-08 23:05:20 +00:00
Josh Tsuji
add6ea4e16 Land PIP softly (using the same physics settings as Bubbles).
Test: fling a bunch of pips
Bug: 169863897
Change-Id: I115bcf7adc34852612646bd9cf220af62e06c4d3
2021-03-08 16:55:06 -05:00
Mady Mellor
e15c6dd81a Merge changes from topic "mm_setSuppress" into sc-dev
* changes:
  SysUI changes for setSuppressBubble
  Track locusId visibility in ShellTaskOrganizer
  Add locus id to ActivityRecord / TaskInfo
  Bubble API: suppress bubble
2021-03-08 21:27:36 +00:00
Mady Mellor
406ca457a6 Merge "Fix gesture exclusion for bubbles" into sc-dev 2021-03-08 18:11:03 +00:00
Nataniel Borges
0e77adca1a Fix enter pip parameters
Enter pip is not a rotation test and should use the non-rotation configuration

Test: atest FlickerTests:com.android.wm.shell.flicker.pip.EnterPipTest
Bug: 167521701
Change-Id: I0df35bdc08e7ac9c07bdf7f55398004076966410
2021-03-08 16:10:46 +01:00
Wei Sheng Shih
39baa852c6 Merge "Let Launcher able to receive task launching callback(3/N)" into sc-dev 2021-03-08 04:06:56 +00:00
Bill Lin
908c5afb30 Fix OneHandedGestureHandler incorrect InputMonitor behavior
1) Fix CTS WindowInsetsBehaviorTests test fail in NavBar 3 Button mode
   When device set NavBar 3 Button mode, OneHandedGestureHandler
   will monitor the InputEvent and pilferPointers() over NavBar region
   and break WindowInsetsBehaviorTests
   a) systemGesture_excludeViewRects_withoutAnyCancel
   b) systemGesture_notExcludeViewRects_withoutAnyCancel

2) In landscape, disposeInputChannelInputMonitor in OneHandedGestureHandler

3) Add dump in OneHandedGestureHandler for bugreport

Test: atest android.systemui.cts.WindowInsetsBehaviorTests
Test: manual test check the UX feel good on 3 Button mode
Bug: 181025710
Change-Id: I4c30578f45e5a569d7b5a1698d3d30229cecb13f
2021-03-08 11:20:07 +08:00
Jason Chang
90f3cd927a Merge "Refactor to use WindowManager#getCurrentWindowMetrics() instead of using Display#getRealSize()" into sc-dev 2021-03-06 08:04:52 +00:00
Ben Lin
a4cd16baad Merge "PiP: Refine pinch-resizing by damping rotation." into sc-dev 2021-03-06 04:21:31 +00:00
Mady Mellor
f425d30004 Fix gesture exclusion for bubbles
This was happening after the stack was dismissed & came
back. I think the onDrawListener should be added / removed
when BSV is attached/detached.

We reuse BubbleStackView in S so this is probably a
regression from those changes.

Fixes: 181083993
Test: 1 - have gesture nav enabled
      2 - add bubbles, dismiss them, add more
      3 - check that bubbles are easily moveable & don't
          trigger back
Change-Id: I1176efd2e41b3c9f1adb0d756e03bcfc5837eab6
2021-03-05 15:48:20 -08:00
Hongwei Wang
5632ba9ee0 Merge "Defer onTaskInfoChanged while transitioning to PiP" into sc-dev 2021-03-05 23:26:49 +00:00
Hongwei Wang
33c42511e8 Use SyncTransactionQueue in PiP
Bug: 171393374
Test: manual, make sure PiP makes as before
Test: atest PinnedStackTests \
            WMShellUnitTests:com.android.wm.shell.pip
Change-Id: I9014f7df900a6f0a900874b4ee4f2345bb99f886
2021-03-05 14:46:48 -08:00
Mady Mellor
c9871c4de9 SysUI changes for setSuppressBubble
1) We need a way to listen for locusId, this is done via
   a new listener on ShellTaskOrganizer that is informed
   for all task info changes.
2) When locusId for focused activity changes, check for
   a bubble in data that has a matching locusId & has
   API set
3) Add suppress/unsuppress in the state change flow and
   update the views

TODO in later CL:
- animate the view being hidden / shown; handle flyout

Test: atest ShellTaskOrganizerTests BubbleDataTest BubbleXmlHelperTest (also CTS CL)
Bug: 170267239
Change-Id: I5c9bd15fa8b5b326e146efdc40916454ca1c73f6
2021-03-05 11:28:01 -08:00