Commit Graph

12453 Commits

Author SHA1 Message Date
TreeHugger Robot
c3947aa6ff Merge "Do not run NotificationTest on Auto." into tm-dev 2022-04-22 05:58:06 +00:00
Kohsuke Yatoh
7f1e7a1e65 Do not run NotificationTest on Auto.
Bug: 229820964
Test: atest InputMethodStressTest
Change-Id: Icf218460fa842f59125c2c09b822b3444ffc1281
2022-04-21 17:35:17 -07:00
Kohsuke Yatoh
eae7ca8165 Do not cleanup IME window if show is requested.
This CL fixes a race condition for IMM#showSoftInput, which surfaces
when it's called during an IME hide animation.
IMM#showSoftInput ends up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully, and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).

I think a clean fix is to have IMM#showSoftInput call WIC#show
synchronously. However, this requires a significant refactoring.

As a short term fix, this CL adds a boolean field indicating whether or
not IMM#showSoftInput has been called. If it's called, we skip calling
IMM#notifyImeHidden.

Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I36d570630085d0bc34097a2433208601dc9cb0fd
(cherry picked from commit 4c607982ed)
Merged-In: I36d570630085d0bc34097a2433208601dc9cb0fd
2022-04-21 21:34:31 +00:00
Kohsuke Yatoh
4844170377 Notify IMMS synchronously on IME insets hidden.
Currently, IMMS will be notified asynchronously when an IME hide
animation finishes, via message dispatching through IMS
(IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput).
This creates a race condition when IMM#showSoftInput or WIC#show is
called around the end of hide animation.

This CL fixes the race condition by synchronously and directly
calling IMMS#hideSoftInput from IMM#notifyImeHidden.

Note that there is still another race condition for IMM#showSoftInput
(not WIC#show) if it's called during an IME hide animation;
IMM#showSoftInput ended up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).
I will fix the latter issue in a separate CL.

Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
(cherry picked from commit 9065310f81)
Merged-In: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
2022-04-21 21:34:24 +00:00
Benedict Wong
83e6ae270a Merge "Add CarrierConfig to TelephonySubscriptionSnapshot" am: 59aeaf29c0 am: d868725c8c am: 1670176e65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2063410

Change-Id: I83b7473cc8358213b5ce87781cb534d9ebf79991
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:27:16 +00:00
Benedict Wong
59aeaf29c0 Merge "Add CarrierConfig to TelephonySubscriptionSnapshot" 2022-04-21 17:40:58 +00:00
TreeHugger Robot
5428fee94e Merge "Disable flaky flicker tests" into tm-dev 2022-04-21 14:14:22 +00:00
TreeHugger Robot
77e8e3599a Merge "Disable failing app launch assertion on shell transitions" into tm-dev 2022-04-21 13:54:52 +00:00
Nataniel Borges
97a456125c Disable flaky flicker tests
Reduce resource usage in presubmit by mitigating flakiness

Bug: 229738092
Bug: 203538234
Test: atest FlickerTests
Change-Id: Ifaa50e0cbf63a8cfdd571555570cbf10fa787ce2
2022-04-21 11:30:47 +02:00
Nataniel Borges
5070363c87 Disable failing app launch assertion on shell transitions
Bug: 229738092
Test: atest FlickerTests:OpenImeWindowToOverViewTest
Change-Id: I03c28017a8bcd58af197f0d144f3a141a978f698
2022-04-21 11:12:19 +02:00
Benedict Wong
52629838cb Add CarrierConfig to TelephonySubscriptionSnapshot
This change ensures that carrier configs are saved as part of the
snapshot, allowing all entities in the VCN to query telephony
subscription information from the same source.

Test: atest FrameworksVcnTests
Change-Id: I31447d84fe98d6bd2cc78ead41746198728c400b
2022-04-21 01:09:36 +00:00
Derek Jedral
a4a4f42b3a Merge "[Trust] Add test target for tablets." into tm-dev 2022-04-20 17:10:06 +00:00
Nataniel Borges
eca6ae398d Merge "Disable failing visible consecutive layers assertion" into tm-dev 2022-04-20 11:18:24 +00:00
TreeHugger Robot
af84398fed Merge "Disable flaky app launch flicker tests" into tm-dev 2022-04-20 07:04:58 +00:00
Nataniel Borges
c1655ef37d Merge "Don't assert bars location when display is off" into tm-dev 2022-04-20 06:28:13 +00:00
Nataniel Borges
56d66c7dd3 Merge "Wait IME visible after launch" into tm-dev 2022-04-20 06:28:08 +00:00
Yan Yan
780a2b31bc Merge "Maximize VCN MTU when using IPv6" am: 6d70c7f36a am: 8f8e80779a am: 30ac2c94d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2063435

Change-Id: I0de762eeadbb7218f1b41c18d2475b459c722a85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 04:36:30 +00:00
Nataniel Borges
ed1fbd9dbe Disable failing visible consecutive layers assertion
Currently, one frame of the animation shows 2 instances of the launcher, making the test flaky

Bug: 229762973
Test: atest FlickerTests
Change-Id: I51f2854e24ea6a4114ebfd7726b5cc0ffe32e416
2022-04-19 20:18:55 +00:00
Nataniel Borges
b358224e5b Wait IME visible after launch
The ImeAppAutoFocus shows the IME when the app is launched. at the moment it doesn't wait for the IME to be visible before continuing and this causes test flakiness

Test: atest FlickerTests
Change-Id: If3ab191fcc9d026553a1859e594e4d38da37f41d
2022-04-19 18:58:22 +00:00
Nataniel Borges
6e2960cba6 Disable flaky app launch flicker tests
Bug: 229735718
Bug: 229738092
Test: atest FlickerTests
Change-Id: I50eaeedf2bac0d824595fcea744c4f7ea7fedfab
2022-04-19 16:13:55 +00:00
Nataniel Borges
3df2e39b48 Don't assert bars location when display is off
Currently the assertions fail when the dipslay is off because no layers
are visible

Bug: 228582475
Test: atest FlickerTests
Change-Id: I718192064c1d1cf0bdf19015e3b7daeb00879d3c
2022-04-19 15:38:35 +00:00
TreeHugger Robot
d423d78014 Merge "Assert correct nav bar visibility in overview" into tm-dev 2022-04-19 07:06:19 +00:00
Yan Yan
6d70c7f36a Merge "Maximize VCN MTU when using IPv6" 2022-04-18 17:30:44 +00:00
Derek Jedral
3c4a8625b9 [Trust] Add test target for tablets.
Add a target for tablets that we can point to in order to run tests
during pre and post-submit.

Test: local atest
Bug: 228851008
Change-Id: Ie0a1186cc97388c1b9c282c81e8bfcab5eec814b
2022-04-18 16:46:48 +00:00
Ming-Shin Lu
e00e624da2 Merge "Fix imeLayerAndImeSnapshotVisibleOnScreen flaky" into tm-dev 2022-04-18 16:15:19 +00:00
Ming-Shin Lu
26780b4d6d Fix imeLayerAndImeSnapshotVisibleOnScreen flaky
In case IME-snapshot removed and the assertion can't verify IME-snapshot
visible from the next frame, fix the assertion by verifying both
IME-snapshot and IME are invisible in the end.

Fix: 228947097
Test: atest FlickerTests:CloseImeEditorPopupDialogTest \
         --rerun-until-failure 20
Change-Id: I1d945cd10761af1c7dad9154a550e69bf4d481ee
2022-04-18 20:58:25 +08:00
Yan Yan
eb00e3c77a Maximize VCN MTU when using IPv6
This commit maximizes VCN MTU by considering IP version. Specifically,
VcnGateWayConnection stores/updates the IkeSessionConnectionInfo passed
out from the IKE library during IKE setup and migration. By looking into
the addresses stored in the IkeSessionConnectionInfo, VCN is able to
know the IP family of the VCN tunnels.

Bug: 222331693
Test: atest FrameworksVcnTests(new tests), CtsVcnTestCases
Change-Id: I9a2839d7827f1d6451546ec222129f286e94ae36
2022-04-15 12:16:20 -07:00
Benedict Wong
0ae3528dc7 Merge "Allow provisioning package to retrieve subGrp, clear it's own config" am: 1428215bee am: 6b6f825b26 am: 4a6b279bb5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2056512

Change-Id: Ic537ef95af0424aef9f980cd124adac3dde1294a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 19:48:12 +00:00
Winson Chiu
fbf8386dc7 Merge "Re-root and use device remount APIs for SystemPreparer" into tm-dev 2022-04-14 16:57:17 +00:00
Nataniel Borges
c63675f595 Assert correct nav bar visibility in overview
The bars (including status bar and navigation bar) are expected to be hidden while entering overview in landscape if launcher is set to portrait only.
Because "showing portrait overview (launcher) in landscape display" is an intermediate state depending on the touch-up to decide the intention of gesture, the display may keep in landscape if return to app, or change to portrait if the gesture is to swipe-to-home.
So instead of showing landscape bars with portrait launcher at the same time (especially return-to-home that launcher workspace becomes visible), hide the bars until leave overview to have cleaner appearance.

Bug: 227189877
Test: atest FlickerTests:OpenImeWindowToOverViewTest
Change-Id: Idc89eab44bb74217c4235374a8fcfd5f7ec488cf
2022-04-14 13:17:38 +02:00
TreeHugger Robot
759d76068b Merge "Execute flicker tests with device without wallpaper" into tm-dev 2022-04-13 23:41:57 +00:00
Benedict Wong
1a8f3e0a14 Allow provisioning package to retrieve subGrp, clear it's own config
This changes the VCN to allow a VCN provisioning package to retrieve
its listing of configured subgroups and clear its own configurations,
regardless of whether it is the active subscription group.

Safety is guaranteed based on the VCN's clearing of packages when app
data is cleared, and when the app is uninstalled. In addition to the
configurations not being retrievable, the clearing of the configs will
ensure that sideloading of an app with the same package name provides
no ability to otherwise impact settings.

Bug: 227248744
Test: atest FrameworksVcnTests
Change-Id: I2c774c00373942f895169a761d4e9a1d5b0b2edb
2022-04-13 22:10:21 +00:00
Nataniel Borges
10671a0f9f Execute flicker tests with device without wallpaper
Currently it fails with

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ComponentName android.app.WallpaperInfo.getComponent()' on a null object reference
    at com.android.server.wm.flicker.launch.TaskTransitionTest$Companion.getWallpaperPackage(TaskTransitionTest.kt:240)

Fixes: 225350160
Test: atest FlickerTests:TaskTransitionTest
Change-Id: I516520e806fc17e75c2cdfe07116f7b84fdd5adb
2022-04-13 20:10:51 +02:00
Pablo Gamito
521dfd5acf Remove references to old FaaS test rule
Test: atest FlickerTests
Change-Id: Iabab1c67166933be74244abcb8e9d883ce2e8dad
2022-04-13 09:38:26 +00:00
Winson
e593837a58 Re-root and use device remount APIs for SystemPreparer
This might improve success rates for remounting the device.
The command goes through shell with no inherent state, so it's
unclear how it can fail, but going through the official methods
might help.

Bug: 197552347

Test: atest --rerun-until-failure 100 \
    com.android.server.pm.test.OverlayActorVisibilityTest

Change-Id: I25c1f938064e72ddc288b12c048f0cd82217b583
2022-04-11 12:17:36 -07:00
Makoto Onuki
4e97fd8938 Merge "Fix deadlock in ComponentAliasResolver" into tm-dev 2022-04-11 15:42:59 +00:00
Kohsuke Yatoh
8459b0ce14 Merge changes from topics "presubmit-am-10eb3d835eca4319b6144c8f4c068e9c", "presubmit-am-4b02653e83b548f494f92f7a023c91b9" into tm-dev
* changes:
  Use case-insensitive match for action label.
  Take screenshot on failure.
2022-04-09 06:27:37 +00:00
Kohsuke Yatoh
fcfbaa6b61 Use case-insensitive match for action label.
The label can be as-is ("Test reply") or all-caps ("TEST REPLY")
depending on the system config.

Bug: 227712564
Bug: 227424350
Test: atest InputMethodStressTest
Change-Id: Id64793f572bec06c84a235fc7688870f44013723
2022-04-08 17:31:41 -07:00
Kohsuke Yatoh
f75e0a0512 Take screenshot on failure.
ScreenCaptureRule is inspired by ScreenshotTestRule [1], but does not
require additional permissions as ScreenCaptureRule uses Shell
permission.

[1] https://cs.android.com/android/platform/superproject/+/master:cts/tests/tests/systemui/src/android/systemui/cts/ScreenshotTestRule.java

Bug: 227712564
Bug: 227424350
Test: atest InputMethodStressTest
Change-Id: I8569cb09a430540ac3f932e36bc80800312e7865
2022-04-08 17:31:26 -07:00
Makoto Onuki
4d9f545a40 Fix deadlock in ComponentAliasResolver
Test: atest ComponentAliasTests ComponentAliasTests1 ComponentAliasTests2
(except for existing flakiness: b/228613740)
Bug: 228273242

Change-Id: Iea7679702ce9c883e6df196de0ae47d7bdd5d876
2022-04-08 11:50:27 -07:00
Pablo Gamito
c2266ad6cb Add Flicker tests for launching app from Notification CUJ
Fixes: 227803517
Test: atest FlickerTests:OpenAppFromNotificationWarm FlickerTests:OpenAppFromNotificationCold FlickerTests:OpenAppFromLockNotificationWithLockOverlayApp FlickerTests:OpenAppFromLockNotificationWarm FlickerTests:OpenAppFromLockNotificationCold

Change-Id: I88edaa4e5703d3a4667db890b63816523ffa450a
2022-04-08 16:11:35 +00:00
Kohsuke Yatoh
62b46c6409 Merge "Unlock screen before test runs." into tm-dev 2022-04-07 22:37:40 +00:00
Dave McCloskey
ff083ee97d Merge "Increase default maxWait to 30 seconds." into tm-dev 2022-04-07 20:02:28 +00:00
Dave McCloskey
8439e6a2c6 Increase default maxWait to 30 seconds.
Since we check every 50ms this will not increase the test time when the
device is not slow.

Bug: 228066093
Test: atest TrustTests (details in bug)
Change-Id: Icd73b77aa5ffd446a55aa427bc85edcb3b5b041e
2022-04-06 16:34:28 -07:00
Pablo Gamito
12b486a3c9 Merge "Demote flaky flicker tests" into tm-dev 2022-04-06 21:50:56 +00:00
TreeHugger Robot
cd9af56183 Merge "Add a flicker test to verify IME snapshot when dismissing dialog" into tm-dev 2022-04-06 21:23:34 +00:00
Ming-Shin Lu
a32ef736c7 Add a flicker test to verify IME snapshot when dismissing dialog
Fix: 227762328
Test: atest FlickerTests:CloseImeEditorPopupDialogTest
Change-Id: Iba01b1819cc667e0d94a8fb1e3599b2a31ac22b7
2022-04-06 23:47:41 +08:00
Pablo Gamito
578be8eb80 Demote flaky flicker tests
Speed up presubmit and limit presubmit failures

Test: atest FlickerTests WMShellFlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Presubmit --module-arg FlickerTests:exclude-annotation:android.platform.test.annotations.Postsubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest
Change-Id: I7c57ddd9ed762b79e09a91555942fdffdfa685b2
2022-04-06 12:12:54 +00:00
Pablo Gamito
e2a041cf92 Merge "Update component ids from Winscope to Flicker" am: d41316339d am: 1016b2d3c2 am: b9a97d8d9b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2055046

Change-Id: If7f4442f602e60ca1a5322e02484cace47ce89a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 15:19:51 +00:00
Pablo Gamito
85c38bd427 Update component ids from Winscope to Flicker
Test: N/A
Change-Id: I5bc614c406535b0f282cb9d948e426e879d3a069
2022-04-04 22:31:02 +00:00