Enable flag for about phone v2
Bug: 36458278 Test: make RunSettingsRoboTests -j40 Change-Id: I0a41fdafadf71e20b76f999005dac66b6a52f570
This commit is contained in:
@@ -84,7 +84,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable {
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2)) {
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2) || true) {
|
||||
// Increase the number of children when the device contains more than 1 sim.
|
||||
final TelephonyManager telephonyManager = (TelephonyManager) getSystemService(
|
||||
Context.TELEPHONY_SERVICE);
|
||||
@@ -112,7 +112,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable {
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2)
|
||||
return FeatureFlagUtils.isEnabled(getContext(), DEVICE_INFO_V2) || true
|
||||
? R.xml.device_info_settings_v2 : R.xml.device_info_settings;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable {
|
||||
|
||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
|
||||
Activity activity, Fragment fragment, Lifecycle lifecycle) {
|
||||
if (FeatureFlagUtils.isEnabled(context, DEVICE_INFO_V2)) {
|
||||
if (FeatureFlagUtils.isEnabled(context, DEVICE_INFO_V2) || true) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
// Device name
|
||||
|
||||
@@ -213,7 +213,8 @@ public class DeviceInfoSettings extends DashboardFragment implements Indexable {
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||
Context context, boolean enabled) {
|
||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.device_info_settings;
|
||||
sir.xmlResId = FeatureFlagUtils.isEnabled(context, DEVICE_INFO_V2) || true
|
||||
? R.xml.device_info_settings_v2 : R.xml.device_info_settings;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,12 +26,18 @@ import android.support.v7.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.fuelgauge.PowerUsageSummary;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
|
||||
/**
|
||||
* Deprecated in About Phone V2
|
||||
* Information in this preference is available in {@link PowerUsageSummary}
|
||||
*/
|
||||
@Deprecated
|
||||
public class BatteryInfoPreferenceController extends AbstractPreferenceController
|
||||
implements PreferenceControllerMixin, LifecycleObserver, OnStart, OnStop {
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DeviceModelPreferenceController extends AbstractPreferenceControlle
|
||||
super.displayPreference(screen);
|
||||
final Preference pref = screen.findPreference(KEY_DEVICE_MODEL);
|
||||
if (pref != null) {
|
||||
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.DEVICE_INFO_V2)) {
|
||||
if (FeatureFlagUtils.isEnabled(mContext, FeatureFlags.DEVICE_INFO_V2) || true) {
|
||||
pref.setSummary(mContext.getResources().getString(R.string.model_summary,
|
||||
getDeviceModel()));
|
||||
} else {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class HardwareInfoDialogFragment extends InstrumentedDialogFragment {
|
||||
DeviceModelPreferenceController.getDeviceModel());
|
||||
|
||||
// Serial number
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlags.DEVICE_INFO_V2)) {
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlags.DEVICE_INFO_V2) || true) {
|
||||
setText(content, R.id.serial_number_label, R.id.serial_number_value, getSerialNumber());
|
||||
} else {
|
||||
content.findViewById(R.id.serial_number_label).setVisibility(View.GONE);
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.content.Context;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.DeviceInfoSettings;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
@@ -32,7 +33,10 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Fragment for showing device hardware info, such as MAC addresses and serial numbers
|
||||
* Deprecated in About Phone V2
|
||||
* Information on this page is available in {@link DeviceInfoSettings}
|
||||
*/
|
||||
@Deprecated
|
||||
public class Status extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "DeviceStatus";
|
||||
|
||||
@@ -19,12 +19,17 @@ package com.android.settings.deviceinfo;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.fuelgauge.PowerUsageSummary;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.deviceinfo.AbstractUptimePreferenceController;
|
||||
|
||||
/**
|
||||
* Concrete subclass of uptime preference controller
|
||||
*
|
||||
* Deprecated in About Phone V2
|
||||
* Information in this preference is available in {@link PowerUsageSummary}
|
||||
*/
|
||||
@Deprecated
|
||||
public class UptimePreferenceController extends AbstractUptimePreferenceController
|
||||
implements PreferenceControllerMixin {
|
||||
public UptimePreferenceController(Context context, Lifecycle lifecycle) {
|
||||
|
||||
@@ -149,7 +149,6 @@ public final class SearchIndexableResources {
|
||||
addIndex(PrintSettingsFragment.class);
|
||||
addIndex(DevelopmentSettingsDashboardFragment.class);
|
||||
addIndex(DeviceInfoSettings.class);
|
||||
addIndex(Status.class);
|
||||
addIndex(LegalSettings.class);
|
||||
addIndex(SystemDashboardFragment.class);
|
||||
addIndex(ResetDashboardFragment.class);
|
||||
|
||||
Reference in New Issue
Block a user