Loading src/com/android/settings/DeviceInfoSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable { @Override protected int getPreferenceScreenResId() { return FeatureFlagUtils.isEnabled(DEVICE_INFO_V2) return FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2) ? R.xml.device_info_settings_v2 : R.xml.device_info_settings; } Loading Loading @@ -126,7 +126,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable { private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Activity activity, Fragment fragment, Lifecycle lifecycle) { if (FeatureFlagUtils.isEnabled(DEVICE_INFO_V2)) { if (FeatureFlagUtils.isEnabled(context, DEVICE_INFO_V2)) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); // Device name Loading src/com/android/settings/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class Settings extends SettingsActivity { @Deprecated public static class DevelopmentSettingsActivity extends SettingsActivity { public static final boolean isEnabled() { return FeatureFlagUtils.isEnabled(DEV_OPTION_V1); return FeatureFlagUtils.isEnabled(null /* context */, DEV_OPTION_V1); } } public static class DevelopmentSettingsDashboardActivity extends SettingsActivity { /* empty */ } Loading src/com/android/settings/core/InstrumentedPreferenceFragment.java +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.os.Bundle; import android.support.annotation.XmlRes; import android.support.v7.preference.PreferenceScreen; import android.text.TextUtils; import android.util.FeatureFlagUtils; import android.util.Log; import com.android.settings.core.instrumentation.Instrumentable; Loading src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); boolean isLowRamDevice = am.isLowRamDevice(); return !isLowRamDevice && !isV2Enabled(); return !isLowRamDevice && !isV2Enabled(context); } @Override Loading @@ -81,7 +81,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); boolean isLowRamDevice = am.isLowRamDevice(); return !isLowRamDevice && isV2Enabled(); return !isLowRamDevice && isV2Enabled(context); } @Override Loading @@ -91,8 +91,8 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider "com.android.settings.intelligence.suggestions.SuggestionService"); } private static boolean isV2Enabled() { return FeatureFlagUtils.isEnabled(SUGGESTIONS_V2) || true; private static boolean isV2Enabled(Context context) { return FeatureFlagUtils.isEnabled(context, SUGGESTIONS_V2) || true; } @Override Loading src/com/android/settings/development/featureflags/FeatureFlagPreference.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ public class FeatureFlagPreference extends SwitchPreference { mKey = key; setKey(key); setTitle(key); setCheckedInternal(FeatureFlagUtils.isEnabled(mKey)); setCheckedInternal(FeatureFlagUtils.isEnabled(context, mKey)); } @Override Loading Loading
src/com/android/settings/DeviceInfoSettings.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable { @Override protected int getPreferenceScreenResId() { return FeatureFlagUtils.isEnabled(DEVICE_INFO_V2) return FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2) ? R.xml.device_info_settings_v2 : R.xml.device_info_settings; } Loading Loading @@ -126,7 +126,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable { private static List<AbstractPreferenceController> buildPreferenceControllers(Context context, Activity activity, Fragment fragment, Lifecycle lifecycle) { if (FeatureFlagUtils.isEnabled(DEVICE_INFO_V2)) { if (FeatureFlagUtils.isEnabled(context, DEVICE_INFO_V2)) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); // Device name Loading
src/com/android/settings/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class Settings extends SettingsActivity { @Deprecated public static class DevelopmentSettingsActivity extends SettingsActivity { public static final boolean isEnabled() { return FeatureFlagUtils.isEnabled(DEV_OPTION_V1); return FeatureFlagUtils.isEnabled(null /* context */, DEV_OPTION_V1); } } public static class DevelopmentSettingsDashboardActivity extends SettingsActivity { /* empty */ } Loading
src/com/android/settings/core/InstrumentedPreferenceFragment.java +0 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import android.os.Bundle; import android.support.annotation.XmlRes; import android.support.v7.preference.PreferenceScreen; import android.text.TextUtils; import android.util.FeatureFlagUtils; import android.util.Log; import com.android.settings.core.instrumentation.Instrumentable; Loading
src/com/android/settings/dashboard/suggestions/SuggestionFeatureProviderImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); boolean isLowRamDevice = am.isLowRamDevice(); return !isLowRamDevice && !isV2Enabled(); return !isLowRamDevice && !isV2Enabled(context); } @Override Loading @@ -81,7 +81,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); boolean isLowRamDevice = am.isLowRamDevice(); return !isLowRamDevice && isV2Enabled(); return !isLowRamDevice && isV2Enabled(context); } @Override Loading @@ -91,8 +91,8 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider "com.android.settings.intelligence.suggestions.SuggestionService"); } private static boolean isV2Enabled() { return FeatureFlagUtils.isEnabled(SUGGESTIONS_V2) || true; private static boolean isV2Enabled(Context context) { return FeatureFlagUtils.isEnabled(context, SUGGESTIONS_V2) || true; } @Override Loading
src/com/android/settings/development/featureflags/FeatureFlagPreference.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ public class FeatureFlagPreference extends SwitchPreference { mKey = key; setKey(key); setTitle(key); setCheckedInternal(FeatureFlagUtils.isEnabled(mKey)); setCheckedInternal(FeatureFlagUtils.isEnabled(context, mKey)); } @Override Loading