diff options
author | vadimt <vadimt@google.com> | 2019-04-04 13:16:17 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-04-04 13:20:34 -0700 |
commit | 24eb1c9c89f26f2371cc26c1eaa4e647820f2f0b (patch) | |
tree | 0684493d3a505ee095c7919a9beefc5ef57302a5 /quickstep/tests/src | |
parent | 077df72acca237385f52b3557b70c30e3cb5d0b9 (diff) | |
download | android_packages_apps_Trebuchet-24eb1c9c89f26f2371cc26c1eaa4e647820f2f0b.tar.gz android_packages_apps_Trebuchet-24eb1c9c89f26f2371cc26c1eaa4e647820f2f0b.tar.bz2 android_packages_apps_Trebuchet-24eb1c9c89f26f2371cc26c1eaa4e647820f2f0b.zip |
Not using magic constant for edge sensitivity
+Some cleanup in TAPL
Change-Id: I886a6c4abacf8b806ee5507e633ec21f2e7ad1d4
Diffstat (limited to 'quickstep/tests/src')
-rw-r--r-- | quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java index f5ac9c94e..895485ddf 100644 --- a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java +++ b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java @@ -17,6 +17,7 @@ package com.android.quickstep; import static androidx.test.InstrumentationRegistry.getInstrumentation; + import static com.android.quickstep.NavigationModeSwitchRule.Mode.ALL; import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON; import static com.android.quickstep.NavigationModeSwitchRule.Mode.TWO_BUTTON; @@ -26,18 +27,23 @@ import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_ import android.content.Context; import android.util.Log; + import androidx.test.uiautomator.UiDevice; + import com.android.launcher3.tapl.LauncherInstrumentation; import com.android.launcher3.tapl.TestHelpers; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; +import com.android.systemui.shared.system.QuickStepContract; + import org.junit.Assert; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * Test rule that allows executing a test with Quickstep on and then Quickstep off. * The test should be annotated with @QuickstepOnOff. @@ -72,9 +78,9 @@ public class NavigationModeSwitchRule implements TestRule { @Override public void evaluate() throws Throwable { final Context context = getInstrumentation().getContext(); - final String prevOverlayPkg = LauncherInstrumentation.isGesturalMode(context) + final String prevOverlayPkg = QuickStepContract.isGesturalMode(context) ? NAV_BAR_MODE_GESTURAL_OVERLAY - : LauncherInstrumentation.isSwipeUpMode(context) + : QuickStepContract.isSwipeUpMode(context) ? NAV_BAR_MODE_2BUTTON_OVERLAY : NAV_BAR_MODE_3BUTTON_OVERLAY; final LauncherInstrumentation.NavigationModel originalMode = @@ -144,4 +150,4 @@ public class NavigationModeSwitchRule implements TestRule { return base; } } -} +}
\ No newline at end of file |