Commit Graph

333 Commits

Author SHA1 Message Date
Ben Lin
014f2975ce Re-implement pinch-to-resize gesture.
This removes ScaleGestureDetector and instead just do the calculation
inside the class itself. As user sets two input points on the PiP
surface, this signals the start of the gesture, and as user drags the
two fingers, it resizes the PiP to the maximum possible size. After the
user releases their fingers, then it auto-offsets/snaps to the right
position.

Bug: 166478885
Test: Start a pinch-to-resize while feature flag is on
Change-Id: I634bd14e97f0cf0cc7bf9c1a1b64a1f12130e0e9
2020-12-04 17:46:24 -08:00
Antonella Dellanzo
61406d1ed2 Merge "Removing duplicated code" 2020-12-04 09:21:35 +00:00
TreeHugger Robot
1fa042b64f Merge "Support dragging divider bar of app-pair to resize the splits" 2020-12-04 03:03:34 +00:00
TreeHugger Robot
7dd5daa18d Merge "Cleanup IPinnedStackController and IPinnedStackListener 1/N" 2020-12-04 01:18:28 +00:00
Hongwei Wang
34bb7d0553 Merge "Starts settings as PiP user" 2020-12-04 00:50:04 +00:00
Hongwei Wang
05c04d4189 Cleanup IPinnedStackController and IPinnedStackListener 1/N
Remove the IPinnedStackController aidl interface. The only method was
left in IPinnedStackController is the getDisplayRotation and used only
by PipTouchHandler. Switched that over to Context.getDisplay#getRotation

Video: http://rcll/aaaaaabFQoRHlzixHdtY/bO1xoqLNemseqmk603y9us
Bug: 174702196
Test: verify the original bug (b/36879891) is still fixed, see video
Test: atest PinnedStackTests \
            WMShellUnitTests
Change-Id: I65814b25ed9a1fb28dad4d6eae88b949efc15e3c
2020-12-03 14:33:28 -08:00
Winson Chung
94132e14a9 1/ Initial preparation for separate shell main thread
- Add @BinderThread/@ShellMainThread/@SysUIMainThread annotations
  for some common shell classes and callbacks
- Add mechanism to inject shell-anim/shell-main/sysui-main/etc
  executors (removed AnimationThread static instance)
(Note: The shell main thread will still be the sysui main thread)

Bug: 161979899
Test: atest WMShellUnitTests

Change-Id: I4adfeaebe5b79fab7c9451eef7b54fcdf4d8d40a
2020-12-03 10:42:48 -08:00
Jerry Chang
0c9c2cfac1 Support dragging divider bar of app-pair to resize the splits
Update SplitLayout and DividerView to support dragging divider bar and
make them more generic to be able to share among different split impl.

Bug: 172704238
Test: manual check the behavior of divider bar
Test: atest WMShellUnitTests
Change-Id: I16ed1fd86bdff4d8544c5787c95315c59055ad04
2020-12-04 01:49:58 +08:00
TreeHugger Robot
6f3ed806b6 Merge "DisplayImeController: fix out-of-sync IME visibility" 2020-12-03 15:40:40 +00:00
Adrian Roos
a18650bef8 DisplayImeController: fix out-of-sync IME visibility
Fixes an issue where the DisplayImeController would disagree with
the InputMethodManagerService about the visibility of the IME.

Currently, the Insets component is supposed to execute the
visibility as dictated by IMMS; however, when the DisplayImeController
became the control target, previously it would just apply the IME
visibility that was last requested of it - regardless of the
changes to it that may have happened while it was not the control
target.

Eventually, IME visibility should be driven by the requested IME
inset visibility of the focused window, instead of the separate
dispatch we have now from IMMS.

Bug: 167780081
Test: atest DisplayImeControllerTest ImeInsetsSourceProviderTest
Change-Id: I1f140af6bcccbcbe6efb2fde9a789ac4c7bd127f
2020-12-03 13:55:25 +00:00
Nataniel Borges
e4b1ddde99 Merge "Store and pull files from /sdcard/" 2020-12-03 10:53:17 +00:00
Nataniel Borges
2ed07b4ef9 Store and pull files from /sdcard/
Tradefed FilePullerLogCollector can no longer access the internal app directory (e.g. /storage/emulated/0/Android/data/com.android.server.wm.flicker/files).

This makes it unable to pull trace files, when a test fails. This CL makes flicker tests store their data on /sdcard/flicker which can be accessed by the Tradefed FilePullerLogCollector

Bug: 171026227
Test: atest WMShellFlickerTests
Change-Id: Ie2329cbc475ee1be35e6bb3e274c96a4db142ac5
2020-12-03 10:11:25 +01:00
Daichi Hirono
574e6b4294 Wire displayId from input event to PipTouchState
Bug: 171257597
Test: None
Change-Id: Ic78ce2d4341b00275067b45e5f9e59e6c487ecfc
2020-12-03 09:10:54 +09:00
Hongwei Wang
a1978c2b46 Starts settings as PiP user
Video: http://rcll/aaaaaabFQoRHlzixHdtY/hqnhjRhyJmuLCnkvV6YdOD
Bug: 170152738
Test: see video
Change-Id: I5d5372b1ceb54242f45bc4708551a43eb043655d
2020-12-02 14:53:48 -08:00
Ben Lin
429355b910 Merge "TV-PiP: Migrate Menu to SystemWindows." 2020-12-02 22:07:10 +00:00
Dave Mankoff
35d0072514 Merge "Remove FlingAnimationUtils.Builder provider." 2020-12-02 18:57:17 +00:00
TreeHugger Robot
51f7ca5556 Merge "Fix bounds calculation in TV PipController" 2020-12-02 18:00:10 +00:00
Dave Mankoff
9179b302bb Remove FlingAnimationUtils.Builder provider.
Mark it as directly injectable.

Use a Provider<> of the Builder so that, if DisplayMetrics changes,
the changes get picked up.

Fixes: 174653877
Test: manual
Change-Id: If8b404cbb7f5111144c21ce4810323d95f962359
2020-12-02 11:15:27 -05:00
Antonella Dellanzo
769b84f85c Removing duplicated code
There's duplicated code in CommonAssertions of WMShell project and FlickerTests. We are keeping the one from FlickerTests and removing the one from WMShell to avoid problems of changing it in one place and forgetiing about the other project.

Test: atest WMShellFlickerTests
Change-Id: Ie87df793933d9cbe0ccd947514027650811a1819
2020-12-02 16:19:13 +01:00
Sergey Nikolaienkov
a48a120cd6 Fix bounds calculation in TV PipController
Use PipBoundsState in .tv.PipController for tracking Pip window bounds,
instead of tracking them "internally".
Fix a bug, where Pip window receives a wrong aspect ratio after Pip menu
closes if a custon aspect ration is specified.

Bug: 174646148
Bug: 168447740
Test: atest WMShellFlickerTests:TvPipBasicTest
Test: atest WMShellFlickerTests:TvPipMenuTests
Change-Id: I5e609d5c22591d6eb523ef08118a4aa11a220326
2020-12-02 12:48:17 +00:00
Antonella Dellanzo
d921d9fa9e Marking split screen rotate tests as flaky
Adding the flakytest annotation to the tests SplitScreenRotateOneLaunchedAppTest and SplitScreenRotateTwoLaunchedAppTest as seems to crash the device every so often.

Test: atest WMShellFlickerTests
Change-Id: Ie0dcfb60618afbed84b043b1c467a4e74e6cba2e
2020-12-02 13:31:05 +01:00
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
Ben Lin
819f82ba1d TV-PiP: Migrate Menu to SystemWindows.
Bug: 169574665
Test: Run PiP on TV

Change-Id: Ia6d0e6f7c88c4cc59e21700b70d74e09cf8fc519
2020-12-01 16:51:25 -08: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