Revert "Revert "Listen for hover events over stashed taskbar.""

This reverts commit c27605099c.

Reason for revert: DroidMonitor-triggered revert due to breakage <https://android-build.googleplex.com/builds/quarterdeck?branch=git_udc-dev&target=cf_x86_64_phone-userdebug&lkgb=10076607&lkbb=10076982&fkbb=10076788>, bug <281093059>

Change-Id: I71e7fd07232c27a004243df0ffb0457fe53fe13b
This commit is contained in:
Qiao Yang
2023-05-05 19:07:17 +00:00
committed by Android (Google) Code Review
parent c27605099c
commit 2482c8dcd4
12 changed files with 295 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ package com.android.quickstep;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static com.android.launcher3.config.FeatureFlags.ENABLE_CURSOR_HOVER_STATES;
import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT;
import static com.android.quickstep.TaskbarModeSwitchRule.Mode.TRANSIENT;
@@ -269,6 +270,39 @@ public class TaplTestsTaskbar extends AbstractQuickStepTest {
.dragToSplitscreen(TEST_APP_PACKAGE, CALCULATOR_APP_PACKAGE);
}
@Test
@TaskbarModeSwitch(mode = TRANSIENT)
public void testShowTaskbarUnstashHintOnHover() {
try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) {
getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE);
mLauncher.getLaunchedAppState().hoverToShowTaskbarUnstashHint();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Test
@TaskbarModeSwitch(mode = TRANSIENT)
public void testUnstashTaskbarOnScreenBottomEdgeHover() {
try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) {
getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE);
mLauncher.getLaunchedAppState().hoverScreenBottomEdgeToUnstashTaskbar();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Test
@TaskbarModeSwitch(mode = TRANSIENT)
public void testHoverBelowHintedTaskbarToUnstash() {
try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) {
getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE);
mLauncher.getLaunchedAppState().hoverBelowHintedTaskbarToUnstash();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private Taskbar getTaskbar() {
Taskbar taskbar = mLauncher.getLaunchedAppState().getTaskbar();
List<String> taskbarIconNames = taskbar.getIconNames();