Commit Graph

958 Commits

Author SHA1 Message Date
Hongwei Wang
303d1d3bfb Merge "Disable failing PIP tests while checking the issue" 2022-02-11 23:31:15 +00:00
TreeHugger Robot
278a215ae2 Merge "Fix crash when overflow is selected and last bubble is removed" 2022-02-11 19:48:38 +00:00
Nataniel Borges
24512f91a6 Disable failing PIP tests while checking the issue
PIP is not automatically appareing when launching via intent after
the Bubbles tests, when launching independently it works fine.

Bug: 218604389
Test: atest WMShellFlickerTest
Change-Id: Ib5dd76476cbe5cc054e5d4964e6dd4a5cb0ae5cc
2022-02-11 14:01:41 +01:00
Mady Mellor
d5861c1b2e Fix crash when overflow is selected and last bubble is removed
When the last bubble is removed we clean up the views associated with
the bubbles, including the overflow view.

BubbleOverflow#getExpandedView would create the view if it didn't exist
but it wouldn't be initialized which means it wouldn't have the Bubble
Positioner set on it.

When a bubble is removed some code runs that would do stuff to the
last expanded view, if it's non-null. If the overflow was the last bubble
expanded, rather than skipping that code because the expandedView is
null (because all the bubbles are gone), it was actually recreating
the overflow expandedView but it wouldn't be initialized at that time
resulting in the NPE.

This fixes the issue by modifying BubbleOverflow's getExpandedView to
only return the view, not do any view creation.

Additionally this change removes some redundant code in BubbleStackView.

Bug: 214399371
Test: atest BubbleOverflowTest
Change-Id: Ib8d94fc7ea1163e79146e1439ec3f404d3caa303
2022-02-10 15:08:39 -08:00
Evan Rosky
0ef7951dee Merge "Hook up fixed-rotation logic to shell transitions" 2022-02-10 19:51:45 +00:00
Winson Chung
ab4e152e05 Merge "Allow dragging to launch multiple instances of the same activity" 2022-02-10 18:59:35 +00:00
TreeHugger Robot
af9e9264f9 Merge "Fix PIP keyboard test" 2022-02-10 16:37:46 +00:00
Shan Huang
a1c62623bf Merge "Create BackEvent interface for back navigation parameters." 2022-02-10 14:59:06 +00:00
Pablo Gamito
2c37d7a5e0 Merge "Remove fass assertions from tests" 2022-02-10 14:46:06 +00:00
Nataniel Borges
3bbed27849 Fix PIP keyboard test
Test was missing teardown block

Bug: 218604389
Test: atest WMShellFlickerTest
Change-Id: I2331a16f76b95d31b524c2b714b815a174fbcf04
2022-02-10 13:12:59 +01:00
TreeHugger Robot
d25198a25e Merge "Disable flaky tests" 2022-02-10 09:16:48 +00:00
Nataniel Borges
d86a80274a Merge "Run flicker tests 3x" 2022-02-10 07:32:47 +00:00
Shan Huang
a39fa74923 Create BackEvent interface for back navigation parameters.
Bug: b/210539672, b/195946584
Test: m -j
Change-Id: I0264d0995aed8a73563bece0d15d2a9aac0ebf06
2022-02-10 07:01:01 +00:00
Evan Rosky
91a630b912 Hook up fixed-rotation logic to shell transitions
This works by separating an app launching to 2 phases
(similar to legacy fixed rotation). First it launches
the app into a different rotation. Once the animation
finishes it creates a new seamless display-rotation
transition.

Because we have displayRotation in windowconfiguration,
we can directly rotate a window's surface instead of
checking explicitly for fixedRotationState. Since the
second-phase is a transition, we don't (ab)use
seamlessRotator. Once the display lines-up, the
surfaces and configurations automatically update.

Since we still want to explore shell-transitions style
rotation (single-transition), add a system property
to turn it off and on.

Bug: 217560545
Test: existing tests and manual tests
Change-Id: I0b34b32ff5b2650a519d3c195df452de446cf515
2022-02-09 17:12:31 -08:00
Nataniel Borges
77dff60b1b Disable flaky tests
Create specific class for shell transition when whole CUJ crashes

Bug: 209843622
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I8d3d96af7303e6bd7bc4a540aa79b0f9ea3bf4a0
2022-02-09 19:02:17 +01:00
Nataniel Borges
c95bc4d69a Run flicker tests 3x
We run the flicker tests multiple times to detect CLs that intoruce flakiness early. Currently we run 5 executions of each CUJ. However, due to lab capacity and impact in presubmit times, this CL reduces the repetitions to 3

Bug: 209843622
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I165937fb82953d62c028ffe96a948d0ca00dbbe2
2022-02-09 11:11:54 +01:00
Winson Chung
f4ed441e18 Allow dragging to launch multiple instances of the same activity
- When dragging to launch a new app, apply MULTIPLE_TASK to the launch
  intent to allow apps that support it to show side-by-side
- This requires the pending intent resolved from LauncherAppsService to
  be mutable (should be ok since we only use this api from SysUI)
- Also remove some unused members and duplication of getting the running
  task when dragging

Bug: 207686016
Test: atest WMShellUnitTests

Change-Id: Ib233ad754a6c6e3c4e0d0e10ed788ab8e055cccc
2022-02-09 07:21:44 +00:00
TreeHugger Robot
14da91737a Merge "Add default theme for flicker test app" 2022-02-09 06:36:41 +00:00
Ats Jenk
5f32b96cee Merge "Hide suppressed bubble" 2022-02-09 04:47:37 +00:00
Tom Natan
2f6356d870 Merge "[6/n] Letterbox Education: add window manager and connect to controller." 2022-02-09 00:20:37 +00:00
tomnatan
2d6097698d [6/n] Letterbox Education: add window manager and connect to controller.
Bug: 207010227
Test: atest WMShellUnitTests:CompatUIWindowManagerTest
Test: atest WMShellUnitTests:CompatUIControllerTest
Change-Id: I1f85245180ffa9b3abe409a0f18bf923bea3a442
2022-02-08 20:36:38 +00:00
Pablo Gamito
b85d6f1ad4 Remove fass assertions from tests
Assertions are very flaky, don't provide any immediately useful information in the current state and going to be replace soon anyways

Test: atest FlickerTests
Change-Id: Id8f7649b818237bc16051d808ef46ca875669faa
2022-02-08 17:10:10 +01:00
Riddle Hsu
5a68f5cd91 Add default theme for flicker test app
Otherwise its WidowManager.LayoutParams#windowAnimations is 0, then
it won't play animation (TransitionAnimation#loadAnimationAttr
returns null) so the the surface of closing app may be updated to
invisible at random timing that causes the test flaky.

Use darker gray as window background color to make it easier to
distinguish the visual result between home, starting window (gray)
and app content (orange).

Bug: 216297992
Bug: 213852103
Test: com.android.server.wm.flicker.launch.OpenAppColdTest
Change-Id: I3bb073dfa52484a63168b3aeb6e7f5f43bd02aac
2022-02-08 14:58:55 +00:00
Winson Chung
c8ae608fec Add source owners to test owners
Bug: 207582920
Test: N/a
Change-Id: Ie0c8562ad45cfd64445c40dde4e426585c75bdc0
2022-02-08 06:23:29 +00:00
Tom Natan
634fa51080 Merge "[4/n] Letterbox Education: Create a superclass for compat UI window managers." 2022-02-05 12:58:11 +00:00
Shan Huang
6aa1f22cae Merge "Expose IBackAnimation from Shell to Launcher." 2022-02-05 00:58:32 +00:00
Shan Huang
445c5f24a2 Expose IBackAnimation from Shell to Launcher.
Test: m -j
Bug: b/195946584
Change-Id: I26f48e78c91ef99757da9bc09d4a4f98dc50f863
2022-02-04 18:50:38 +00:00
tomnatan
6c7e886348 [4/n] Letterbox Education: Create a superclass for compat UI window managers.
This super class will hold common logic and be used for the letterbox
education window manager in a follow up cl.

Bug: 207010227
Test: atest WMShellUnitTests:CompatUILayoutTest
Test: atest WMShellUnitTests:CompatUIWindowManagerTest
Test: atest WMShellUnitTests:CompatUIControllerTest
Change-Id: If6a1a5d1325e1fd4245b138e255000fa71273472
2022-02-04 17:45:53 +00:00
Nataniel Borges
08136e8150 Merge "Run pip transition 5x" 2022-02-04 10:04:42 +00:00
Ats Jenk
bb4306e62a Hide suppressed bubble
When a bubble is suppressed it should be removed from the stack and
expanded view.
Previously we were updating the visibility of the suppressed bubble.
This kept it in the expanded view.
Updating the suppression logic to remove the suppressed bubble view
temporarily, while it is suppressed.
When it should be visible again, adding it back.

Bug: 214090876
Test: atest BubbleDataTest BubblesTest
Test: manual, created a single bubble, checked it is hidden when
associated activity is opened and shown again after activity closes
Test: manual, created multiple bubbles, checked bubble is hidden when
associated activity is opened and shown again after activity closes
Test: manual, checked that suppressed bubble is not shown in expanded
view

Change-Id: I591a4330ccbb4d9764100715140d8bd20d0351bf
2022-02-03 17:36:14 -08:00
Vadim Caen
8e59ca9a3a Merge "Save the OnBackInvokedCallback in WindowState" 2022-02-03 17:26:12 +00:00
Nataniel Borges
dd9373015a Run pip transition 5x
The test was previously running the transition 20 times incorrectly. This frequently led to OOM errors, since the system would store 80 instances of protos + flicker objects in memory while making assertions.

Intead run the default 5x

Bug: 216303412
Test: atest ExitPipWithSwipeDownTest
Change-Id: I20fe19239a857cfbc0818910814041323735692a
2022-02-03 15:35:20 +01:00
Nataniel Borges
cbe01b513c Merge "Fetch traces async" 2022-02-03 13:07:15 +00:00
Vadim Caen
717e53a6a7 Save the OnBackInvokedCallback in WindowState
This CL enable OnBackInvokedCallback to be saved in a WindowState and
queried by the BackNavigationController to be returned when
ATM.startBackNavigation() is called.

The DecorView provides a PendingOnBackInvokedDispatcher that can receive
callback registration before being added to a ViewRootImpl.

Test: atest FrameworksCoreTests:BackNavigationTest
Bug: 131727607
Change-Id: I01528a22ea4a6583a56ade4eab69136d727855d0
2022-02-02 22:08:02 +01:00
Nataniel Borges
ccc875cc97 Fetch traces async
Due to the large amount of traces on flicker, the tests take 15min+ to copy the files from the device to the host after the test execution. Instead, start copying the files asynchronously.

It is not possible to use the async mechanism from Tradefed's FilePullerLogCollector because it either: (1) pushes the files form the directory multiple times -- once per test -- creating a lot of duplicates; or (2) cleans up the directory without checking for new files, losing some files.

This CL creates an asynchronous file upload mechanism for flicker using coroutines

Bug: 216111397
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I5bbae834cf3439950626823c6b665c733e27e517
2022-02-01 20:08:51 +01:00
kholoud mohamed
dd7c79d26b Allow overriding managed profile switching animation
Bug: 203548565
Bug: 188410712
Test: manual
Change-Id: I1bf75abcee4309eee5c03f76238bb21fb8549c02
2022-01-31 19:49:49 +00:00
Tom Natan
d7a62ace0f Merge "[2/n] Letterbox Education: Add information about fixed orientation letterbox to TaskInfo" 2022-01-31 13:58:43 +00:00
tomnatan
72b8801b69 [2/n] Letterbox Education: Add information about fixed orientation letterbox to TaskInfo
Bug: 207010227
Test: atest WmTests:ActivityRecordTests
Test: atest WmTests:SizeCompatTests
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I04e82eb494c84bd78c269dd244bdd4a3e4d5fcc8
2022-01-31 10:30:45 +00:00
Chris Li
6c76dc017f Merge "Move disabled shelltransit flicker tests to flaky" 2022-01-26 14:48:53 +00:00
Chris Li
63be3c89bb Move disabled shelltransit flicker tests to flaky
So that we can keep track of the status, and move it back to presubmit
after it becomes stable

Bug: 214452854
Test: pass existing
Change-Id: I60453789676cda9eb0892b601806d398af7bdc82
2022-01-26 18:27:49 +08:00
Chris Li
85174deb62 Enable Bubble flicker test with Shell transition
The failure should be fixed with ag/16678935

Bug: 213866869
Bug: 205288792
Bug: 214452854
Test: pass existing with shell transition enabled
Change-Id: I2f8696a14d5f2537858e92f05edc2ef7629e4afe
2022-01-26 14:07:14 +08:00
Chris Li
d4de0febd4 Merge "Enable flicker test group1 with Shell transition" 2022-01-25 02:20:55 +00:00
TreeHugger Robot
c5900ec571 Merge "Support refactored Region class" 2022-01-24 20:44:54 +00:00
Nataniel Borges
b03abbe07a Support refactored Region class
For use in KotlinJS (winscope) the Region class cannot have multiple constructors. JS doesn't support method or constructor overload.

This CL make the tests compatible with the newer class version

Bug: 216111397
Test: atest WMShellFlickerTests
Change-Id: Ifa5f8c6e0063185e2986019b3a27f24c93fe05d2
2022-01-24 18:53:22 +01:00
Tony Huang
e660522187 Merge "Cleanup the legacy split screen (2/n)" 2022-01-24 06:56:51 +00:00
Tony Huang
0feb3c43a8 Cleanup the legacy split screen (2/n)
Remove WINDOWING_MODE_SPLIT_SCREEN_PRIMARY and SECONDARY used on
tests and replace them by WINDOWING_MODE_MULTI_WINDOW or other
migrate way.

Bug: 199236198
Test: atest WmTests
Test: atest DragAndDropPolicyTest
Change-Id: I41b25392d710eeea42edf75b3c9bca20a7d8a887
2022-01-24 11:58:04 +08:00
Nataniel Borges
ba142e0089 Demote flaky flicker tests from presubmit
The test flakiness is significantly slowing down presubmit

Bug: 209843622
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I096e9f69e6de8ff73d527db533e76e8da44fdcb0
2022-01-22 18:23:25 +01:00
Treehugger Robot
c2b9af3ac8 Merge "Create owner test files for subpackages" am: 9e8cfbac2c am: 05bc30f21c am: a39bb54fdd am: 9e5539c793
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952387

Change-Id: Idee1d783a52db16a7fb7aeadb11b69564e72aca5
2022-01-21 16:14:52 +00:00
Treehugger Robot
9e5539c793 Merge "Create owner test files for subpackages" am: 9e8cfbac2c am: 05bc30f21c am: a39bb54fdd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952387

Change-Id: I94c28df75a0af1ea24dcc388fee84c093268ffd0
2022-01-21 15:56:50 +00:00
Treehugger Robot
a39bb54fdd Merge "Create owner test files for subpackages" am: 9e8cfbac2c am: 05bc30f21c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952387

Change-Id: I5a4f26de3f474fe5794d94ca1f581b317ac1bb37
2022-01-21 15:46:05 +00:00