Updating to nav bar mode

Bug: 127366543
Test: Manual
Change-Id: I602539e5d6161c5bf6056bb60679b7ef1f168e3e
(cherry picked from commit 18841823ed24af6ab879382901f4b4dd1cd61ddc)
diff --git a/tests/Android.mk b/tests/Android.mk
index b9b703d..ca7395a 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -35,8 +35,8 @@
         ../src/com/android/launcher3/TestProtocol.java
 endif
 
-LOCAL_SDK_VERSION := current
 LOCAL_MODULE := ub-launcher-aosp-tapl
+LOCAL_SDK_VERSION := current
 
 include $(BUILD_STATIC_JAVA_LIBRARY)
 
@@ -47,18 +47,18 @@
 
 LOCAL_MODULE_TAGS := tests
 LOCAL_STATIC_JAVA_LIBRARIES := \
-	androidx.test.runner \
-	androidx.test.rules \
-	androidx.test.uiautomator_uiautomator \
-	mockito-target-minus-junit4
+    androidx.test.runner \
+    androidx.test.rules \
+    androidx.test.uiautomator_uiautomator \
+    mockito-target-minus-junit4
 
 ifneq (,$(wildcard frameworks/base))
-  LOCAL_PRIVATE_PLATFORM_APIS := true
-  LOCAL_STATIC_JAVA_LIBRARIES += launcher-aosp-tapl
+    LOCAL_PRIVATE_PLATFORM_APIS := true
+    LOCAL_STATIC_JAVA_LIBRARIES += launcher-aosp-tapl
 else
-  LOCAL_SDK_VERSION := 28
-  LOCAL_MIN_SDK_VERSION := 21
-  LOCAL_STATIC_JAVA_LIBRARIES += ub-launcher-aosp-tapl
+    LOCAL_SDK_VERSION := 28
+    LOCAL_MIN_SDK_VERSION := 21
+    LOCAL_STATIC_JAVA_LIBRARIES += ub-launcher-aosp-tapl
 endif
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 19b368f..3dd1467 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -17,7 +17,6 @@
 package com.android.launcher3.tapl;
 
 import static com.android.launcher3.TestProtocol.BACKGROUND_APP_STATE_ORDINAL;
-import static com.android.systemui.shared.system.SettingsCompat.SWIPE_UP_SETTING_NAME;
 
 import android.app.ActivityManager;
 import android.app.Instrumentation;
@@ -30,7 +29,6 @@
 import android.os.Bundle;
 import android.os.Parcelable;
 import android.os.SystemClock;
-import android.provider.Settings;
 import android.util.Log;
 import android.view.InputDevice;
 import android.view.MotionEvent;
@@ -48,7 +46,7 @@
 import androidx.test.uiautomator.Until;
 
 import com.android.launcher3.TestProtocol;
-import com.android.quickstep.SwipeUpSetting;
+import com.android.systemui.shared.system.QuickStepContract;
 
 import org.junit.Assert;
 
@@ -175,13 +173,7 @@
     }
 
     private boolean isSwipeUpEnabled() {
-        final boolean swipeUpEnabledDefaultValue = SwipeUpSetting.isSwipeUpEnabledDefaultValue();
-        return SwipeUpSetting.isSwipeUpSettingAvailable() ?
-                Settings.Secure.getInt(
-                        mInstrumentation.getTargetContext().getContentResolver(),
-                        SWIPE_UP_SETTING_NAME,
-                        swipeUpEnabledDefaultValue ? 1 : 0) == 1 :
-                swipeUpEnabledDefaultValue;
+        return !QuickStepContract.isLegacyMode(mInstrumentation.getTargetContext());
     }
 
     static void log(String message) {