diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2018-07-10 13:50:50 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2018-07-10 13:52:17 -0700 |
commit | 36b54228fcb9599be91119e671cb0a4c6064e033 (patch) | |
tree | f428c68e5f1c935c38dae3eab037175c13c8340a /tests/src/com/android | |
parent | 17b7d3659451472302f200c5b27174e03c735520 (diff) | |
download | android_packages_apps_Trebuchet-36b54228fcb9599be91119e671cb0a4c6064e033.tar.gz android_packages_apps_Trebuchet-36b54228fcb9599be91119e671cb0a4c6064e033.tar.bz2 android_packages_apps_Trebuchet-36b54228fcb9599be91119e671cb0a4c6064e033.zip |
Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
Diffstat (limited to 'tests/src/com/android')
-rw-r--r-- | tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java | 19 | ||||
-rw-r--r-- | tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java | 21 |
2 files changed, 10 insertions, 30 deletions
diff --git a/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java b/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java index b92f61205..031909fe1 100644 --- a/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java +++ b/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java @@ -16,7 +16,6 @@ import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.LauncherModel; import com.android.launcher3.LauncherProvider; import com.android.launcher3.LauncherSettings; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.model.GridSizeMigrationTask.MultiStepMigrationTask; import com.android.launcher3.util.TestLauncherProvider; @@ -87,13 +86,8 @@ public class GridSizeMigrationTaskTest { mIdp.numHotseatIcons = 3; new GridSizeMigrationTask(mContext, mIdp, mValidPackages, 5, 3) .migrateHotseat(); - if (FeatureFlags.NO_ALL_APPS_ICON) { - // First item is dropped as it has the least weight. - verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]); - } else { - // First & last items are dropped as they have the least weight. - verifyHotseat(hotseatItems[1], -1, hotseatItems[3]); - } + // First item is dropped as it has the least weight. + verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]); } @Test @@ -109,13 +103,8 @@ public class GridSizeMigrationTaskTest { mIdp.numHotseatIcons = 3; new GridSizeMigrationTask(mContext, mIdp, mValidPackages, 5, 3) .migrateHotseat(); - if (FeatureFlags.NO_ALL_APPS_ICON) { - // First item is dropped as it has the least weight. - verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]); - } else { - // First & third items are dropped as they have the least weight. - verifyHotseat(hotseatItems[1], -1, hotseatItems[4]); - } + // First item is dropped as it has the least weight. + verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]); } private void verifyHotseat(long... sortedIds) { diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index f16f514cd..dd91fe86d 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java @@ -43,13 +43,11 @@ import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.R; import com.android.launcher3.compat.AppWidgetManagerCompat; import com.android.launcher3.compat.LauncherAppsCompat; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.testcomponent.AppWidgetNoConfig; import com.android.launcher3.testcomponent.AppWidgetWithConfig; import org.junit.Before; -import java.util.Locale; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -101,19 +99,12 @@ public abstract class AbstractLauncherUiTest { */ protected UiObject2 openAllApps() { mDevice.waitForIdle(); - if (FeatureFlags.NO_ALL_APPS_ICON) { - UiObject2 hotseat = mDevice.wait( - Until.findObject(getSelectorForId(R.id.hotseat)), 2500); - Point start = hotseat.getVisibleCenter(); - int endY = (int) (mDevice.getDisplayHeight() * 0.1f); - // 100 px/step - mDevice.swipe(start.x, start.y, start.x, endY, (start.y - endY) / 100); - - } else { - mDevice.wait(Until.findObject( - By.desc(mTargetContext.getString(R.string.all_apps_button_label))), - DEFAULT_UI_TIMEOUT).click(); - } + UiObject2 hotseat = mDevice.wait( + Until.findObject(getSelectorForId(R.id.hotseat)), 2500); + Point start = hotseat.getVisibleCenter(); + int endY = (int) (mDevice.getDisplayHeight() * 0.1f); + // 100 px/step + mDevice.swipe(start.x, start.y, start.x, endY, (start.y - endY) / 100); return findViewById(R.id.apps_list_view); } |