Merge "Migrate ENABLE_APP_PAIRS flag to aconfig" into main

This commit is contained in:
Jeremy Sim
2023-10-13 05:22:36 +00:00
committed by Android (Google) Code Review
3 changed files with 8 additions and 5 deletions

View File

@@ -315,7 +315,7 @@ public interface TaskShortcutFactory {
TaskIdAttributeContainer taskContainer) {
final TaskView taskView = taskContainer.getTaskView();
if (!FeatureFlags.ENABLE_APP_PAIRS.get() || !taskView.containsMultipleTasks()) {
if (!FeatureFlags.enableAppPairs() || !taskView.containsMultipleTasks()) {
return null;
}

View File

@@ -30,13 +30,13 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.tapl.OverviewTaskMenu;
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
import com.android.launcher3.ui.TaplTestsLauncher3;
import com.android.launcher3.util.TestUtil;
import com.android.launcher3.util.rule.TestStabilityRule;
import com.android.quickstep.TaskbarModeSwitchRule.TaskbarModeSwitch;
import com.android.wm.shell.Flags;
import org.junit.After;
import org.junit.Before;
@@ -114,7 +114,7 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest {
@Ignore("Enable once App Pairs flagged on. These cause memory leaks b/297135374")
public void testSaveAppPairMenuItemExistsOnSplitPair() throws Exception {
assumeTrue("App pairs feature is currently not enabled, no test needed",
FeatureFlags.ENABLE_APP_PAIRS.get());
Flags.enableAppPairs());
createAndLaunchASplitPair();
@@ -130,7 +130,7 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest {
@Ignore("Enable once App Pairs flagged on. These cause memory leaks b/297135374")
public void testSaveAppPairMenuItemDoesNotExistOnSingleTask() throws Exception {
assumeTrue("App pairs feature is currently not enabled, no test needed",
FeatureFlags.ENABLE_APP_PAIRS.get());
Flags.enableAppPairs());
startAppFast(CALCULATOR_APP_PACKAGE);

View File

@@ -274,11 +274,14 @@ public final class FeatureFlags {
+ " locked. Enabling this causes a 1-time movement of certain SharedPreferences"
+ " data. Improves startup latency.");
// TODO(Block 18): Clean up flags
// Aconfig migration complete for ENABLE_APP_PAIRS.
public static final BooleanFlag ENABLE_APP_PAIRS = getDebugFlag(274189428,
"ENABLE_APP_PAIRS", DISABLED,
"Enables the ability to create and save app pairs on the Home screen for easy"
+ " split screen launching.");
public static boolean enableAppPairs() {
return ENABLE_APP_PAIRS.get() || com.android.wm.shell.Flags.enableAppPairs();
}
// TODO(Block 19): Clean up flags
public static final BooleanFlag SCROLL_TOP_TO_RESET = getReleaseFlag(270395177,