diff options
Diffstat (limited to 'tests')
14 files changed, 277 insertions, 44 deletions
diff --git a/tests/AppJankTest/src/android/app/jank/tests/JankUtils.java b/tests/AppJankTest/src/android/app/jank/tests/JankUtils.java index df92898d76b1..9640a84eb9ca 100644 --- a/tests/AppJankTest/src/android/app/jank/tests/JankUtils.java +++ b/tests/AppJankTest/src/android/app/jank/tests/JankUtils.java @@ -29,6 +29,7 @@ public class JankUtils { AppJankStats jankStats = new AppJankStats( /*App Uid*/APP_ID, /*Widget Id*/"test widget id", + /*navigationComponent*/null, /*Widget Category*/AppJankStats.WIDGET_CATEGORY_SCROLL, /*Widget State*/AppJankStats.WIDGET_STATE_SCROLLING, /*Total Frames*/100, diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/BottomHalfPipAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/BottomHalfPipAppHelper.kt index 6573c2c83f20..fe344c9b79f2 100644 --- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/BottomHalfPipAppHelper.kt +++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/BottomHalfPipAppHelper.kt @@ -18,24 +18,46 @@ package com.android.server.wm.flicker.helpers import android.app.Instrumentation import android.content.Intent +import android.tools.traces.parsers.WindowManagerStateHelper import android.tools.traces.parsers.toFlickerComponent -import com.android.server.wm.flicker.testapp.ActivityOptions +import com.android.server.wm.flicker.testapp.ActivityOptions.BottomHalfPip class BottomHalfPipAppHelper( instrumentation: Instrumentation, private val useLaunchingActivity: Boolean = false, + private val fillTaskOnCreate: Boolean = true, ) : PipAppHelper( instrumentation, - appName = ActivityOptions.BottomHalfPip.LABEL, - componentNameMatcher = ActivityOptions.BottomHalfPip.COMPONENT - .toFlickerComponent() + appName = BottomHalfPip.LABEL, + componentNameMatcher = BottomHalfPip.COMPONENT.toFlickerComponent() ) { override val openAppIntent: Intent get() = super.openAppIntent.apply { component = if (useLaunchingActivity) { - ActivityOptions.BottomHalfPip.LAUNCHING_APP_COMPONENT + BottomHalfPip.LAUNCHING_APP_COMPONENT } else { - ActivityOptions.BottomHalfPip.COMPONENT + BottomHalfPip.COMPONENT + } + if (fillTaskOnCreate) { + putExtra(BottomHalfPip.EXTRA_BOTTOM_HALF_LAYOUT, false.toString()) } } + + override fun exitPipToOriginalTaskViaIntent(wmHelper: WindowManagerStateHelper) { + launchViaIntent( + wmHelper, + Intent().apply { + component = BottomHalfPip.COMPONENT + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } + ) + } + + fun toggleBottomHalfLayout() { + clickObject(TOGGLE_BOTTOM_HALF_LAYOUT_ID) + } + + companion object { + private const val TOGGLE_BOTTOM_HALF_LAYOUT_ID = "toggle_bottom_half_layout" + } }
\ No newline at end of file diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt index 2db8b1e18ec8..0824874f2a36 100644 --- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt +++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt @@ -28,6 +28,7 @@ import android.tools.device.apphelpers.IStandardAppHelper import android.tools.helpers.SYSTEMUI_PACKAGE import android.tools.traces.parsers.WindowManagerStateHelper import android.tools.traces.wm.WindowingMode +import android.view.KeyEvent.KEYCODE_EQUALS import android.view.KeyEvent.KEYCODE_LEFT_BRACKET import android.view.KeyEvent.KEYCODE_MINUS import android.view.KeyEvent.KEYCODE_RIGHT_BRACKET @@ -147,10 +148,19 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : } /** Click maximise button on the app header for the given app. */ - fun maximiseDesktopApp(wmHelper: WindowManagerStateHelper, device: UiDevice) { - val caption = getCaptionForTheApp(wmHelper, device) - val maximizeButton = getMaximizeButtonForTheApp(caption) - maximizeButton.click() + fun maximiseDesktopApp( + wmHelper: WindowManagerStateHelper, + device: UiDevice, + usingKeyboard: Boolean = false + ) { + if (usingKeyboard) { + val keyEventHelper = KeyEventHelper(getInstrumentation()) + keyEventHelper.press(KEYCODE_EQUALS, META_META_ON) + } else { + val caption = getCaptionForTheApp(wmHelper, device) + val maximizeButton = getMaximizeButtonForTheApp(caption) + maximizeButton.click() + } wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify() } diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt index de17bf422c0c..344cac1ac7e5 100644 --- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt +++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt @@ -75,8 +75,9 @@ open class PipAppHelper( .waitForAndVerify() } - /** Expand the PIP window back to full screen via intent and wait until the app is visible */ - fun exitPipToFullScreenViaIntent(wmHelper: WindowManagerStateHelper) = launchViaIntent(wmHelper) + /** Expand the PIP window back to original task via intent and wait until the app is visible */ + open fun exitPipToOriginalTaskViaIntent(wmHelper: WindowManagerStateHelper) = + launchViaIntent(wmHelper) fun changeAspectRatio(wmHelper: WindowManagerStateHelper) { val intent = Intent("com.android.wm.shell.flicker.testapp.ASPECT_RATIO") diff --git a/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bottom_half_pip.xml b/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bottom_half_pip.xml new file mode 100644 index 000000000000..2f9c3aa82057 --- /dev/null +++ b/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bottom_half_pip.xml @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2024 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:background="@android:color/holo_blue_bright"> + + <!-- All the buttons (and other clickable elements) should be arranged in a way so that it is + possible to "cycle" over all them by clicking on the D-Pad DOWN button. The way we do it + here is by arranging them this vertical LL and by relying on the nextFocusDown attribute + where things are arranged differently and to circle back up to the top once we reach the + bottom. --> + + <Button + android:id="@+id/enter_pip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Enter PIP" + android:onClick="enterPip"/> + + <Button + android:id="@+id/toggle_bottom_half_layout" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Set Bottom Half Layout" + android:onClick="toggleBottomHalfLayout"/> + + <CheckBox + android:id="@+id/with_custom_actions" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="With custom actions"/> + + <RadioGroup + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:checkedButton="@id/enter_pip_on_leave_disabled"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Enter PiP on home press"/> + + <RadioButton + android:id="@+id/enter_pip_on_leave_disabled" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Disabled" + android:onClick="onAutoPipSelected"/> + + <RadioButton + android:id="@+id/enter_pip_on_leave_manual" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Via code behind" + android:onClick="onAutoPipSelected"/> + + <RadioButton + android:id="@+id/enter_pip_on_leave_autoenter" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Auto-enter PiP" + android:onClick="onAutoPipSelected"/> + </RadioGroup> + + <RadioGroup + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:checkedButton="@id/ratio_default"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Ratio"/> + + <RadioButton + android:id="@+id/ratio_default" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Default" + android:onClick="onRatioSelected"/> + + <RadioButton + android:id="@+id/ratio_square" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Square [1:1]" + android:onClick="onRatioSelected"/> + + <RadioButton + android:id="@+id/ratio_wide" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Wide [2:1]" + android:onClick="onRatioSelected"/> + + <RadioButton + android:id="@+id/ratio_tall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Tall [1:2]" + android:onClick="onRatioSelected"/> + </RadioGroup> + + <CheckBox + android:id="@+id/set_source_rect_hint" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Set SourceRectHint"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Media Session"/> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <Button + android:id="@+id/media_session_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:nextFocusDown="@id/media_session_stop" + android:text="Start"/> + + <Button + android:id="@+id/media_session_stop" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:nextFocusDown="@id/enter_pip" + android:text="Stop"/> + + </LinearLayout> + +</LinearLayout> diff --git a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipActivity.java b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipActivity.java index 3d4865572486..3bbb94515f69 100644 --- a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipActivity.java +++ b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipActivity.java @@ -16,9 +16,14 @@ package com.android.server.wm.flicker.testapp; +import static com.android.server.wm.flicker.testapp.ActivityOptions.BottomHalfPip.EXTRA_BOTTOM_HALF_LAYOUT; + import android.app.Activity; +import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; +import android.view.Gravity; +import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; @@ -26,11 +31,13 @@ import androidx.annotation.NonNull; public class BottomHalfPipActivity extends PipActivity { + private boolean mUseBottomHalfLayout; + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setContentView(R.layout.activity_bottom_half_pip); setTheme(R.style.TranslucentTheme); - updateLayout(); } @Override @@ -41,14 +48,28 @@ public class BottomHalfPipActivity extends PipActivity { } /** + * Toggles the layout mode between fill task and half-bottom modes. + */ + public void toggleBottomHalfLayout(View v) { + mUseBottomHalfLayout = !mUseBottomHalfLayout; + updateLayout(); + } + + /** * Sets to match parent layout if the activity is - * {@link Activity#isInPictureInPictureMode()}. Otherwise, set to bottom half - * layout. + * {@link Activity#isInPictureInPictureMode()}. Otherwise, + * follows {@link #mUseBottomHalfLayout}. * * @see #setToBottomHalfMode(boolean) */ private void updateLayout() { - setToBottomHalfMode(!isInPictureInPictureMode()); + final boolean useBottomHalfLayout; + if (isInPictureInPictureMode()) { + useBottomHalfLayout = false; + } else { + useBottomHalfLayout = mUseBottomHalfLayout; + } + setToBottomHalfMode(useBottomHalfLayout); } /** @@ -57,15 +78,31 @@ public class BottomHalfPipActivity extends PipActivity { */ private void setToBottomHalfMode(boolean useBottomHalfLayout) { final WindowManager.LayoutParams attrs = getWindow().getAttributes(); + attrs.gravity = Gravity.BOTTOM; if (useBottomHalfLayout) { final int taskHeight = getWindowManager().getCurrentWindowMetrics().getBounds() .height(); - attrs.y = taskHeight / 2; attrs.height = taskHeight / 2; } else { - attrs.y = 0; attrs.height = LayoutParams.MATCH_PARENT; } getWindow().setAttributes(attrs); } + + @Override + void handleIntentExtra(@NonNull Intent intent) { + super.handleIntentExtra(intent); + if (intent.hasExtra(EXTRA_BOTTOM_HALF_LAYOUT)) { + final String booleanString = intent.getStringExtra(EXTRA_BOTTOM_HALF_LAYOUT); + // We don't use Boolean#parseBoolean here because the impl only checks if the string + // equals to "true", and returns for any other cases. We use our own impl here to + // prevent false positive. + if ("true".equals(booleanString)) { + mUseBottomHalfLayout = true; + } else if ("false".equals(booleanString)) { + mUseBottomHalfLayout = false; + } + } + updateLayout(); + } } diff --git a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipLaunchingActivity.java b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipLaunchingActivity.java index d9d4361411bb..209f71e4f307 100644 --- a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipLaunchingActivity.java +++ b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BottomHalfPipLaunchingActivity.java @@ -24,8 +24,12 @@ public class BottomHalfPipLaunchingActivity extends SimpleActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - final Intent intent = new Intent(this, BottomHalfPipActivity.class); + // Pass extras to BottomHalfPipActivity. + final Bundle extras = getIntent().getExtras(); + if (extras != null) { + intent.putExtras(extras); + } startActivity(intent); } } diff --git a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/PipActivity.java b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/PipActivity.java index 13d7f7f0d521..ee25ab2fb66c 100644 --- a/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/PipActivity.java +++ b/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/PipActivity.java @@ -350,7 +350,7 @@ public class PipActivity extends Activity { mMediaSession.setActive(newState != STATE_STOPPED); } - private void handleIntentExtra(Intent intent) { + void handleIntentExtra(Intent intent) { // Set the fixed orientation if requested if (intent.hasExtra(EXTRA_PIP_ORIENTATION)) { final int ori = Integer.parseInt(getIntent().getStringExtra(EXTRA_PIP_ORIENTATION)); diff --git a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt index aea75d8e7c85..d75a8f433af8 100644 --- a/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt +++ b/tests/Input/src/com/android/server/input/InputManagerServiceTests.kt @@ -613,7 +613,8 @@ class InputManagerServiceTests { 0 }, "title", - /* uid = */0 + /* uid = */0, + /* inputFeatureFlags = */ 0 ) whenever(windowManagerInternal.getKeyInterceptionInfoFromToken(any())).thenReturn(info) } diff --git a/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt index 4959cb3651fd..4d7085feb98f 100644 --- a/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt +++ b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt @@ -466,27 +466,27 @@ class KeyGestureControllerTests { intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( - "META + ALT + DPAD_LEFT -> Change Splitscreen Focus Left", + "CTRL + ALT + DPAD_LEFT -> Change Splitscreen Focus Left", intArrayOf( - KeyEvent.KEYCODE_META_LEFT, + KeyEvent.KEYCODE_CTRL_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_LEFT ), KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_LEFT, intArrayOf(KeyEvent.KEYCODE_DPAD_LEFT), - KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( - "META + CTRL + DPAD_RIGHT -> Change Splitscreen Focus Right", + "CTRL + ALT + DPAD_RIGHT -> Change Splitscreen Focus Right", intArrayOf( - KeyEvent.KEYCODE_META_LEFT, + KeyEvent.KEYCODE_CTRL_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT ), KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_RIGHT, intArrayOf(KeyEvent.KEYCODE_DPAD_RIGHT), - KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( @@ -735,25 +735,25 @@ class KeyGestureControllerTests { intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( - "META + ALT + '-' -> Magnifier Zoom Out", + "META + ALT + '-' -> Magnification Zoom Out", intArrayOf( KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_MINUS ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_OUT, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_ZOOM_OUT, intArrayOf(KeyEvent.KEYCODE_MINUS), KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( - "META + ALT + '=' -> Magnifier Zoom In", + "META + ALT + '=' -> Magnification Zoom In", intArrayOf( KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_EQUALS ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_IN, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_ZOOM_IN, intArrayOf(KeyEvent.KEYCODE_EQUALS), KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) @@ -785,49 +785,49 @@ class KeyGestureControllerTests { TestData( "META + ALT + 'Down' -> Magnification Pan Down", intArrayOf( - KeyEvent.KEYCODE_CTRL_LEFT, + KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_DOWN ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_PAN_DOWN, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_PAN_DOWN, intArrayOf(KeyEvent.KEYCODE_DPAD_DOWN), - KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( "META + ALT + 'Up' -> Magnification Pan Up", intArrayOf( - KeyEvent.KEYCODE_CTRL_LEFT, + KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_UP ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_PAN_UP, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_PAN_UP, intArrayOf(KeyEvent.KEYCODE_DPAD_UP), - KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( "META + ALT + 'Left' -> Magnification Pan Left", intArrayOf( - KeyEvent.KEYCODE_CTRL_LEFT, + KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_LEFT ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_PAN_LEFT, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_PAN_LEFT, intArrayOf(KeyEvent.KEYCODE_DPAD_LEFT), - KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), TestData( "META + ALT + 'Right' -> Magnification Pan Right", intArrayOf( - KeyEvent.KEYCODE_CTRL_LEFT, + KeyEvent.KEYCODE_META_LEFT, KeyEvent.KEYCODE_ALT_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT ), - KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFIER_PAN_RIGHT, + KeyGestureEvent.KEY_GESTURE_TYPE_MAGNIFICATION_PAN_RIGHT, intArrayOf(KeyEvent.KEYCODE_DPAD_RIGHT), - KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON, + KeyEvent.META_META_ON or KeyEvent.META_ALT_ON, intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE) ), ) diff --git a/tests/Input/src/com/android/test/input/UinputRecordingIntegrationTests.kt b/tests/Input/src/com/android/test/input/UinputRecordingIntegrationTests.kt index c61a25021949..0b281d8d39e2 100644 --- a/tests/Input/src/com/android/test/input/UinputRecordingIntegrationTests.kt +++ b/tests/Input/src/com/android/test/input/UinputRecordingIntegrationTests.kt @@ -21,6 +21,7 @@ import android.cts.input.EventVerifier import android.graphics.PointF import android.hardware.input.InputManager import android.os.ParcelFileDescriptor +import android.server.wm.CtsWindowInfoUtils.waitForWindowOnTop import android.util.Log import android.util.Size import android.view.InputEvent @@ -113,6 +114,7 @@ class UinputRecordingIntegrationTests { testName, size = testData.displaySize ).use { scenario -> + waitForWindowOnTop(scenario.activity.window) scenario.activity.window.decorView.requestUnbufferedDispatch(INPUT_DEVICE_SOURCE_ALL) try { diff --git a/tests/InputScreenshotTest/robotests/Android.bp b/tests/InputScreenshotTest/robotests/Android.bp index b2414a85c095..63a13849ee7f 100644 --- a/tests/InputScreenshotTest/robotests/Android.bp +++ b/tests/InputScreenshotTest/robotests/Android.bp @@ -66,7 +66,6 @@ android_robolectric_test { "android.test.mock.stubs.system", "truth", ], - upstream: true, java_resource_dirs: ["config"], instrumentation_for: "InputRoboApp", diff --git a/tests/Internal/Android.bp b/tests/Internal/Android.bp index 9f35c7b7fa33..e294da101fb7 100644 --- a/tests/Internal/Android.bp +++ b/tests/Internal/Android.bp @@ -65,6 +65,7 @@ android_ravenwood_test { "src/com/android/internal/util/ParcellingTests.java", ], auto_gen_config: true, + team: "trendy_team_ravenwood", } java_test_helper_library { diff --git a/tests/testables/tests/AndroidTest.xml b/tests/testables/tests/AndroidTest.xml index 85f6e6257770..392bf67cb13b 100644 --- a/tests/testables/tests/AndroidTest.xml +++ b/tests/testables/tests/AndroidTest.xml @@ -45,6 +45,7 @@ <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> <option name="directory-keys" value="/data/user/0/com.android.testables/files"/> + <option name="directory-keys" value="/data/user/10/com.android.testables/files"/> <option name="collect-on-run-ended-only" value="true"/> <option name="clean-up" value="true"/> </metrics_collector> |