diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml index 258f24a54e..d15a2d2ab6 100644 --- a/quickstep/res/layout/overview_actions_container.xml +++ b/quickstep/res/layout/overview_actions_container.xml @@ -56,7 +56,7 @@ android:visibility="gone" /> extends FrameLayo findViewById(R.id.action_screenshot).setOnClickListener(this); if (ENABLE_OVERVIEW_SHARE.get()) { share.setVisibility(VISIBLE); - findViewById(R.id.share_space).setVisibility(VISIBLE); + findViewById(R.id.oav_three_button_space).setVisibility(VISIBLE); } } diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index d8fca1da5e..2627149167 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -149,6 +149,9 @@ public final class FeatureFlags { public static final BooleanFlag ENABLE_OVERVIEW_SHARE = getDebugFlag( "ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions"); + public static final BooleanFlag ENABLE_OVERVIEW_CONTENT_PUSH = getDebugFlag( + "ENABLE_OVERVIEW_CONTENT_PUSH", false, "Show Content Push button in Overview Actions"); + public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag( "ENABLE_DATABASE_RESTORE", true, "Enable database restore when new restore session is created"); diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java index 30f8fb02a0..b2d008119e 100644 --- a/src/com/android/launcher3/testing/TestProtocol.java +++ b/src/com/android/launcher3/testing/TestProtocol.java @@ -96,6 +96,8 @@ public final class TestProtocol { public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing"; public static final String REQUEST_OVERVIEW_SHARE_ENABLED = "overview-share-enabled"; + public static final String REQUEST_OVERVIEW_CONTENT_PUSH_ENABLED = + "overview-content-push-enabled"; public static boolean sDisableSensorRotation; public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation"; diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 80adf05c2b..22833ec16d 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -1313,6 +1313,11 @@ public final class LauncherInstrumentation { TestProtocol.TEST_INFO_RESPONSE_FIELD); } + boolean overviewContentPushEnabled() { + return getTestInfo(TestProtocol.REQUEST_OVERVIEW_CONTENT_PUSH_ENABLED).getBoolean( + TestProtocol.TEST_INFO_RESPONSE_FIELD); + } + private void disableSensorRotation() { getTestInfo(TestProtocol.REQUEST_MOCK_SENSOR_ROTATION); } diff --git a/tests/tapl/com/android/launcher3/tapl/OverviewActions.java b/tests/tapl/com/android/launcher3/tapl/OverviewActions.java index a30a404764..e3e0f4209d 100644 --- a/tests/tapl/com/android/launcher3/tapl/OverviewActions.java +++ b/tests/tapl/com/android/launcher3/tapl/OverviewActions.java @@ -33,6 +33,27 @@ public class OverviewActions { this.mLauncher = launcherInstrumentation; } + /** + * Clicks content push button. + */ + @NonNull + public Overview clickAndDismissContentPush() { + if (mLauncher.overviewContentPushEnabled()) { + try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck(); + LauncherInstrumentation.Closable c = mLauncher.addContextLayer( + "want to click content push button and exit screenshot ui")) { + UiObject2 exo = mLauncher.waitForObjectInContainer(mOverviewActions, + "action_content_push"); + mLauncher.clickLauncherObject(exo); + try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( + "clicked content push button")) { + return new Overview(mLauncher); + } + } + } + return new Overview(mLauncher); + } + /** * Clicks screenshot button and closes screenshot ui. */