2017-07-24 01:02:38 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2017 The Android Open Source Project
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.android.launcher3.config;
|
|
|
|
|
|
2023-03-20 15:56:07 -07:00
|
|
|
import static com.android.launcher3.config.FeatureFlags.FlagState.DISABLED;
|
|
|
|
|
import static com.android.launcher3.config.FeatureFlags.FlagState.ENABLED;
|
|
|
|
|
import static com.android.launcher3.config.FeatureFlags.FlagState.TEAMFOOD;
|
2023-02-24 09:27:04 -08:00
|
|
|
import static com.android.launcher3.uioverrides.flags.FlagsFactory.getDebugFlag;
|
|
|
|
|
import static com.android.launcher3.uioverrides.flags.FlagsFactory.getReleaseFlag;
|
|
|
|
|
|
2018-10-12 14:14:16 -04:00
|
|
|
import android.content.Context;
|
|
|
|
|
|
2023-03-02 16:49:59 -08:00
|
|
|
import androidx.annotation.VisibleForTesting;
|
|
|
|
|
|
2019-09-11 16:51:50 -07:00
|
|
|
import com.android.launcher3.BuildConfig;
|
2019-08-26 14:36:02 -07:00
|
|
|
import com.android.launcher3.Utilities;
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2023-03-02 16:49:59 -08:00
|
|
|
import java.util.function.Predicate;
|
|
|
|
|
import java.util.function.ToIntFunction;
|
|
|
|
|
|
2017-07-24 01:02:38 -07:00
|
|
|
/**
|
|
|
|
|
* Defines a set of flags used to control various launcher behaviors.
|
|
|
|
|
*
|
2018-10-03 13:32:01 -04:00
|
|
|
* <p>All the flags should be defined here with appropriate default values.
|
2017-07-24 01:02:38 -07:00
|
|
|
*/
|
2019-09-11 16:51:50 -07:00
|
|
|
public final class FeatureFlags {
|
2017-07-24 01:02:38 -07:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final String FLAGS_PREF_NAME = "featureFlags";
|
2018-10-03 13:32:01 -04:00
|
|
|
|
2023-03-02 16:49:59 -08:00
|
|
|
@VisibleForTesting
|
|
|
|
|
public static Predicate<BooleanFlag> sBooleanReader = f -> f.mCurrentValue;
|
|
|
|
|
@VisibleForTesting
|
|
|
|
|
public static ToIntFunction<IntFlag> sIntReader = f -> f.mCurrentValue;
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
private FeatureFlags() { }
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2018-10-22 16:31:28 -04:00
|
|
|
public static boolean showFlagTogglerUi(Context context) {
|
2023-02-22 16:56:15 -08:00
|
|
|
return BuildConfig.IS_DEBUG_DEVICE && Utilities.isDevelopersOptionsEnabled(context);
|
2018-10-03 13:32:01 -04:00
|
|
|
}
|
2017-07-24 01:02:38 -07:00
|
|
|
|
2020-02-14 14:15:13 -08:00
|
|
|
/**
|
|
|
|
|
* True when the build has come from Android Studio and is being used for local debugging.
|
2023-02-22 16:56:15 -08:00
|
|
|
* @deprecated Use {@link BuildConfig#IS_STUDIO_BUILD} directly
|
2020-02-14 14:15:13 -08:00
|
|
|
*/
|
2023-02-22 16:56:15 -08:00
|
|
|
@Deprecated
|
|
|
|
|
public static final boolean IS_STUDIO_BUILD = BuildConfig.IS_STUDIO_BUILD;
|
2019-09-11 16:51:50 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enable moving the QSB on the 0th screen of the workspace. This is not a configuration feature
|
|
|
|
|
* and should be modified at a project level.
|
2023-02-22 16:56:15 -08:00
|
|
|
* @deprecated Use {@link BuildConfig#QSB_ON_FIRST_SCREEN} directly
|
2019-09-11 16:51:50 -07:00
|
|
|
*/
|
2023-02-22 16:56:15 -08:00
|
|
|
@Deprecated
|
2022-02-24 13:30:57 +00:00
|
|
|
public static final boolean QSB_ON_FIRST_SCREEN = BuildConfig.QSB_ON_FIRST_SCREEN;
|
2019-09-11 16:51:50 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Feature flag to handle define config changes dynamically instead of killing the process.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* To add a new flag that can be toggled through the flags UI:
|
|
|
|
|
*
|
2019-12-03 12:00:44 -08:00
|
|
|
* Declare a new ToggleableFlag below. Give it a unique key (e.g. "QSB_ON_FIRST_SCREEN"),
|
2022-10-05 14:51:37 -07:00
|
|
|
* and set a default value for the flag. This will be the default value on Debug builds.
|
2019-09-11 16:51:50 -07:00
|
|
|
*/
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_INPUT_CONSUMER_REASON_LOGGING = getDebugFlag(270390028,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_INPUT_CONSUMER_REASON_LOGGING", ENABLED,
|
2022-08-22 15:10:43 -07:00
|
|
|
"Log the reason why an Input Consumer was selected for a gesture.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_GESTURE_ERROR_DETECTION = getDebugFlag(270389990,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_GESTURE_ERROR_DETECTION", ENABLED,
|
2022-07-14 12:43:09 -07:00
|
|
|
"Analyze gesture events and log detected errors");
|
|
|
|
|
|
2017-07-24 01:02:38 -07:00
|
|
|
// When enabled the promise icon is visible in all apps while installation an app.
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag PROMISE_APPS_IN_ALL_APPS = getDebugFlag(270390012,
|
2023-03-20 15:56:07 -07:00
|
|
|
"PROMISE_APPS_IN_ALL_APPS", DISABLED, "Add promise icon in all-apps");
|
2017-07-24 01:02:38 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag KEYGUARD_ANIMATION = getDebugFlag(270390904,
|
2023-03-20 15:56:07 -07:00
|
|
|
"KEYGUARD_ANIMATION", DISABLED,
|
|
|
|
|
"Enable animation for keyguard going away on wallpaper");
|
2020-03-17 14:24:42 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DEVICE_SEARCH = getReleaseFlag(270390907,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_DEVICE_SEARCH", ENABLED, "Allows on device search in all apps");
|
2020-07-17 11:18:25 -07:00
|
|
|
|
2022-01-31 17:57:06 -08:00
|
|
|
public static final BooleanFlag ENABLE_FLOATING_SEARCH_BAR =
|
2023-03-20 15:56:07 -07:00
|
|
|
getReleaseFlag(270390286, "ENABLE_FLOATING_SEARCH_BAR", DISABLED,
|
|
|
|
|
"Keep All Apps search bar at the bottom (but above keyboard if open)");
|
2022-01-31 17:57:06 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_HIDE_HEADER = getReleaseFlag(270390930,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_HIDE_HEADER", ENABLED, "Hide header on keyboard before typing in all apps");
|
2022-06-13 13:39:44 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_EXPANDING_PAUSE_WORK_BUTTON = getDebugFlag(270390779,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_EXPANDING_PAUSE_WORK_BUTTON", DISABLED,
|
2022-11-21 16:30:28 -08:00
|
|
|
"Expand and collapse pause work button while scrolling");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag COLLECT_SEARCH_HISTORY = getReleaseFlag(270391455,
|
2023-03-20 15:56:07 -07:00
|
|
|
"COLLECT_SEARCH_HISTORY", DISABLED, "Allow launcher to collect search history for log");
|
2021-11-18 12:48:16 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TWOLINE_ALLAPPS = getDebugFlag(270390937,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TWOLINE_ALLAPPS", DISABLED, "Enables two line label inside all apps.");
|
2021-11-09 16:11:58 -08:00
|
|
|
|
2023-01-06 12:38:55 -08:00
|
|
|
public static final BooleanFlag ENABLE_TWOLINE_DEVICESEARCH = getDebugFlag(201388851,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TWOLINE_DEVICESEARCH", DISABLED,
|
2023-01-06 12:38:55 -08:00
|
|
|
"Enable two line label for icons with labels on device search.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DEVICE_SEARCH_PERFORMANCE_LOGGING = getReleaseFlag(
|
2023-03-20 15:56:07 -07:00
|
|
|
270391397, "ENABLE_DEVICE_SEARCH_PERFORMANCE_LOGGING", DISABLED,
|
2021-06-23 15:32:50 -07:00
|
|
|
"Allows on device search in all apps logging");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag IME_STICKY_SNACKBAR_EDU = getDebugFlag(270391693,
|
2023-03-20 15:56:07 -07:00
|
|
|
"IME_STICKY_SNACKBAR_EDU", ENABLED, "Show sticky IME edu in AllApps");
|
2021-06-16 09:46:25 -05:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_PEOPLE_TILE_PREVIEW = getDebugFlag(270391653,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_PEOPLE_TILE_PREVIEW", DISABLED,
|
2021-04-06 03:03:33 -05:00
|
|
|
"Experimental: Shows conversation shortcuts on home screen as search results");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag FOLDER_NAME_MAJORITY_RANKING = getDebugFlag(270391638,
|
2023-03-20 15:56:07 -07:00
|
|
|
"FOLDER_NAME_MAJORITY_RANKING", ENABLED,
|
2020-06-08 01:19:15 -07:00
|
|
|
"Suggests folder names based on majority based ranking.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag INJECT_FALLBACK_APP_CORPUS_RESULTS = getReleaseFlag(270391706,
|
2023-03-20 15:56:07 -07:00
|
|
|
"INJECT_FALLBACK_APP_CORPUS_RESULTS", DISABLED,
|
2023-02-24 09:27:04 -08:00
|
|
|
"Inject fallback app corpus result when AiAi fails to return it.");
|
2022-11-18 14:51:28 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ASSISTANT_GIVES_LAUNCHER_FOCUS = getDebugFlag(270391641,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ASSISTANT_GIVES_LAUNCHER_FOCUS", DISABLED,
|
2019-10-17 11:59:53 -07:00
|
|
|
"Allow Launcher to handle nav bar gestures while Assistant is running over it");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_BULK_WORKSPACE_ICON_LOADING = getDebugFlag(270392203,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_BULK_WORKSPACE_ICON_LOADING", ENABLED,
|
2021-08-18 14:53:50 -07:00
|
|
|
"Enable loading workspace icons in bulk.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_BULK_ALL_APPS_ICON_LOADING = getDebugFlag(270392465,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_BULK_ALL_APPS_ICON_LOADING", ENABLED, "Enable loading all apps icons in bulk.");
|
2021-09-09 15:36:12 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag(270392706,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_DATABASE_RESTORE", DISABLED,
|
2019-12-10 14:56:34 -08:00
|
|
|
"Enable database restore when new restore session is created");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SMARTSPACE_DISMISS = getDebugFlag(270391664,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_SMARTSPACE_DISMISS", ENABLED,
|
2021-04-20 10:23:31 -07:00
|
|
|
"Adds a menu option to dismiss the current Enhanced Smartspace card.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_OVERLAY_CONNECTION_OPTIM = getDebugFlag(270392629,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_OVERLAY_CONNECTION_OPTIM", DISABLED,
|
2022-10-21 14:06:49 -07:00
|
|
|
"Enable optimizing overlay service connection");
|
|
|
|
|
|
2022-07-22 01:13:46 +00:00
|
|
|
/**
|
|
|
|
|
* Enables region sampling for text color: Needs system health assessment before turning on
|
|
|
|
|
*/
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_REGION_SAMPLING = getDebugFlag(270391669,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_REGION_SAMPLING", DISABLED,
|
2022-07-22 01:13:46 +00:00
|
|
|
"Enable region sampling to determine color of text on screen.");
|
|
|
|
|
|
2020-02-12 14:40:05 -08:00
|
|
|
public static final BooleanFlag ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS =
|
2023-03-20 15:56:07 -07:00
|
|
|
getDebugFlag(270393096, "ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS",
|
|
|
|
|
DISABLED, "Always use hardware optimization for folder animations.");
|
2020-02-12 14:40:05 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag SEPARATE_RECENTS_ACTIVITY = getDebugFlag(270392980,
|
2023-03-20 15:56:07 -07:00
|
|
|
"SEPARATE_RECENTS_ACTIVITY", DISABLED,
|
2020-05-20 20:34:04 -07:00
|
|
|
"Uses a separate recents activity instead of using the integrated recents+Launcher UI");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_MINIMAL_DEVICE = getDebugFlag(270392984,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_MINIMAL_DEVICE", DISABLED,
|
2020-07-16 11:58:00 -07:00
|
|
|
"Allow user to toggle minimal device mode in launcher.");
|
|
|
|
|
|
2023-03-20 15:56:07 -07:00
|
|
|
public static final BooleanFlag ENABLE_TASKBAR_POPUP_MENU = getDebugFlag(270392477,
|
|
|
|
|
"ENABLE_TASKBAR_POPUP_MENU", ENABLED,
|
2023-02-24 09:27:04 -08:00
|
|
|
"Enables long pressing taskbar icons to show the popup menu.");
|
2021-10-12 12:38:55 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TWO_PANEL_HOME = getDebugFlag(270392643,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TWO_PANEL_HOME", ENABLED,
|
2021-02-11 23:51:19 +01:00
|
|
|
"Uses two panel on home screen. Only applicable on large screen devices.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SCRIM_FOR_APP_LAUNCH = getDebugFlag(270393276,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_SCRIM_FOR_APP_LAUNCH", DISABLED, "Enables scrim during app launch animation.");
|
2021-06-15 18:07:26 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ENFORCED_ROUNDED_CORNERS = getReleaseFlag(270393258,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ENFORCED_ROUNDED_CORNERS", ENABLED,
|
|
|
|
|
"Enforce rounded corners on all App Widgets");
|
2021-03-18 08:49:47 +00:00
|
|
|
|
2023-03-20 15:56:07 -07:00
|
|
|
public static final BooleanFlag NOTIFY_CRASHES = getDebugFlag(270393108, "NOTIFY_CRASHES",
|
|
|
|
|
DISABLED, "Sends a notification whenever launcher encounters an uncaught exception.");
|
2021-03-29 16:45:59 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_WALLPAPER_SCRIM = getDebugFlag(270393604,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_WALLPAPER_SCRIM", DISABLED,
|
2021-05-06 15:09:15 +08:00
|
|
|
"Enables scrim over wallpaper for text protection.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag WIDGETS_IN_LAUNCHER_PREVIEW = getDebugFlag(270393268,
|
2023-03-20 15:56:07 -07:00
|
|
|
"WIDGETS_IN_LAUNCHER_PREVIEW", ENABLED,
|
2021-06-10 17:54:57 -04:00
|
|
|
"Enables widgets in Launcher preview for the Wallpaper app.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag QUICK_WALLPAPER_PICKER = getDebugFlag(270393112,
|
2023-03-20 15:56:07 -07:00
|
|
|
"QUICK_WALLPAPER_PICKER", ENABLED, "Shows quick wallpaper picker in long-press menu");
|
2021-05-14 14:24:09 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_BACK_SWIPE_HOME_ANIMATION = getDebugFlag(270393426,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_BACK_SWIPE_HOME_ANIMATION", ENABLED,
|
2021-09-01 14:26:00 -07:00
|
|
|
"Enables home animation to icon when user swipes back.");
|
|
|
|
|
|
2023-02-27 23:53:17 +00:00
|
|
|
public static final BooleanFlag ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION = getDebugFlag(270614790,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION", DISABLED,
|
2023-02-27 23:53:17 +00:00
|
|
|
"Enables predictive back aniamtion from all apps and widgets to home");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ICON_LABEL_AUTO_SCALING = getDebugFlag(270393294,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ICON_LABEL_AUTO_SCALING", ENABLED,
|
2021-10-04 15:31:38 -07:00
|
|
|
"Enables scaling/spacing for icon labels to make more characters visible");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT = getDebugFlag(270393897,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT", DISABLED,
|
2022-05-11 10:27:30 -07:00
|
|
|
"Enables displaying the all apps button in the hotseat.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ALL_APPS_ONE_SEARCH_IN_TASKBAR = getDebugFlag(270393900,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ALL_APPS_ONE_SEARCH_IN_TASKBAR", DISABLED,
|
2022-02-28 14:08:22 -08:00
|
|
|
"Enables One Search box in Taskbar All Apps.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SPLIT_FROM_WORKSPACE = getDebugFlag(270393906,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_SPLIT_FROM_WORKSPACE", ENABLED,
|
2022-01-28 11:18:40 -08:00
|
|
|
"Enable initiating split screen from workspace.");
|
|
|
|
|
|
2022-10-14 01:28:07 -07:00
|
|
|
public static final BooleanFlag ENABLE_SPLIT_FROM_FULLSCREEN_WITH_KEYBOARD_SHORTCUTS =
|
2023-03-20 15:56:07 -07:00
|
|
|
getDebugFlag(270394122, "ENABLE_SPLIT_FROM_FULLSCREEN_SHORTCUT", ENABLED,
|
|
|
|
|
"Enable splitting from fullscreen app with keyboard shortcuts");
|
2022-10-14 01:28:07 -07:00
|
|
|
|
2022-10-09 23:39:24 -07:00
|
|
|
public static final BooleanFlag ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE = getDebugFlag(
|
2023-03-20 15:56:07 -07:00
|
|
|
270393453, "ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE", DISABLED,
|
2022-10-09 23:39:24 -07:00
|
|
|
"Enable initiating split screen from workspace to workspace.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_NEW_MIGRATION_LOGIC = getDebugFlag(270393455,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_NEW_MIGRATION_LOGIC", ENABLED,
|
2022-02-10 13:45:02 +00:00
|
|
|
"Enable the new grid migration logic, keeping pages when src < dest");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_WIDGET_HOST_IN_BACKGROUND = getDebugFlag(270394384,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_WIDGET_HOST_IN_BACKGROUND", ENABLED,
|
2022-11-21 14:17:50 -08:00
|
|
|
"Enable background widget updates listening for widget holder");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = getReleaseFlag(270394223,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ONE_SEARCH_MOTION", ENABLED, "Enables animations in OneSearch.");
|
2022-03-21 17:56:01 +00:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SEARCH_RESULT_BACKGROUND_DRAWABLES = getReleaseFlag(
|
2023-03-20 15:56:07 -07:00
|
|
|
270394041, "ENABLE_SEARCH_RESULT_BACKGROUND_DRAWABLES", DISABLED,
|
2022-09-21 14:10:28 +00:00
|
|
|
"Enable option to replace decorator-based search result backgrounds with drawables");
|
2022-03-21 17:56:01 +00:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SEARCH_RESULT_LAUNCH_TRANSITION = getReleaseFlag(
|
2023-03-20 15:56:07 -07:00
|
|
|
270394392, "ENABLE_SEARCH_RESULT_LAUNCH_TRANSITION", DISABLED,
|
2023-01-03 14:19:48 +00:00
|
|
|
"Enable option to launch search results using the new view container transitions");
|
2023-01-03 14:19:19 +00:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SHOW_KEYBOARD_OPTION_IN_ALL_APPS = getReleaseFlag(
|
2023-03-20 15:56:07 -07:00
|
|
|
270394468, "ENABLE_SHOW_KEYBOARD_OPTION_IN_ALL_APPS", ENABLED,
|
2022-05-06 15:15:39 -07:00
|
|
|
"Enable option to show keyboard when going to all-apps");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag USE_LOCAL_ICON_OVERRIDES = getDebugFlag(270394973,
|
2023-03-20 15:56:07 -07:00
|
|
|
"USE_LOCAL_ICON_OVERRIDES", ENABLED,
|
2022-03-23 15:30:38 -07:00
|
|
|
"Use inbuilt monochrome icons if app doesn't provide one");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DISMISS_PREDICTION_UNDO = getDebugFlag(270394476,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_DISMISS_PREDICTION_UNDO", DISABLED,
|
2022-03-30 17:46:09 +00:00
|
|
|
"Show an 'Undo' snackbar when users dismiss a predicted hotseat item");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_CACHED_WIDGET = getDebugFlag(270395008,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_CACHED_WIDGET", ENABLED,
|
2022-06-08 15:00:20 -07:00
|
|
|
"Show previously cached widgets as opposed to deferred widget where available");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES = getDebugFlag(270395010,
|
2023-03-20 15:56:07 -07:00
|
|
|
"USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES", DISABLED,
|
2022-07-06 11:16:00 -07:00
|
|
|
"Use local overrides for search request timeout");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag CONTINUOUS_VIEW_TREE_CAPTURE = getDebugFlag(270395171,
|
2023-03-20 15:56:07 -07:00
|
|
|
"CONTINUOUS_VIEW_TREE_CAPTURE", ENABLED, "Capture View tree every frame");
|
2022-07-06 15:39:50 -07:00
|
|
|
|
2023-03-20 15:56:07 -07:00
|
|
|
public static final BooleanFlag SECONDARY_DRAG_N_DROP_TO_PIN = getDebugFlag(270395140,
|
|
|
|
|
"SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED,
|
2022-07-11 14:51:59 -07:00
|
|
|
"Enable dragging and dropping to pin apps within secondary display");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag FOLDABLE_WORKSPACE_REORDER = getDebugFlag(270395070,
|
2023-03-20 15:56:07 -07:00
|
|
|
"FOLDABLE_WORKSPACE_REORDER", DISABLED,
|
2022-08-24 14:33:27 -07:00
|
|
|
"In foldables, when reordering the icons and widgets, is now going to use both sides");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_MULTI_DISPLAY_PARTIAL_DEPTH = getDebugFlag(270395073,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_MULTI_DISPLAY_PARTIAL_DEPTH", DISABLED,
|
2022-12-13 17:46:06 +00:00
|
|
|
"Allow bottom sheet depth to be smaller than 1 for multi-display devices.");
|
|
|
|
|
|
2023-03-20 15:56:07 -07:00
|
|
|
public static final BooleanFlag SCROLL_TOP_TO_RESET = getReleaseFlag(270395177,
|
|
|
|
|
"SCROLL_TOP_TO_RESET", ENABLED,
|
2023-02-24 09:27:04 -08:00
|
|
|
"Bring up IME and focus on input when scroll to top if 'Always show keyboard'"
|
|
|
|
|
+ " is enabled or in prefix state");
|
2022-10-03 16:56:26 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_MATERIAL_U_POPUP = getDebugFlag(270395516,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_MATERIAL_U_POPUP", ENABLED, "Switch popup UX to use material U");
|
2022-09-20 18:02:41 -05:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_SEARCH_UNINSTALLED_APPS = getReleaseFlag(270395269,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_SEARCH_UNINSTALLED_APPS", DISABLED, "Search uninstalled app results.");
|
2023-01-27 16:55:13 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag SHOW_HOME_GARDENING = getDebugFlag(270395183,
|
2023-03-20 15:56:07 -07:00
|
|
|
"SHOW_HOME_GARDENING", DISABLED, "Show the new home gardening mode");
|
2022-10-05 14:51:37 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag HOME_GARDENING_WORKSPACE_BUTTONS = getDebugFlag(270395133,
|
2023-03-20 15:56:07 -07:00
|
|
|
"HOME_GARDENING_WORKSPACE_BUTTONS", DISABLED,
|
2022-10-25 10:38:25 -07:00
|
|
|
"Change workspace edit buttons to reflect home gardening");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DOWNLOAD_APP_UX_V2 = getReleaseFlag(270395134,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_DOWNLOAD_APP_UX_V2", ENABLED, "Updates the download app UX"
|
2022-11-21 13:28:32 -08:00
|
|
|
+ " to have better visuals");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_DOWNLOAD_APP_UX_V3 = getDebugFlag(270395186,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_DOWNLOAD_APP_UX_V3", DISABLED, "Updates the download app UX"
|
2023-02-24 09:27:04 -08:00
|
|
|
+ " to have better visuals, improve contrast, and color");
|
2023-01-31 01:05:10 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag FORCE_PERSISTENT_TASKBAR = getDebugFlag(270395077,
|
2023-03-20 15:56:07 -07:00
|
|
|
"FORCE_PERSISTENT_TASKBAR", DISABLED, "Forces taskbar to be persistent, even in gesture"
|
2022-12-02 23:52:40 +00:00
|
|
|
+ " nav mode and when transient taskbar is enabled.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag FOLDABLE_SINGLE_PAGE = getDebugFlag(270395274,
|
2023-03-20 15:56:07 -07:00
|
|
|
"FOLDABLE_SINGLE_PAGE", ENABLED, "Use a single page for the workspace");
|
2022-12-09 11:44:58 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TRANSIENT_TASKBAR = getDebugFlag(270395798,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TRANSIENT_TASKBAR", ENABLED, "Enables transient taskbar.");
|
2022-10-10 18:45:23 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TRACKPAD_GESTURE = getDebugFlag(271010401,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TRACKPAD_GESTURE", ENABLED, "Enables trackpad gesture.");
|
2022-10-20 00:37:33 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_ICON_IN_TEXT_HEADER = getDebugFlag(270395143,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_ICON_IN_TEXT_HEADER", DISABLED, "Show icon in textheader");
|
2023-01-24 12:30:54 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_APP_ICON_FOR_INLINE_SHORTCUTS = getDebugFlag(270395087,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_APP_ICON_IN_INLINE_SHORTCUTS", DISABLED, "Show app icon for inline shortcut");
|
2023-02-13 21:42:35 +00:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag SHOW_DOT_PAGINATION = getDebugFlag(270395278,
|
2023-03-20 15:56:07 -07:00
|
|
|
"SHOW_DOT_PAGINATION", ENABLED, "Enable showing dot pagination in workspace");
|
2022-10-21 08:49:01 -07:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag LARGE_SCREEN_WIDGET_PICKER = getDebugFlag(270395809,
|
2023-03-20 15:56:07 -07:00
|
|
|
"LARGE_SCREEN_WIDGET_PICKER", ENABLED, "Enable new widget picker that takes "
|
2022-11-01 11:31:57 -07:00
|
|
|
+ "advantage of large screen format");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_NEW_GESTURE_NAV_TUTORIAL = getDebugFlag(270396257,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_NEW_GESTURE_NAV_TUTORIAL", ENABLED,
|
2022-11-14 22:38:21 +00:00
|
|
|
"Enable the redesigned gesture navigation tutorial");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_LAUNCH_FROM_STAGED_APP = getDebugFlag(270395567,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_LAUNCH_FROM_STAGED_APP", ENABLED,
|
|
|
|
|
"Enable the ability to tap a staged app during split select to launch it in full "
|
|
|
|
|
+ "screen");
|
2023-02-22 11:16:17 -08:00
|
|
|
|
2023-03-07 19:51:09 -08:00
|
|
|
public static final BooleanFlag ENABLE_PREMIUM_HAPTICS_ALL_APPS = getDebugFlag(270396358,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_PREMIUM_HAPTICS_ALL_APPS", DISABLED,
|
2023-03-07 19:51:09 -08:00
|
|
|
"Enables haptics opening/closing All apps");
|
2022-11-09 18:26:06 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_FORCED_MONO_ICON = getDebugFlag(270396209,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_FORCED_MONO_ICON", DISABLED,
|
|
|
|
|
"Enable the ability to generate monochromatic icons, if it is not provided by the app");
|
2022-12-06 13:33:01 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TASKBAR_EDU_TOOLTIP = getDebugFlag(270396268,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TASKBAR_EDU_TOOLTIP", ENABLED,
|
2022-12-19 20:47:21 +00:00
|
|
|
"Enable the tooltip version of the Taskbar education flow.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_MULTI_INSTANCE = getDebugFlag(270396680,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_MULTI_INSTANCE", DISABLED,
|
2022-10-20 06:56:25 +00:00
|
|
|
"Enables creation and filtering of multiple task instances in overview");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_TASKBAR_PINNING = getDebugFlag(270396583,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_TASKBAR_PINNING", DISABLED,
|
2023-01-12 10:20:17 -08:00
|
|
|
"Enables taskbar pinning to allow user to switch between transient and persistent "
|
|
|
|
|
+ "taskbar flavors");
|
|
|
|
|
|
2023-02-22 23:43:33 +00:00
|
|
|
public static final BooleanFlag ENABLE_WORKSPACE_LOADING_OPTIMIZATION = getDebugFlag(251502424,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_WORKSPACE_LOADING_OPTIMIZATION", DISABLED,
|
|
|
|
|
"load the current workspace screen visible to the user before the rest rather than "
|
|
|
|
|
+ "loading all of them at once.");
|
2023-02-22 23:43:33 +00:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_GRID_ONLY_OVERVIEW = getDebugFlag(270397206,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_GRID_ONLY_OVERVIEW", DISABLED,
|
2023-01-18 14:48:30 +00:00
|
|
|
"Enable a grid-only overview without a focused task.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag RECEIVE_UNFOLD_EVENTS_FROM_SYSUI = getDebugFlag(270397209,
|
2023-03-20 15:56:07 -07:00
|
|
|
"RECEIVE_UNFOLD_EVENTS_FROM_SYSUI", ENABLED,
|
2023-02-06 18:38:50 +00:00
|
|
|
"Enables receiving unfold animation events from sysui instead of calculating "
|
|
|
|
|
+ "them in launcher process using hinge sensor values.");
|
|
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public static final BooleanFlag ENABLE_KEYBOARD_QUICK_SWITCH = getDebugFlag(270396844,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_KEYBOARD_QUICK_SWITCH", ENABLED, "Enables keyboard quick switching");
|
2023-01-24 15:05:08 -08:00
|
|
|
|
2023-01-20 09:19:29 +00:00
|
|
|
public static final BooleanFlag ENABLE_APP_CLONING_CHANGES_IN_LAUNCHER = getDebugFlag(266177840,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_APP_CLONING_CHANGES_IN_LAUNCHER", DISABLED,
|
2023-01-20 09:19:29 +00:00
|
|
|
"Removes clone apps from the work profile tab.");
|
|
|
|
|
|
2023-03-28 09:43:49 -07:00
|
|
|
public static final BooleanFlag ENABLE_APP_PAIRS = getDebugFlag(274189428,
|
2023-03-20 15:56:07 -07:00
|
|
|
"ENABLE_APP_PAIRS", DISABLED,
|
2023-03-28 09:43:49 -07:00
|
|
|
"Enables the ability to create and save app pairs on the Home screen for easy"
|
|
|
|
|
+ " split screen launching.");
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static class BooleanFlag {
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
private final boolean mCurrentValue;
|
2020-01-21 11:59:19 -08:00
|
|
|
|
2023-02-24 09:27:04 -08:00
|
|
|
public BooleanFlag(boolean currentValue) {
|
|
|
|
|
mCurrentValue = currentValue;
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public boolean get() {
|
2023-03-02 16:49:59 -08:00
|
|
|
return sBooleanReader.test(this);
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
2020-01-21 11:59:19 -08:00
|
|
|
}
|
2023-02-28 12:00:27 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class representing an integer flag
|
|
|
|
|
*/
|
|
|
|
|
public static class IntFlag {
|
|
|
|
|
|
|
|
|
|
private final int mCurrentValue;
|
|
|
|
|
|
|
|
|
|
public IntFlag(int currentValue) {
|
|
|
|
|
mCurrentValue = currentValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int get() {
|
2023-03-02 16:49:59 -08:00
|
|
|
return sIntReader.applyAsInt(this);
|
2023-02-28 12:00:27 -08:00
|
|
|
}
|
|
|
|
|
}
|
2023-03-20 15:56:07 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enabled state for a flag
|
|
|
|
|
*/
|
|
|
|
|
public enum FlagState {
|
|
|
|
|
ENABLED,
|
|
|
|
|
DISABLED,
|
|
|
|
|
TEAMFOOD // Enabled in team food
|
|
|
|
|
}
|
2017-07-24 01:02:38 -07:00
|
|
|
}
|