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;
|
|
|
|
|
|
2018-10-12 14:14:16 -04:00
|
|
|
import android.content.Context;
|
|
|
|
|
|
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;
|
2020-01-21 11:59:19 -08:00
|
|
|
import com.android.launcher3.uioverrides.DeviceFlag;
|
2019-08-26 14:36:02 -07:00
|
|
|
|
2020-02-12 16:17:28 -08:00
|
|
|
import java.io.PrintWriter;
|
2018-10-12 14:14:16 -04:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
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
|
|
|
private static final List<DebugFlag> sDebugFlags = new ArrayList<>();
|
2018-10-12 14:14:16 -04: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
|
|
|
|
2019-09-11 16:51:50 -07: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) {
|
2019-05-15 14:01:30 -07:00
|
|
|
return Utilities.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.
|
|
|
|
|
*/
|
|
|
|
|
public static final boolean IS_STUDIO_BUILD = BuildConfig.DEBUG;
|
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.
|
|
|
|
|
*/
|
|
|
|
|
public static final boolean QSB_ON_FIRST_SCREEN = true;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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"),
|
2019-09-11 16:51:50 -07:00
|
|
|
* and set a default value for the flag. This will be the default value on Debug builds.
|
|
|
|
|
*/
|
2017-07-24 01:02:38 -07:00
|
|
|
// When enabled the promise icon is visible in all apps while installation an app.
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag PROMISE_APPS_IN_ALL_APPS = getDebugFlag(
|
2019-09-11 16:51:50 -07:00
|
|
|
"PROMISE_APPS_IN_ALL_APPS", false, "Add promise icon in all-apps");
|
2017-07-24 01:02:38 -07:00
|
|
|
|
2019-08-19 13:32:09 -07:00
|
|
|
// When enabled a promise icon is added to the home screen when install session is active.
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag PROMISE_APPS_NEW_INSTALLS = getDebugFlag(
|
|
|
|
|
"PROMISE_APPS_NEW_INSTALLS", true,
|
|
|
|
|
"Adds a promise icon to the home screen for new install sessions.");
|
2019-08-19 13:32:09 -07:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag APPLY_CONFIG_AT_RUNTIME = getDebugFlag(
|
2018-12-04 15:43:16 -08:00
|
|
|
"APPLY_CONFIG_AT_RUNTIME", true, "Apply display changes dynamically");
|
2018-10-12 11:42:33 -07:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag QUICKSTEP_SPRINGS = getDebugFlag(
|
|
|
|
|
"QUICKSTEP_SPRINGS", true, "Enable springs for quickstep animations");
|
2020-01-07 11:22:51 -08:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag UNSTABLE_SPRINGS = getDebugFlag(
|
|
|
|
|
"UNSTABLE_SPRINGS", false, "Enable unstable springs for quickstep animations");
|
2019-01-08 16:01:57 -08:00
|
|
|
|
2020-03-17 14:24:42 -07:00
|
|
|
public static final BooleanFlag KEYGUARD_ANIMATION = getDebugFlag(
|
|
|
|
|
"KEYGUARD_ANIMATION", false, "Enable animation for keyguard going away on wallpaper");
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ADAPTIVE_ICON_WINDOW_ANIM = getDebugFlag(
|
|
|
|
|
"ADAPTIVE_ICON_WINDOW_ANIM", true, "Use adaptive icons for window animations.");
|
2019-02-19 15:34:41 -08:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ENABLE_QUICKSTEP_LIVE_TILE = getDebugFlag(
|
2018-10-29 16:08:29 -04:00
|
|
|
"ENABLE_QUICKSTEP_LIVE_TILE", false, "Enable live tile in Quickstep overview");
|
|
|
|
|
|
2020-05-05 14:26:57 -07:00
|
|
|
// Keep as DeviceFlag to allow remote disable in emergency.
|
2020-04-03 10:56:59 -07:00
|
|
|
public static final BooleanFlag ENABLE_SUGGESTED_ACTIONS_OVERVIEW = new DeviceFlag(
|
2020-07-31 15:54:36 -07:00
|
|
|
"ENABLE_SUGGESTED_ACTIONS_OVERVIEW", true, "Show chip hints on the overview screen");
|
2019-02-11 13:07:04 -05:00
|
|
|
|
2020-07-17 11:18:25 -07:00
|
|
|
|
|
|
|
|
public static final BooleanFlag ENABLE_DEVICE_SEARCH = getDebugFlag(
|
|
|
|
|
"ENABLE_DEVICE_SEARCH", false, "Allows on device search in all apps");
|
|
|
|
|
|
2021-01-13 11:05:12 -06:00
|
|
|
public static final BooleanFlag USE_SEARCH_API = getDebugFlag(
|
|
|
|
|
"USE_SEARCH_API", true, "Use SearchUIManager api for device search");
|
2021-01-12 20:39:46 -06:00
|
|
|
|
2020-12-22 15:20:14 -08:00
|
|
|
public static final BooleanFlag DISABLE_INITIAL_IME_IN_ALLAPPS = getDebugFlag(
|
|
|
|
|
"DISABLE_INITIAL_IME_IN_ALLAPPS", false, "Disable default IME state in all apps");
|
|
|
|
|
|
2020-03-07 23:52:17 -08:00
|
|
|
public static final BooleanFlag FOLDER_NAME_SUGGEST = new DeviceFlag(
|
|
|
|
|
"FOLDER_NAME_SUGGEST", true,
|
|
|
|
|
"Suggests folder names instead of blank text.");
|
2019-10-10 23:11:12 -07:00
|
|
|
|
2020-06-08 01:19:15 -07:00
|
|
|
public static final BooleanFlag FOLDER_NAME_MAJORITY_RANKING = getDebugFlag(
|
|
|
|
|
"FOLDER_NAME_MAJORITY_RANKING", true,
|
|
|
|
|
"Suggests folder names based on majority based ranking.");
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag APP_SEARCH_IMPROVEMENTS = new DeviceFlag(
|
2020-03-16 11:04:46 -07:00
|
|
|
"APP_SEARCH_IMPROVEMENTS", true,
|
2019-08-08 12:22:26 -07:00
|
|
|
"Adds localized title and keyword search and ranking");
|
|
|
|
|
|
2020-03-16 15:18:56 -07:00
|
|
|
public static final BooleanFlag ENABLE_PREDICTION_DISMISS = getDebugFlag(
|
2020-05-29 16:07:05 -07:00
|
|
|
"ENABLE_PREDICTION_DISMISS", true, "Allow option to dimiss apps from predicted list");
|
2019-08-09 16:16:06 -07:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ENABLE_QUICK_CAPTURE_GESTURE = getDebugFlag(
|
2019-12-20 14:24:10 -05:00
|
|
|
"ENABLE_QUICK_CAPTURE_GESTURE", true, "Swipe from right to left to quick capture");
|
2019-08-09 16:16:06 -07:00
|
|
|
|
2020-05-12 12:06:55 -04:00
|
|
|
public static final BooleanFlag ENABLE_QUICK_CAPTURE_WINDOW = getDebugFlag(
|
|
|
|
|
"ENABLE_QUICK_CAPTURE_WINDOW", false, "Use window to host quick capture");
|
|
|
|
|
|
2020-03-03 17:20:42 -05:00
|
|
|
public static final BooleanFlag FORCE_LOCAL_OVERSCROLL_PLUGIN = getDebugFlag(
|
|
|
|
|
"FORCE_LOCAL_OVERSCROLL_PLUGIN", false,
|
|
|
|
|
"Use a launcher-provided OverscrollPlugin if available");
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ASSISTANT_GIVES_LAUNCHER_FOCUS = getDebugFlag(
|
2019-10-17 11:59:53 -07:00
|
|
|
"ASSISTANT_GIVES_LAUNCHER_FOCUS", false,
|
|
|
|
|
"Allow Launcher to handle nav bar gestures while Assistant is running over it");
|
|
|
|
|
|
2020-04-30 09:30:56 -07:00
|
|
|
public static final BooleanFlag ENABLE_HYBRID_HOTSEAT = getDebugFlag(
|
|
|
|
|
"ENABLE_HYBRID_HOTSEAT", true, "Fill gaps in hotseat with predicted apps");
|
2019-10-21 02:02:40 -07:00
|
|
|
|
2020-06-18 15:07:03 -07:00
|
|
|
public static final BooleanFlag HOTSEAT_MIGRATE_TO_FOLDER = getDebugFlag(
|
2020-03-09 18:24:47 -07:00
|
|
|
"HOTSEAT_MIGRATE_TO_FOLDER", false, "Should move hotseat items into a folder");
|
2020-02-25 18:47:54 -08:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ENABLE_DEEP_SHORTCUT_ICON_CACHE = getDebugFlag(
|
2019-10-23 17:47:28 +00:00
|
|
|
"ENABLE_DEEP_SHORTCUT_ICON_CACHE", true, "R/W deep shortcut in IconCache");
|
|
|
|
|
|
2020-01-27 13:44:06 -08:00
|
|
|
public static final BooleanFlag MULTI_DB_GRID_MIRATION_ALGO = getDebugFlag(
|
2020-04-15 14:46:03 -07:00
|
|
|
"MULTI_DB_GRID_MIRATION_ALGO", true, "Use the multi-db grid migration algorithm");
|
2020-01-27 13:44:06 -08:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER = getDebugFlag(
|
2020-03-06 16:22:50 -08:00
|
|
|
"ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER", true, "Show launcher preview in grid picker");
|
|
|
|
|
|
2020-05-05 14:26:57 -07:00
|
|
|
// Keep as DeviceFlag for remote disable in emergency.
|
|
|
|
|
public static final BooleanFlag ENABLE_OVERVIEW_SELECTIONS = new DeviceFlag(
|
|
|
|
|
"ENABLE_OVERVIEW_SELECTIONS", true, "Show Select Mode button in Overview Actions");
|
2020-03-16 16:38:22 -07:00
|
|
|
|
2020-05-23 16:02:44 -07:00
|
|
|
public static final BooleanFlag ENABLE_OVERVIEW_SHARE = getDebugFlag(
|
|
|
|
|
"ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions");
|
|
|
|
|
|
2021-01-05 13:28:28 -08:00
|
|
|
public static final BooleanFlag ENABLE_OVERVIEW_SHARING_TO_PEOPLE = getDebugFlag(
|
|
|
|
|
"ENABLE_OVERVIEW_SHARING_TO_PEOPLE", false,
|
|
|
|
|
"Show indicators for content on Overview to share with top people. ");
|
|
|
|
|
|
2020-09-09 16:36:35 -07:00
|
|
|
public static final BooleanFlag ENABLE_OVERVIEW_CONTENT_PUSH = getDebugFlag(
|
|
|
|
|
"ENABLE_OVERVIEW_CONTENT_PUSH", false, "Show Content Push button in Overview Actions");
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag(
|
2020-12-04 15:12:26 -08:00
|
|
|
"ENABLE_DATABASE_RESTORE", false,
|
2019-12-10 14:56:34 -08:00
|
|
|
"Enable database restore when new restore session is created");
|
|
|
|
|
|
2020-10-07 14:27:17 -07:00
|
|
|
public static final BooleanFlag ENABLE_SMARTSPACE_UNIVERSAL = getDebugFlag(
|
|
|
|
|
"ENABLE_SMARTSPACE_UNIVERSAL", false,
|
2020-01-17 12:01:26 -08:00
|
|
|
"Replace Smartspace with a version rendered by System UI.");
|
|
|
|
|
|
2020-11-23 11:15:12 +00:00
|
|
|
public static final BooleanFlag ENABLE_SMARTSPACE_ENHANCED = getDebugFlag(
|
|
|
|
|
"ENABLE_SMARTSPACE_ENHANCED", false,
|
|
|
|
|
"Replace Smartspace with the enhanced version. "
|
|
|
|
|
+ "Ignored if ENABLE_SMARTSPACE_UNIVERSAL is enabled.");
|
2020-10-07 14:27:17 -07:00
|
|
|
|
2020-08-12 18:05:42 -07:00
|
|
|
public static final BooleanFlag ENABLE_SYSTEM_VELOCITY_PROVIDER = getDebugFlag(
|
|
|
|
|
"ENABLE_SYSTEM_VELOCITY_PROVIDER", true,
|
|
|
|
|
"Use system VelocityTracker's algorithm for motion pause detection.");
|
2020-02-20 12:03:39 -08:00
|
|
|
|
2020-02-12 14:40:05 -08:00
|
|
|
public static final BooleanFlag ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS =
|
|
|
|
|
getDebugFlag(
|
|
|
|
|
"ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS", false,
|
|
|
|
|
"Always use hardware optimization for folder animations.");
|
|
|
|
|
|
2020-05-19 14:04:59 -07:00
|
|
|
public static final BooleanFlag ENABLE_ALL_APPS_EDU = getDebugFlag(
|
|
|
|
|
"ENABLE_ALL_APPS_EDU", true,
|
|
|
|
|
"Shows user a tutorial on how to get to All Apps after X amount of attempts.");
|
|
|
|
|
|
2020-05-20 20:34:04 -07:00
|
|
|
public static final BooleanFlag SEPARATE_RECENTS_ACTIVITY = getDebugFlag(
|
|
|
|
|
"SEPARATE_RECENTS_ACTIVITY", false,
|
|
|
|
|
"Uses a separate recents activity instead of using the integrated recents+Launcher UI");
|
|
|
|
|
|
2020-09-17 10:37:35 -07:00
|
|
|
public static final BooleanFlag ENABLE_MINIMAL_DEVICE = getDebugFlag(
|
2020-10-22 16:07:08 -07:00
|
|
|
"ENABLE_MINIMAL_DEVICE", false,
|
2020-07-16 11:58:00 -07:00
|
|
|
"Allow user to toggle minimal device mode in launcher.");
|
|
|
|
|
|
2020-07-24 21:13:24 -07:00
|
|
|
public static final BooleanFlag EXPANDED_SMARTSPACE = new DeviceFlag(
|
|
|
|
|
"EXPANDED_SMARTSPACE", false, "Expands smartspace height to two rows. "
|
|
|
|
|
+ "Any apps occupying the first row will be removed from workspace.");
|
|
|
|
|
|
2020-12-11 14:14:46 -08:00
|
|
|
public static final BooleanFlag ENABLE_FOUR_COLUMNS = new DeviceFlag(
|
|
|
|
|
"ENABLE_FOUR_COLUMNS", false, "Uses 4 columns in launcher grid."
|
|
|
|
|
+ "Warning: This will permanently alter your home screen items and is not reversible.");
|
|
|
|
|
|
2020-12-15 10:47:44 -05:00
|
|
|
// TODO: b/172467144 Remove ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE feature flag.
|
|
|
|
|
public static final BooleanFlag ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE = new DeviceFlag(
|
|
|
|
|
"ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE", false, "Enables a "
|
|
|
|
|
+ "crossfade animation when the system these changes.");
|
|
|
|
|
|
|
|
|
|
// TODO: b/174174514 Remove ENABLE_APP_PREDICTIONS_WHILE_VISIBLE feature flag.
|
|
|
|
|
public static final BooleanFlag ENABLE_APP_PREDICTIONS_WHILE_VISIBLE = new DeviceFlag(
|
|
|
|
|
"ENABLE_APP_PREDICTIONS_WHILE_VISIBLE", true, "Allows app "
|
|
|
|
|
+ "predictions to be updated while they are visible to the user.");
|
|
|
|
|
|
2020-12-22 12:40:09 -06:00
|
|
|
public static final BooleanFlag ENABLE_TASKBAR = new DeviceFlag(
|
|
|
|
|
"ENABLE_TASKBAR", false, "Allows a system Taskbar to be shown on larger devices.");
|
|
|
|
|
|
2018-10-12 14:14:16 -04:00
|
|
|
public static void initialize(Context context) {
|
2020-01-21 11:59:19 -08:00
|
|
|
synchronized (sDebugFlags) {
|
|
|
|
|
for (DebugFlag flag : sDebugFlags) {
|
|
|
|
|
flag.initialize(context);
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
sDebugFlags.sort((f1, f2) -> f1.key.compareToIgnoreCase(f2.key));
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
static List<DebugFlag> getDebugFlags() {
|
|
|
|
|
synchronized (sDebugFlags) {
|
|
|
|
|
return new ArrayList<>(sDebugFlags);
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-12 16:17:28 -08:00
|
|
|
public static void dump(PrintWriter pw) {
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
pw.println("DeviceFlags:");
|
2020-02-12 16:17:28 -08:00
|
|
|
synchronized (sDebugFlags) {
|
|
|
|
|
for (DebugFlag flag : sDebugFlags) {
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
if (flag instanceof DeviceFlag) {
|
|
|
|
|
pw.println(" " + flag.toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
pw.println("DebugFlags:");
|
|
|
|
|
synchronized (sDebugFlags) {
|
|
|
|
|
for (DebugFlag flag : sDebugFlags) {
|
|
|
|
|
if (!(flag instanceof DeviceFlag)) {
|
|
|
|
|
pw.println(" " + flag.toString());
|
|
|
|
|
}
|
2020-02-12 16:17:28 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static class BooleanFlag {
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public final String key;
|
|
|
|
|
public boolean defaultValue;
|
2018-11-08 11:30:14 -05:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public BooleanFlag(String key, boolean defaultValue) {
|
|
|
|
|
this.key = key;
|
|
|
|
|
this.defaultValue = defaultValue;
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
2019-08-13 15:57:15 -07:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public boolean get() {
|
|
|
|
|
return defaultValue;
|
2018-11-04 11:39:08 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
return appendProps(new StringBuilder()).toString();
|
2018-11-04 11:39:08 -05:00
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
protected StringBuilder appendProps(StringBuilder src) {
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
return src.append(key).append(", defaultValue=").append(defaultValue);
|
2018-11-04 11:39:08 -05:00
|
|
|
}
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public void addChangeListener(Context context, Runnable r) { }
|
|
|
|
|
}
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public static class DebugFlag extends BooleanFlag {
|
2018-10-12 14:14:16 -04:00
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public final String description;
|
|
|
|
|
private boolean mCurrentValue;
|
|
|
|
|
|
|
|
|
|
public DebugFlag(String key, boolean defaultValue, String description) {
|
|
|
|
|
super(key, defaultValue);
|
|
|
|
|
this.description = description;
|
|
|
|
|
mCurrentValue = this.defaultValue;
|
|
|
|
|
synchronized (sDebugFlags) {
|
|
|
|
|
sDebugFlags.add(this);
|
|
|
|
|
}
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2020-01-21 11:59:19 -08:00
|
|
|
public boolean get() {
|
|
|
|
|
return mCurrentValue;
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
|
2020-01-21 11:59:19 -08:00
|
|
|
public void initialize(Context context) {
|
|
|
|
|
mCurrentValue = context.getSharedPreferences(FLAGS_PREF_NAME, Context.MODE_PRIVATE)
|
|
|
|
|
.getBoolean(key, defaultValue);
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2020-01-21 11:59:19 -08:00
|
|
|
protected StringBuilder appendProps(StringBuilder src) {
|
add FeatureFlag type to the dump / also sort them
Bug: 152660449
$ adb shell dumpsys activity service com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
SERVICE com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService d4107aa pid=27740
Client:
DeviceFlags:
APP_SEARCH_IMPROVEMENTS, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
ENABLE_HYBRID_HOTSEAT, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
ENABLE_SUGGESTED_ACTIONS_OVERVIEW, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
FOLDER_NAME_SUGGEST, defaultValue=true, mCurrentValue=true, mDefaultValueInCode=true
HOTSEAT_MIGRATE_TO_FOLDER, defaultValue=false, mCurrentValue=false, mDefaultValueInCode=false
DebugFlags:
ADAPTIVE_ICON_WINDOW_ANIM, defaultValue=true, mCurrentValue=true
ALWAYS_USE_HARDWARE_OPTIMIZATION_FOR_FOLDER_ANIMATIONS, defaultValue=false, mCurrentValue=false
APPLY_CONFIG_AT_RUNTIME, defaultValue=true, mCurrentValue=true
ASSISTANT_GIVES_LAUNCHER_FOCUS, defaultValue=false, mCurrentValue=false
ENABLE_DATABASE_RESTORE, defaultValue=true, mCurrentValue=true
ENABLE_DEEP_SHORTCUT_ICON_CACHE, defaultValue=true, mCurrentValue=true
ENABLE_FIXED_ROTATION_TRANSFORM, defaultValue=true, mCurrentValue=true
ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER, defaultValue=true, mCurrentValue=true
ENABLE_LSQ_VELOCITY_PROVIDER, defaultValue=true, mCurrentValue=true
ENABLE_OVERVIEW_ACTIONS, defaultValue=true, mCurrentValue=false
ENABLE_PREDICTION_DISMISS, defaultValue=false, mCurrentValue=false
ENABLE_QUICK_CAPTURE_GESTURE, defaultValue=true, mCurrentValue=true
ENABLE_QUICKSTEP_LIVE_TILE, defaultValue=false, mCurrentValue=false
ENABLE_SELECT_MODE, defaultValue=true, mCurrentValue=true
ENABLE_UNIVERSAL_SMARTSPACE, defaultValue=false, mCurrentValue=false
FORCE_LOCAL_OVERSCROLL_PLUGIN, defaultValue=false, mCurrentValue=false
KEYGUARD_ANIMATION, defaultValue=false, mCurrentValue=false
MULTI_DB_GRID_MIRATION_ALGO, defaultValue=false, mCurrentValue=false
PROMISE_APPS_IN_ALL_APPS, defaultValue=false, mCurrentValue=false
PROMISE_APPS_NEW_INSTALLS, defaultValue=true, mCurrentValue=true
QUICKSTEP_SPRINGS, defaultValue=true, mCurrentValue=true
UNSTABLE_SPRINGS, defaultValue=false, mCurrentValue=false
USE_SURFACE_VIEW_FOR_GRID_PREVIEW, defaultValue=true, mCurrentValue=true
PluginManager:
numEnabledPlugins=1
numDisabledPlugins=0
enabledPlugins=[ComponentInfo{com.android.launcher.plugins.AllAppsSearchPlugin/com.android.launcher.plugins.AllAppsSearch}]
disabledPlugins=[]
Change-Id: Ifefc02683834e52e3b78f93861a90f97a72c01d8
2020-04-17 13:39:25 -07:00
|
|
|
return super.appendProps(src).append(", mCurrentValue=").append(mCurrentValue);
|
2018-10-12 14:14:16 -04:00
|
|
|
}
|
|
|
|
|
}
|
2020-01-21 11:59:19 -08:00
|
|
|
|
|
|
|
|
private static BooleanFlag getDebugFlag(String key, boolean defaultValue, String description) {
|
|
|
|
|
return Utilities.IS_DEBUG_DEVICE
|
|
|
|
|
? new DebugFlag(key, defaultValue, description)
|
|
|
|
|
: new BooleanFlag(key, defaultValue);
|
|
|
|
|
}
|
2017-07-24 01:02:38 -07:00
|
|
|
}
|