Commit Graph

582 Commits

Author SHA1 Message Date
Bill Lin
3beefa9198 Disable flaky tests
These tests are flaky on both crosshatch and flame

Bug: 178447631
Test: atest WMShellFlickerTests
Change-Id: I084b91b3d7ab8ea28b7c70ad9bbeb69b873fbaa0
2021-02-03 10:54:11 +01:00
Nataniel Borges
7004ef2675 Merge "Provides assertion blocks on Flicker" into sc-dev 2021-02-03 07:21:25 +00:00
Nataniel Borges
04c8c54b15 Merge "Disable flaky tests" into sc-dev 2021-02-03 07:21:10 +00:00
Hongwei Wang
58b9a4e48e Merge "Add an invisible layer to trap focus" into sc-dev 2021-02-03 01:22:03 +00:00
Chris Li
5c3ad3a5a1 Merge "Allow non-resizable apps in split-screen (8/n)" into sc-dev 2021-02-03 00:38:22 +00:00
Chris Li
ee21983ae0 Merge "Allow non-resizable apps in split-screen (7/n)" into sc-dev 2021-02-03 00:24:54 +00:00
Chris Li
27d983a098 Allow non-resizable apps in split-screen (8/n)
Refactor SizeCompatModeActivityController to WM Shell. The old one will
be removed in separate cl as there are some dependencies in other
packages.

This cl is mainly for refactor. Major change will come after.
Besides refactor, also changed the mActiveButtons key to TaskId, because
launcher Task will also trigger onTaskInfoChanged, but should not remove
the restart button on the same display.

Bug: 176061101
Bug: 178327644
Test: manually verify that the size compat restart button works as usual
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WmTests:SizeCompatTests
Change-Id: I9143e079a1a945b76c3c56596976dd6ad2802897
2021-02-02 12:54:40 -08:00
Chris Li
98d2d06106 Allow non-resizable apps in split-screen (7/n)
Add interface for SizeCompatUIController in WM shell to use
when refactoring SizeCompatModeActivityController from system UI.

Bug: 176061101
Bug: 178327644
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I37f72396e1769b7773722be6575506fc430b2739
2021-02-02 12:50:28 -08:00
TreeHugger Robot
08b0b82df9 Merge "Reset windows bounds when stop one handed mode" into sc-dev 2021-02-02 20:46:41 +00:00
Ben Lin
6292565f13 Merge changes If42d4470,Ia0b701b7 into sc-dev
* changes:
  PiP: Add tap-to-unstash function.
  PiP: Allow stashing via dropping on the edge.
2021-02-02 19:27:55 +00:00
Hongwei Wang
b7361f8dda Merge "Adjust the estimated minimum size of PiP menu" into sc-dev 2021-02-02 17:30:24 +00:00
Nataniel Borges
da5136ea43 Provides assertion blocks on Flicker
Enable tests ot be in presubmit, postsubmit or marked as flaky

Do not require flicker DSL changes

Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I74fdadaf5f6f08d96973683682297200eec6658d
2021-02-02 18:16:12 +01:00
Nataniel Borges
500d6db17b Disable flaky tests
These tests are flaky on both crosshatch and flame

Disable them from presubmit

Bug: 175687842
Bug: 179108356
Test: atest WMShellFlickerTests
Change-Id: I51e85238064e806106e68b47460836fd278cab3d
2021-02-02 18:00:24 +01:00
Hongwei Wang
cb98114abd Add an invisible layer to trap focus
This is a work around for b/169372603 where PiP menu defaults the focus
on expand button when being attached to system window.

There is another inconsistency observed regarding of touch feedback
which may not be related to b/169372603 but worth mentioning
- when entering PiP and close button is shown, tap on PiP window shows
  visual touch feedback
- when PiP menu in closed state, eg. nothing is shown in menu, tap on
  PiP window shows no visual touch feedback

Video: http://rcll/aaaaaabFQoRHlzixHdtY/cLwTz7ad7P9nrrqk1uPiRP
Bug: 169372603
Test: Enter PiP from YT, see video
Change-Id: Ief8976fac28a65ac35724adcad7f25e11f1876a5
2021-02-01 21:12:49 -08:00
Hongwei Wang
0dc09244e5 Adjust the estimated minimum size of PiP menu
Use the similar measurement from PipMenuView#updateActionViews

Video: http://rcll/aaaaaabFQoRHlzixHdtY/g1YgomInywOHbZcKdsegcf
Bug: 175055101
Test: See video
Change-Id: I2a52f46c2208b9e164f0898fff0e43cbb3eb8b96
2021-02-01 20:57:39 -08:00
Bill Lin
6ea20e07d8 1/ Integrate legacySplitScreen Flicker tests into individual assertions
1) Integrate companion object inheritance and the default test runner
2) Move launch activity to setup: avoid noise of splash screen
3) Move setRotate() to setup: avoid noise of system windows
   (LetterBox, NavBar, StatusBar...) visibility changes
4) Reducing test time of each test case: remove redundant transition
5) Remve redundant val for readibility
6) Remove navBarLayerIsAlwaysVisible assertion from split test
   the rotation flow of enter split screen :
   Overview(land) -> enter split(portrait) -> split mode(land)
7) Partially enable ROTATION_90 tests
8) Bypass visibleLayersShownMoreThanOneConsecutiveEntry assertion
   for flaky reasons(Splash Screen, LetterBox, BackGestureSurface)

Test: atest WMShellFlickerTests
Bug: 176134495
Bug: 178685668
Bug: 178447631
Change-Id: I1d6153b987e5913a5d9a1fa5b72b9341b40db6fc
2021-02-02 10:41:45 +08:00
Ben Lin
6d00ea7a4a Merge "PiP: Double-tap to maximum, again to go back to last resized size." into sc-dev 2021-02-01 22:35:13 +00:00
Ben Lin
eded2ac40d PiP: Add tap-to-unstash function.
Bug: 178752503
Test: Tap on PIP while stashed
Change-Id: If42d4470f21744a29302879cd490fbb5c3110703
2021-02-01 12:43:22 -08:00
Ben Lin
6930fd5cbc PiP: Allow stashing via dropping on the edge.
Changes so that:
1) PiP now can be stashed when the user releases/let go of input when
PiP is currently floating on top of the left/right edge of the device.
Currently, 1/3 of the PiP needs to be off-screen in order for stash to
happen.
2) Stashing is now allowed from one edge to the other (e.g. user flings
from left to right, right to left), with VERY high velocity (>=
18000.f).

Bug: 178752503
Test: Let go of PiP when off screen, stashes
Test: fling from left to right with extremely high velocity, stashes
Change-Id: Ia0b701b75f598965d79b07b10f09118f80562f09
2021-02-01 12:41:14 -08:00
Nataniel Borges
283866d88d Merge "Reduce flicker memory consumption (Pt 4)" into sc-dev 2021-02-01 12:22:01 +00:00
Nataniel Borges
1ee38b1c18 Reduce flicker memory consumption (Pt 4)
Improve flicker memory consumption with the following:
- Use a static factory for better compatibility with JUnit4 ParameterizedRunner
- Ensure `cleanUp` is always called, even when an exception occurs

Bug: 178572522
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id9e539c0e8bce350f94811cab58a726e47aac525
2021-02-01 09:38:12 +01:00
Bill Lin
9e963584b5 Reset windows bounds when stop one handed mode
So far OHM reset windows bounds when
1) Rotate
2) Unregister(Settings disabled)
We want to add 1 more policy:
3) Reset windows when stop one handed mode(animation end/cancel)

Test: manual trigger OHM, stop OHM and check visual
Test: atest WMShellUnitTests
Bug: 178553230
Change-Id: Iba95fa11107fd0fa910685112ca962bca4adde80
2021-02-01 15:13:38 +08:00
Ben Lin
f426138ac8 PiP: Double-tap to maximum, again to go back to last resized size.
When double tapping, it now maximizes PiP to the biggest size possible,
but doesn't save the maximized bounds as a user resize. Instead, save
the current bounds before maximizing, and then restore that if user
double taps again.

Bug: 178881304
Test: Double-tap on PiP
Change-Id: Ib1dfb07e1ee1134759309213089504bb1eb97279
2021-01-29 18:55:31 -08:00
Winson Chung
26c4ade4d5 8/ Updating bubbles to run on shell thread
- Refactor some code to prevent blocked calls when calling to
  and from the Bubbles code when it runs on another thread
- Ensure that ScrimView can be run in separate windows running
  on separate threads

Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SystemUITests
Change-Id: I8eca9e9f644486f73a39f21dc37852be51d94539
2021-01-29 22:07:33 +00:00
Hongwei Wang
34b2197e34 Merge "New tap on PiP window behavior" into sc-dev 2021-01-29 21:49:29 +00:00
Nataniel Borges
3a544c9da5 Merge "Reduce flicker memory consumption (Pt 3)" into sc-dev 2021-01-29 19:46:12 +00:00
Nataniel Borges
63d515d10e Merge "Disable tests flaky on flame" into sc-dev 2021-01-29 18:18:15 +00:00
Winson Chung
a7e151f01a Merge "7/ Clean up some usage of getLooper" into sc-dev 2021-01-29 17:14:59 +00:00
Yuncheol Heo
52d3773622 Merge "Fix NPE in TaskView." into sc-dev 2021-01-29 15:21:30 +00:00
Nataniel Borges
442ffb6671 Disable tests flaky on flame
EnterLegacySplitScreenTest#testNonResizeableNotDocked fails with visibleWindowsShownMoreThanOneConsecutiveEntry(Splash Screen)

RotateTwoLaunchedAppTest#testRotateAndEnterSplitScreenMode fails with "java.lang.AssertionError: Unable to find app icon in Overview"

Bug: 173875043
Test: atest WMShellFlickerTests
Change-Id: Iaa0a159e5240bd2c129ada844661caac3c64142f
2021-01-29 15:47:33 +01:00
Shawn Lin
7ee87037f5 Merge "Create an API to get a cutout path" into sc-dev 2021-01-29 12:42:48 +00:00
Nataniel Borges
0f3645b868 Reduce flicker memory consumption (Pt 3)
Improve flicker memory consumption with the following:
- Ensure each assertion has a name for use with parameterized runner

Bug: 178572522
Test: atest FickerTests WMShellFlickerTests
Change-Id: I84af8ccccbbe42533013be664c91521fe49f7021
2021-01-29 11:55:29 +01:00
TreeHugger Robot
9cc46e4fe3 Merge "Re-map DisplayAreaAppearedInfo to token-leash map" into sc-dev 2021-01-29 05:06:51 +00:00
Hongwei Wang
352f35ddaf New tap on PiP window behavior
PiP window stays same on tap if it's large enough to hold all the
actions within it. Ignore the artifacts in demo video such as the shift
of settings button and menu resize out of sync, they are tracked in
separate bugs.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/hkQgdmbuBhNT0WdKW8aegL
Bug: 175055101
Test: See video
Change-Id: Ie19b30dd1e8ba716095b76a3f341b5ab2a51399b
2021-01-28 17:42:53 -08:00
TreeHugger Robot
5722117dcb Merge "Apply window crop on entering PiP transition" into sc-dev 2021-01-28 21:40:15 +00:00
Yuncheol Heo
86df2c5757 Fix NPE in TaskView.
- TaskInfo can be null before Listener is executed.

Bug: 178710250
Test: atest CarDevicePolicyManagerTest
Change-Id: I90cd57dbd01692b86924ec1b762e31f91a6cd6e0
2021-01-28 13:34:04 -08:00
Winson Chung
9211706490 7/ Clean up some usage of getLooper
- Don't expose the looper from the executor for now since
  we don't want people to build around it

Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: Ia8e29c100eeef639a60ea0b5a87ea4ae551867c2
2021-01-28 10:47:39 -08:00
Winson Chung
c1b8011f54 Merge "Migrate to using DisplayLayout instead of DisplayInfo" into sc-dev 2021-01-28 18:03:44 +00:00
shawnlin
f7ff55217c Create an API to get a cutout path
- Added a new API to get the cutout paths.
- Create a @hide class CutoutPathParserInfo
  - Used to store the needed info to create the cutout paths.
  - Will be used when DisplayCutout.getCutoutPath() is called to
    create the cutout paths.

Bug: 172646505
Test: atest DisplayCutoutTest DisplayContentTests WmDisplayCutoutTest
Change-Id: Ief92ce4466f6bffb2a9375388b71de43049b4eef
2021-01-28 19:12:54 +08:00
Nataniel Borges
82dd3e14f8 Merge "Disable flaky pip test" into sc-dev 2021-01-28 09:30:08 +00:00
TreeHugger Robot
3faaf538e9 Merge "Remove double-posting in DisplayImeController" into sc-dev 2021-01-28 08:48:30 +00:00
Bill Lin
1fd078151b Re-map DisplayAreaAppearedInfo to token-leash map
Clean-up DA callback APIs of OneHandedDisplayAreaOrganizer
  onDisplayAreaAppeared()
  onDisplayAreaVanished()

Note:
  When super.unregisterOrganizer() is called, all DAs should be
  removed from the map in the callback of onDisplayAreaVanished().
  It was not working correctly because the map is using DisplayAreaInfo
  as the key, which will be different because of the different
  configuration object. We should use the DA token as the key.

Bug: b/172298357
Test: atest WMShellUnitTests:OneHandedDisplayAreaOrganizerTest
Test: atest SystemUITests
Test: Trigger OHM, rotate screen
Test: Trigger OHM, disabled through settings
Change-Id: I4560df1ab36ec33292fa4ec08cab28644b0fabe2
2021-01-28 15:00:02 +08:00
TreeHugger Robot
f6e8b35b63 Merge "Temperory ignore flaky visibleLayersShownMoreThanOneConsecutiveEntry" into sc-dev 2021-01-28 05:09:51 +00:00
Wilson Wu
299897e9ba Merge "Make IInputMethodManager to oneway (10/N)" into sc-dev 2021-01-28 01:46:32 +00:00
Winson Chung
4dc41ab58b Migrate to using DisplayLayout instead of DisplayInfo
- No need to keep two sources of truth, can just use display
  layout to  store/calcualte all the info we need
- Update the display layout on display configuration changed
  as well
- KI: When changing displays, the min size of the pip also
  changes so we will need to calculate that based on the
  smallest display size

Bug: 175644531
Test: atest PinnedStacktests
Test: atest WMShellUnitTests
Change-Id: I34614a8f739311c7b382b6848e4752fa68c91cfb
2021-01-27 22:01:21 +00:00
Hongwei Wang
1c2ffc5410 Apply window crop on entering PiP transition
For entering PiP transition in button navigation mode, there seems to be
regression causing the black background when there is no source rect
hint being set.

Work around this by explicitly applying window crop on the start of transition.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/e9o986ZD7jO0rI14rrwoRZ
Bug: 178242567
Test: See video
Change-Id: I89ba5a41f0d6fc7ad9873455348b22db3f364615
2021-01-27 13:17:54 -08:00
Nataniel Borges
59a995a7b1 Disable flaky pip test
Bug: 171049720
Test: atest FlickerTest
Change-Id: I21bbbc7dcb98c4cc039b4621f807386093d8deb2
2021-01-27 16:54:07 +01:00
Adrian Roos
a30d9a0d74 Remove double-posting in DisplayImeController
Now that the PerDisplay methods already run on the mMainExecutor,
we no longer need to post to that executor from PerDisplay's methods.

Fixes: 175954493
Test: atest DisplayImeController
Change-Id: Ib528b899b7f47f5c4afe3e31925bfb8d8abb8aef
2021-01-27 14:31:08 +01:00
Wilson Wu
c4663ba6a9 Make IInputMethodManager to oneway (10/N)
1. Comply following methods to IVoidResultCallback to
emulate current behavior.

-. setAdditionalInputMethodSubtypes
-. removeImeSurface
-. removeImeSurfaceFromWindow

2. Add "oneway" to all methods which we already apply them
to result-callback model.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Test: atest DisplayImeControllerTest
Change-Id: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
2021-01-27 09:12:47 +00:00
Bill Lin
d7ee2ede94 Temperory ignore flaky visibleLayersShownMoreThanOneConsecutiveEntry
Splash screen sometimes cause the assertion fail
Ignore the assertion until good approach available

Test: atest WMShellFlickerTests
Bug: 178447631
Change-Id: Id2dce31e409d22fceeacb67828631b81d7a50a09
2021-01-27 16:44:15 +08:00