Moving various nav-bar configs out of feature flags

Bug: 332588958
Test: Presubmit
Flag: None
Change-Id: Ia4dc5b69bcf4d461e3444b9e37bb7334bb74aae4
This commit is contained in:
Sunny Goyal
2024-04-05 12:54:32 -07:00
parent 962b3d43ea
commit 89931316a2
22 changed files with 514 additions and 556 deletions

View File

@@ -48,7 +48,6 @@ import androidx.test.uiautomator.UiDevice;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.config.FeatureFlags.BooleanFlag;
import com.android.launcher3.config.FeatureFlags.IntFlag;
import com.android.launcher3.tapl.LauncherInstrumentation;
import com.android.launcher3.tapl.Workspace;
import com.android.launcher3.util.rule.TestStabilityRule;
@@ -67,7 +66,6 @@ import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Predicate;
import java.util.function.ToIntFunction;
public class TestUtil {
private static final String TAG = "TestUtil";
@@ -169,21 +167,6 @@ public class TestUtil {
};
}
/**
* Utility class to override a int flag during test. Note that the returned SafeCloseable
* must be closed to restore the original state
*/
public static SafeCloseable overrideFlag(IntFlag flag, int value) {
ToIntFunction<IntFlag> originalProxy = FeatureFlags.sIntReader;
ToIntFunction<IntFlag> testProxy = f -> f == flag ? value : originalProxy.applyAsInt(f);
FeatureFlags.sIntReader = testProxy;
return () -> {
if (FeatureFlags.sIntReader == testProxy) {
FeatureFlags.sIntReader = originalProxy;
}
};
}
public static void uninstallDummyApp() throws IOException {
UiDevice.getInstance(getInstrumentation()).executeShellCommand(
"pm uninstall " + DUMMY_PACKAGE);