Commit Graph

311 Commits

Author SHA1 Message Date
Antonella Dellanzo
98ce694b1a Merge "Add presubmit tag for OpenAppToSplitScreenTest" 2020-12-02 10:34:14 +00:00
Antonella Dellanzo
4aed7225c0 Merge "Add test transition SplitScreenRotateTwoLaunchedAppTest" 2020-12-02 08:42:49 +00:00
Antonella Dellanzo
63d76ac51c Merge "Add new test transition SplitScreenRotateOneLaunchedAppTest" 2020-12-02 08:42:24 +00:00
TreeHugger Robot
63f0674b06 Merge "Handle app pair divider bar rotation" 2020-12-02 01:46:49 +00:00
Mariia Sandrikova
5500c017b3 Merge "Apply insets to max bounds instead of parent bounds in letterbox mode." 2020-12-01 18:03:13 +00:00
Antonella Dellanzo
22316abb45 Add new test transition SplitScreenRotateOneLaunchedAppTest
Add a new test (only the transition) called SplitScreenRotateOneLaunchedAppTest. This test will open one app in splitscreen and in the transition will test rotate the device.

Test: atest WMShellFlickerTests
Bug: b/171049764
Change-Id: I92c36f92e49e8cf617fa682bde078c8aff5962a5
2020-12-01 09:48:20 +00:00
Antonella Dellanzo
f6d554e894 Merge "Move tests to Presubmit" 2020-12-01 09:00:58 +00:00
Jerry Chang
f5592d148b Handle app pair divider bar rotation
Add logic to rotate app pair divider bar and add more tests.

Bug: 172704238
Test: AppPairTests, AppPairsPoolTests, AppPairsControllerTests
Test: AppPairLayoutTests
Test: manual check the behavior of divider bar.
Change-Id: Icb51cfaea04b1a9fd04cbb2bc868897d8428d483
2020-12-01 12:11:41 +08:00
Mariia Sandrikova
398454ff68 Apply insets to max bounds instead of parent bounds in letterbox mode.
Applying insets directly to parent bounds don't always work because parent bounds may not be equal to max bounds. For example, this happens when "Developer options > Display Cutout > Hide" option is selected or in One-handed mode.

Fix: 174211584
Test: atest WMShellUnitTests
Change-Id: I7415629aab39e5aac6c038f27494b87667ef84d9
2020-11-30 22:04:53 +00:00
Antonella Dellanzo
4b6d358ad6 Add test transition SplitScreenRotateTwoLaunchedAppTest
Add a new test (only the transition) called SplitScreenRotateTwoLaunchedAppTest. This test will open two apps in splitscreen and in the transition it will rotate the device.

Test: atest WMShellFlickerTests
Bug: b/171049799
Change-Id: I41e9b09d2621c2c44d276a2348b8f7f94dec71dc
2020-11-30 17:39:24 +01:00
Wale Ogunwale
071e95e8af Switch some recent tasks calls from IATM to ATM
The aidl IActivityTaskManager interface doesn't allow for method
overloading with the same name. Switching some of these calls to use
ActivityTaskManager class instead makes it easier to have overloads in
upcoming CLs.

Test: they pass!
Bug: 172776536
Change-Id: Ic4895ccf7dc1207cc6b14004cfcf6ee7b4b76cc1
2020-11-30 06:57:29 -08:00
Antonella Dellanzo
7e4ae56729 Add presubmit tag for OpenAppToSplitScreenTest
The test OpenAppToSplitScreenTest was marked as flaky as it doesn't run because of b/161435597 when being on 90 degrees. So we are removing the flaky annotation and marking the test to only run on 0 degrees. Also adding the presubmit annotation. This test is similar to one of the test inside EnterSplitScreenTest that's been running with no problem.

Test: atest WMShellFlickerTests
Change-Id: I4e9496286210805e0a8d15d7905cf6fbbc28a4ed
2020-11-30 09:38:13 +00:00
Antonella Dellanzo
e14d916e43 Move tests to Presubmit
Moving some tests to Presubmit using the annotation tag (adding the annotation lib as dependency). These tests were working on post submit:
- AppPairsTest
- PipKeybopardTest
- EnterSplitScreenTest
- ExitSplitScreenTest

Test: atest WMShellFlickerTests
Change-Id: I10603cbb869044fce9d444ab7c2a8d761eb1ee74
2020-11-30 09:22:57 +00:00
shawnlin
4da861b614 Image wallpaper is scaled to the cutout area when enable hide display cutout
Image wallpaper has a scale animation when entering launcher which make
the wallpaper scale to the cutout area.

Set window crop to prevent this

Bug: 174210114
Test: manual
      1. set image wallpaper
      2. enable hide display cutout
      3. back to launcher
Change-Id: Ie2edc5974dcf6efc9554d70732af46f650888fd4
2020-11-30 16:34:03 +08:00
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