Add global flag for settings catalyst
Bug: 323791114 Flag: com.android.settings.flags.catalyst Test: Presubmit Change-Id: I1addb2391405ced12f0b32b2415608cf3a472c37
This commit is contained in:
@@ -56,3 +56,10 @@ flag {
|
||||
description: "Use updated suggestion card(s) in AOSP Settings"
|
||||
bug: "323258154"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "catalyst"
|
||||
namespace: "android_settings"
|
||||
description: "Flag for all screens"
|
||||
bug: "323791114"
|
||||
}
|
||||
|
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import static com.android.settingslib.flags.Flags.settingsCatalyst;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -73,7 +71,7 @@ public class SettingsApplication extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
if (settingsCatalyst()) {
|
||||
if (Flags.catalyst()) {
|
||||
PreferenceScreenRegistry.INSTANCE.setPreferenceScreensSupplier(
|
||||
this::getPreferenceScreens);
|
||||
}
|
||||
|
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.settings.dashboard;
|
||||
|
||||
import static com.android.settingslib.flags.Flags.settingsCatalyst;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.ContentResolver;
|
||||
@@ -390,7 +388,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
|
||||
/** Returns if catalyst is enabled on current screen. */
|
||||
protected final boolean isCatalystEnabled() {
|
||||
if (!settingsCatalyst()) {
|
||||
if (!Flags.catalyst()) {
|
||||
return false;
|
||||
}
|
||||
Context context = getContext();
|
||||
|
Reference in New Issue
Block a user