Commit Graph

297 Commits

Author SHA1 Message Date
Yuncheol Heo
5ba5c09b24 Merge "Migrate some CTS tests about PIP presentation to WMShellFlickerTests" 2020-11-27 00:26:45 +00:00
Yuncheol Heo
72800c9029 Migrate some CTS tests about PIP presentation to WMShellFlickerTests
Test mappings are as follows:
- testPinnedStackInBoundsAfterRotation => PipRotationTest
- testEnterPipToOtherOrientation => PipOrientationTest
- testSetRequestedOrientationWhilePinned => PipOrientationTest
- testPinnedStackWithDockedStack => PipSplitScreenTest
- testDisplayMetricsPinUnpin => EnterExitPipTest

Some other accompanying changes are as follows:
- add FixedAppHelper for FixedActivity.
- add testapp.Components to provide the constants for each test app.
- extend PipActivity to accept some extras from Intent/BroadcastIntent.

Bug: 161980624
Test: atest WMShellFlickerTests
Change-Id: I64d97a51387370cc086c9dcdded846e4a8c1c0ea
2020-11-26 10:23:49 -08:00
Evan Rosky
9ca6b44136 Merge "Calculate and provide more info necessary for animations" 2020-11-26 00:05:19 +00:00
Ben Lin
298aecf474 Merge "PiP: Safeguard in calling on menu view in case it's not created." 2020-11-24 19:10:09 +00:00
Antonella Dellanzo
ba500e9603 Merge "Move tests from FlickerTests to WMShell" 2020-11-24 11:03:06 +00:00
Ben Lin
645e988e1d PiP: Safeguard in calling on menu view in case it's not created.
In case SystemUI crashes, there is a possibility that we can call on
showMenu() upon SysUI restart without the menu instance created. We
should at least not crash SysUI again for this.

Bug: 173683353
Test: None
Change-Id: I67c11ffaf9f7e6972cc4b005f07f8fc6897ac5c1
2020-11-23 17:08:26 -08:00
Sergey Nikolaienkov
2b28959c3b Merge "Add tests for custom actions to TvPipMenuTests" 2020-11-23 21:14:07 +00:00
Antonella Dellanzo
941c3b8ac3 Move tests from FlickerTests to WMShell
Moving all tests of Pip and SplitScreen from FlickerTests lib to WMShell.

Test: atest WMShellFlickerTests FlickerTests
Change-Id: I5e915f38beb8c1fef44cf18d955caf1e3cc77b30
2020-11-23 15:54:09 +01:00
TreeHugger Robot
b91eb3cdbd Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-21 02:26:15 +00:00
Bill Yi
c19062102a Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ibda03e416260efefa40a2d662b45fa03aee35486
2020-11-20 07:52:33 -08:00
Bill Yi
3d6151257d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I61ae0a3a1d32304c3ba001315f59af611638514e
2020-11-20 07:24:09 -08:00
Sergey Nikolaienkov
dececd5dd3 Add tests for custom actions to TvPipMenuTests
Test that correct UI elements are displayed for the custom actions; that
the set of custom actions can be updates (while PiP menu is shown); that
custom actions collaborate correctly with "regular" actions (Full screen
and Close), as well as with the media contol actions.

Bug: 171520419
Test: atest WMShellFlickerTests:TvPipMenuTests
Change-Id: I1f5b1e4896a60b8d2bfb118e548466e7f4036e61
2020-11-20 10:03:48 +00:00
TreeHugger Robot
a0522a60fd Merge "Revert "Import translations. DO NOT MERGE ANYWHERE"" 2020-11-20 05:08:56 +00:00
TreeHugger Robot
b38a884912 Merge "Revert "Import translations. DO NOT MERGE ANYWHERE"" 2020-11-20 04:55:15 +00:00
Jason Chang
9fa8702d0c Merge "Fix change One-handed mode screen size from 50% to 40% but also keep adb command mechanism for UX tuning" 2020-11-20 03:51:53 +00:00
Bill Yi
98537ca3aa Revert "Import translations. DO NOT MERGE ANYWHERE"
This reverts commit 6652772648.

Reason for revert: Incorrect import

Change-Id: I7202b60632640d44202c5246c6408a6f54892e68
2020-11-20 03:16:26 +00:00
Bill Yi
5e4e11b20c Revert "Import translations. DO NOT MERGE ANYWHERE"
This reverts commit 6ced8e47a4.

Reason for revert: Incorrect import

Change-Id: Ie5f63ad2562f38cebd36dae986c530d07de088ca
2020-11-20 03:01:27 +00:00
Jorge Gil
5f5fdaeaeb Merge "Add unit tests and cleanup PipBoundsState" 2020-11-19 21:04:12 +00:00
TreeHugger Robot
64645c04b2 Merge "4-2/ Enhance AbstractStandardAppHelper.exit() to exit PIP at end" 2020-11-19 19:01:26 +00:00
TreeHugger Robot
0718e79de0 Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-19 18:16:38 +00:00
TreeHugger Robot
872629a753 Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-19 18:04:09 +00:00
Bill Lin
a6c32cc9af 4-2/ Enhance AbstractStandardAppHelper.exit() to exit PIP at end
Integrate forceStop() in exit() that PIP window could really
exit after each round of test

Bug: 173567664
Test: atest com.android.wm.shell.flicker
Test: atest com.android.server.wm.flicker.Flicker

Change-Id: I8aaa4f590344f8fb1e6e731ed865f21f63892bb2
2020-11-19 23:11:28 +08:00
Bill Yi
6ced8e47a4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I23c6083fd728447f86a1b272ae53c4c57be47bd4
2020-11-19 04:00:09 +00:00
Bill Yi
6652772648 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5ac32a47f2a98d5430814f615555fe2d6aaf58e9
2020-11-19 03:59:40 +00:00
TreeHugger Robot
f45d13b02c Merge "Improve some issues around position and window order" 2020-11-19 03:37:40 +00:00
TreeHugger Robot
8b69ef2dae Merge "3/ Fix bug of PipKeyboardTest do not forceExit() testApp successfully" 2020-11-19 02:41:05 +00:00
TreeHugger Robot
3e35756c79 Merge "2/ Initial AppPairs flicker test case" 2020-11-19 02:41:05 +00:00
jorgegil@google.com
8cceeffe0b Add unit tests and cleanup PipBoundsState
1. Adds missing unit tests
2. Cleans up public API (nullability and doc)
3. Renames AnimatingBoundsState to MotionBoundsState to improve
readability of what that state actually holds, that is, the state
of the "bounds in motion" which can be the bounds used during an
animation but also the bounds used during a drag or resize
operation.

Bug: 169373982
Test: atest com.android.wm.shell.pip
Change-Id: I951fa3ea1310b69c93b53a1690c0a1cf0632dd33
2020-11-18 18:28:19 -08:00
Jorge Gil
828490c31e Merge changes from topic "bounds-algo-tests"
* changes:
  Add unit tests for PipSnapAlgorithm
  Add unit tests for PipBoundsAlgorithm
2020-11-19 00:50:16 +00:00
Treehugger Robot
c258e3ecaa Merge "Add Nataniel as OWNER of WMShellFlickerTests/WMShellUnitTests" am: 2ba09b6747 am: c579af998c am: 47b3639a83 am: 7e454b9029
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1503412

Change-Id: I0f50c5b9333f17d46bc77ae47164b762bd67098f
2020-11-18 23:48:28 +00:00
Mady Mellor
47d3f66a04 Improve some issues around position and window order
- which ever window was last created is on top, so if
  taskbar was just created, re-add bubbles window so
  its on top
- only set pinned location when the bar is visible

Test: manual
Bug: 173386799
Change-Id: I691f856947a094ba5a7afee611a95219fcca4830
2020-11-18 15:08:06 -08:00
Evan Rosky
8cfc4c2b64 Calculate and provide more info necessary for animations
This adds relative offsets so that animating surfaces can
be reparented with the knowledge of how to position them
within their new parents.

This also creates a "rootleash" which serves as a place for the
transition player to put animating surfaces into where they
can all be siblings. This provides control over z-ordering
during the animation and removes relative cropping
constraints. This rootleash surface is a child of the
deepest container that is an ancestor to all animating
targets. It's layer is picked to be the top-most(z) of the
ancestor's direct children which contains animating
targets.

This then Updates the example transition in shell to use
the rootleash.

Bug: 169035082
Test: atest TransitionTests
Change-Id: If40872138cbb6087b46be4a93c298bad94e88ca1
2020-11-18 13:00:13 -08:00
jorgegil@google.com
cb5acc2f2b Add unit tests for PipSnapAlgorithm
Bug: 169373982
Test: com.android.shell.wm.pip
Change-Id: Iecc7ede73644f975c8bc71300e72925bd220f28d
2020-11-18 11:13:31 -08:00
Hongwei Wang
ebaf114818 Add Nataniel as OWNER of WMShellFlickerTests/WMShellUnitTests
Bug: N/A
Test: N/A
Change-Id: Ibddd92a03daf368397a88a2959f301bf53a2bbf4
2020-11-18 10:56:34 -08:00
TreeHugger Robot
5bc9594c6b Merge "Add divider view support for app-pairs" 2020-11-18 12:12:18 +00:00
Jason Chang
fc4f7c948d Fix change One-handed mode screen size from 50% to 40% but also keep
adb command mechanism for UX tuning

Provide both config.xml and adb command mechanism.

Bug: 169724216

Test:
adb shell setprop persist.debug.one_handed_offset_percentage 60
adb shell pidof com.android.systemui |xargs -i adb shell kill -9 {}
or adb reboot

adb shell setprop
persist.debug.one_handed_translate_animation_duration 150
adb shell pidof com.android.systemui |xargs -i adb shell kill -9 {}
or adb reboot

Test: manual
Test: atest WMShellUnitTests
Change-Id: I9502cbe8e496f484fdeb8041b5618c47aba0f1d1
2020-11-18 17:43:41 +08:00
Bill Lin
57c4847f3d 2/ Initial AppPairs flicker test case
1. Send adb command to pair test apps
2. Assert primary & secondary apps visibility
3. Assert Region of primary & secondary apps in portrait

Bug: 172776659
Test: atest WMShellFlickerTests:AppPairsTest
Test: set TEST_REPETITIONS = 10, tests no flaky
Change-Id: If41340c82782da01909d84b9ad101556e3234aa1
2020-11-18 16:39:18 +08:00
Bill Lin
ceb6007a62 Merge "1/ Migrate cts SplitScreenTests to wm shell flicker test" 2020-11-18 05:38:21 +00:00
Mady Mellor
173fbed4bd Merge "Bubbles taskbar broadcast" 2020-11-18 02:17:45 +00:00
Mady Mellor
4ac05e33d3 Bubbles taskbar broadcast
* listen for broadcasts related to taskbar
* update info in BubblePositioner based on that
* show a scrim behind the bubbles when taskbar is on left / right so
  you don't see contents beneath

Test: manual
Bug: 173386799
Bug: 167413172
Change-Id: Id520718e779d3a45bcde447d7fcb0d2ba785c88e
2020-11-17 15:29:36 -08:00
Evan Rosky
6510883d40 Merge "Relocate transition collection around lifecycle events (1/N)" 2020-11-17 23:24:22 +00:00
Mariia Sandrikova
2b54b5d709 Merge "Make positioning in letterbox mode configurable." 2020-11-17 22:45:44 +00:00
Evan Rosky
738ba5601f Relocate transition collection around lifecycle events (1/N)
Previously was just using whatever the legacy transition system
used. However, that system would wait too late (until after
round-trips to the client) in order to prepare some transitions.
Since the new transitions utilize "snapshots", they need to
collect earlier in the lifecycle to work properly.

This first CL deals mostly with activity start/finish and
task to-front/to-back. It also adds some utilities like the
ability to abort a transition (needed because activitystarter
works this way) and the ability to un-ready a transition/
sync transaction to enable trampolines.

This also switches the transit types to the new constants.

Bug: 169035022
Test: Existing tests (TransitionTests) pass
Change-Id: I05f3a2e8e27ccaed7077d648daf033aeabc333f9
2020-11-17 12:56:30 -08:00
Sergey Nikolaienkov
2edad48f94 Merge "Test Pip window position when Pip menu is open" 2020-11-17 20:51:22 +00:00
Mariia Sandrikova
49fc5569f0 Make positioning in letterbox mode configurable.
Changes:
- Allow to specify in config_letterboxPortraitGravity and config_letterboxLandscapeGravity desired alignment for letterboxed apps.
- Add ADB commands to allow overriding these config values for testing
- Move positioning logic for letterbox mode from WM Core to WM Shell.

Test: atest LetterboxTaskListenerTest LetterboxConfigControllerTest
Test: go/wm-smoke
Test: manual with adb shell dumpsys activity service SystemUIService WMShell (get)set-letterbox-portrait-gravity / (get)set-letterbox-landscape-gravity
Fix: 170216257, 170215849
Change-Id: I8e6392faab05bec1bf61b9691f3bd9b8b09b9621
2020-11-17 20:15:31 +00:00
TreeHugger Robot
4583161d0a Merge "Import translations. DO NOT MERGE ANYWHERE" 2020-11-17 19:43:31 +00:00
Xin Li
75b98e92aa Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3970b3166afdfafe655d85d6b0e960c3e58cb5cd
2020-11-17 17:45:36 +00:00
Xin Li
b7618f25f4 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I60840416d367892f951ba919e5976b251a333445
2020-11-17 17:44:59 +00:00
Bill Lin
d89e31bad2 1/ Migrate cts SplitScreenTests to wm shell flicker test
This is the initial version to achieve:
1. SplitScreenActivity in test-apps
2. Create SplitScreenTestBase and add a basic test cases to
   ensure SplitScreenActivity enter split screen mode
3. Assert StatusBar/NavBar/SplitScreenActivity showing when
   device enter split screen mode
4. Verify docked apps ending bounds

Bug: 169271943
Bug: 172811376
Test: atest WMShellFlickerTests:EnterSplitScreenTest
Change-Id: I26461b958c578dcbcc5ca2235f9d269559fd9ec5
2020-11-17 19:38:22 +08:00
Sergey Nikolaienkov
31fcbcfed1 Test Pip window position when Pip menu is open
Bug: 171520419
Test: atest WMShellFlickerTests:TvPipMenuTests
Change-Id: Ie0a5651667bfe1bc04ee1127fbcd721b3bd36d81
2020-11-17 07:49:26 +00:00