Merge "delete DeviceInfoSettings and activity, pref xml"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5fbecc3..78f4e22 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -957,35 +957,6 @@
                 android:value="com.android.settings.display.NightDisplaySettings" />
         </activity>
 
-        <activity
-            android:name="Settings$DeviceInfoSettingsActivity"
-            android:label="@string/device_info_settings"
-            android:icon="@drawable/ic_settings_about"
-            android:taskAffinity="com.android.settings"
-            android:enabled="false"
-            android:parentActivityName="Settings">
-            <intent-filter android:priority="1">
-                <action android:name="android.settings.DEVICE_INFO_SETTINGS" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.VOICE_LAUNCH" />
-            </intent-filter>
-            <intent-filter android:priority="10">
-                <action android:name="com.android.settings.action.SETTINGS" />
-            </intent-filter>
-            <meta-data android:name="com.android.settings.category"
-                android:value="com.android.settings.category.ia.system" />
-            <meta-data android:name="com.android.settings.title"
-                android:resource="@string/about_settings" />
-            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.deviceinfo.DeviceInfoSettings" />
-            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
-        </activity>
-
         <activity android:name=".Settings$MyDeviceInfoActivity"
                   android:label="@string/about_settings"
                   android:icon="@drawable/ic_settings_about"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 70ff0c5..a701f8f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2747,11 +2747,6 @@
     <!-- Instructions telling the user that the operation to unlock the keyguard with SIM PIN failed. Displayed in one line in a large font.  [CHAR LIMIT=40] -->
     <string name="pin_failed">SIM PIN operation failed!</string>
 
-    <!-- Advanced (used for diagnostics) device info activity title [CHAR LIMIT=40] -->
-    <string name="device_info_settings" product="tablet">Tablet status</string>
-    <!-- Advanced (used for diagnostics) device info activity title [CHAR LIMIT=40] -->
-    <string name="device_info_settings" product="default">Phone status</string>
-
     <!-- About phone screen, list item title.  Takes the user to the screen for seeing and installing system updates. [CHAR LIMIT=40] -->
     <string name="system_update_settings_list_item_title">System updates</string>
     <!-- About phone screen, list item summary.  Takes the user to the screen for seeing and installing system updates. [CHAR LIMIT=40] -->
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml
deleted file mode 100644
index 5f1ce12..0000000
--- a/res/xml/device_info_settings.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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.
-  -->
-
-<PreferenceScreen
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:settings="http://schemas.android.com/apk/res-auto"
-    android:key="device_info_pref_screen"
-    android:title="@string/about_settings">
-
-    <!-- Phone number -->
-    <Preference
-        android:key="phone_number"
-        android:order="0"
-        android:title="@string/status_number"
-        android:summary="@string/summary_placeholder" />
-
-    <!-- SIM status -->
-    <Preference
-        android:key="sim_status"
-        android:order="10"
-        android:title="@string/sim_status_title"
-        settings:keywords="@string/keywords_sim_status"
-        android:summary="@string/summary_placeholder" />
-
-    <!-- Model & hardware -->
-    <Preference
-        android:key="device_model_v1"
-        android:order="21"
-        android:title="@string/hardware_info"
-        settings:keywords="@string/keywords_model_and_hardware"
-        android:summary="@string/summary_placeholder"
-        settings:controller="com.android.settings.deviceinfo.DeviceModelPreferenceController" />
-
-    <!-- IMEI -->
-    <Preference
-        android:key="imei_info"
-        android:order="22"
-        android:title="@string/status_imei"
-        settings:keywords="@string/keywords_imei_info"
-        android:summary="@string/summary_placeholder" />
-
-    <!-- Android version -->
-    <Preference
-        android:key="firmware_version"
-        android:order="32"
-        android:title="@string/firmware_version"
-        settings:keywords="@string/keywords_android_version"
-        android:summary="@string/summary_placeholder"
-        settings:controller=
-            "com.android.settings.deviceinfo.firmwareversion.FirmwareVersionPreferenceController" />
-
-    <!--IP address -->
-    <Preference
-        android:key="wifi_ip_address"
-        android:order="34"
-        android:title="@string/wifi_ip_address"
-        android:summary="@string/summary_placeholder"
-        settings:allowDividerAbove="true" />
-
-    <!-- Wi-Fi MAC address -->
-    <Preference
-        android:key="wifi_mac_address"
-        android:order="35"
-        android:title="@string/status_wifi_mac_address"
-        android:summary="@string/summary_placeholder" />
-
-    <!-- Bluetooth address -->
-    <Preference
-        android:key="bt_address"
-        android:order="36"
-        android:title="@string/status_bt_address"
-        android:summary="@string/summary_placeholder" />
-
-
-    <!-- Legal information -->
-    <Preference
-        android:key="legal_container"
-        android:order="37"
-        android:title="@string/legal_information"
-        android:fragment="com.android.settings.LegalSettings"
-        settings:allowDividerAbove="true" />
-
-    <!-- Regulatory labels -->
-    <Preference
-        android:key="regulatory_info"
-        android:order="38"
-        android:title="@string/regulatory_labels">
-        <intent android:action="android.settings.SHOW_REGULATORY_INFO" />
-    </Preference>
-
-    <!-- Safety & regulatory manual -->
-    <Preference
-        android:key="safety_info"
-        android:order="39"
-        android:title="@string/safety_and_regulatory_info">
-        <intent android:action="android.settings.SHOW_SAFETY_AND_REGULATORY_INFO" />
-    </Preference>
-
-    <!-- Manual -->
-    <Preference
-        android:key="manual"
-        android:order="40"
-        android:title="@string/manual">
-        <intent android:action="android.settings.SHOW_MANUAL" />
-    </Preference>
-
-    <!-- Feedback on the device -->
-    <Preference
-        android:key="device_feedback"
-        android:order="41"
-        android:title="@string/device_feedback" />
-
-    <!-- Device FCC equipment id -->
-    <Preference
-        android:key="fcc_equipment_id"
-        android:order="42"
-        android:title="@string/fcc_equipment_id"
-        android:summary="@string/summary_placeholder" />
-
-    <!-- Build number -->
-    <Preference
-        android:key="build_number"
-        android:order="43"
-        android:title="@string/build_number"
-        android:summary="@string/summary_placeholder"
-        settings:allowDividerAbove="true" />
-
-</PreferenceScreen>
\ No newline at end of file
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 0ad964b..651c3a7 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -50,7 +50,6 @@
     public static class DisplaySettingsActivity extends SettingsActivity { /* empty */ }
     public static class NightDisplaySettingsActivity extends SettingsActivity { /* empty */ }
     public static class NightDisplaySuggestionActivity extends NightDisplaySettingsActivity { /* empty */ }
-    public static class DeviceInfoSettingsActivity extends SettingsActivity { /* empty */ }
     public static class MyDeviceInfoActivity extends SettingsActivity { /* empty */ }
     public static class ApplicationSettingsActivity extends SettingsActivity { /* empty */ }
     public static class ManageApplicationsActivity extends SettingsActivity { /* empty */ }
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 0a0fd1b..5d6ea4d 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -710,19 +710,6 @@
                 WifiDisplaySettings.isAvailable(this), isAdmin)
                 || somethingChanged;
 
-        // Enable/disable the Me Card page.
-        final boolean aboutPhoneV2Enabled = featureFactory
-                .getAccountFeatureProvider()
-                .isAboutPhoneV2Enabled(this);
-        somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,
-                        Settings.MyDeviceInfoActivity.class.getName()),
-                aboutPhoneV2Enabled, isAdmin)
-                || somethingChanged;
-        somethingChanged = setTileEnabled(changedList, new ComponentName(packageName,
-                        Settings.DeviceInfoSettingsActivity.class.getName()),
-                !aboutPhoneV2Enabled, isAdmin)
-                || somethingChanged;
-
         if (UserHandle.MU_ENABLED && !isAdmin) {
 
             // When on restricted users, disable all extra categories (but only the settings ones).
diff --git a/src/com/android/settings/accounts/AccountFeatureProvider.java b/src/com/android/settings/accounts/AccountFeatureProvider.java
index ecde8fe..2b351a8 100644
--- a/src/com/android/settings/accounts/AccountFeatureProvider.java
+++ b/src/com/android/settings/accounts/AccountFeatureProvider.java
@@ -25,10 +25,4 @@
 public interface AccountFeatureProvider {
     String getAccountType();
     Account[] getAccounts(Context context);
-    /**
-     * Checks whether or not to display the new About Phone page.
-     */
-    default boolean isAboutPhoneV2Enabled(Context context) {
-        return FeatureFlagUtils.isEnabled(context, FeatureFlags.ABOUT_PHONE_V2);
-    }
 }
diff --git a/src/com/android/settings/core/FeatureFlags.java b/src/com/android/settings/core/FeatureFlags.java
index e77c27b..a1bce23 100644
--- a/src/com/android/settings/core/FeatureFlags.java
+++ b/src/com/android/settings/core/FeatureFlags.java
@@ -22,7 +22,6 @@
 public class FeatureFlags {
     public static final String BATTERY_DISPLAY_APP_LIST = "settings_battery_display_app_list";
     public static final String ZONE_PICKER_V2 = "settings_zone_picker_v2";
-    public static final String ABOUT_PHONE_V2 = "settings_about_phone_v2";
     public static final String BLUETOOTH_WHILE_DRIVING = "settings_bluetooth_while_driving";
     public static final String DATA_USAGE_SETTINGS_V2 = "settings_data_usage_v2";
     public static final String AUDIO_SWITCHER_SETTINGS = "settings_audio_switcher";
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index 2a60c16..6cf29597 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -62,7 +62,6 @@
 import com.android.settings.datausage.DataUsageSummaryLegacy;
 import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
 import com.android.settings.development.DevelopmentSettingsDashboardFragment;
-import com.android.settings.deviceinfo.DeviceInfoSettings;
 import com.android.settings.deviceinfo.PrivateVolumeForget;
 import com.android.settings.deviceinfo.PrivateVolumeSettings;
 import com.android.settings.deviceinfo.PublicVolumeSettings;
@@ -159,7 +158,6 @@
             UserDictionaryList.class.getName(),
             UserDictionarySettings.class.getName(),
             DisplaySettings.class.getName(),
-            DeviceInfoSettings.class.getName(),
             MyDeviceInfoFragment.class.getName(),
             ManageApplications.class.getName(),
             ManageAssist.class.getName(),
@@ -294,7 +292,6 @@
             // Home page > System
             Settings.LanguageAndInputSettingsActivity.class.getName(),
             Settings.DateTimeSettingsActivity.class.getName(),
-            Settings.DeviceInfoSettingsActivity.class.getName(),
             Settings.EnterprisePrivacySettingsActivity.class.getName(),
             Settings.MyDeviceInfoActivity.class.getName(),
     };
diff --git a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java b/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
deleted file mode 100644
index e2df2c1..0000000
--- a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (C) 2008 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.settings.deviceinfo;
-
-import android.app.Activity;
-import android.app.Fragment;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.SearchIndexableResource;
-import android.telephony.TelephonyManager;
-
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.settings.R;
-import com.android.settings.dashboard.DashboardFragment;
-import com.android.settings.dashboard.SummaryLoader;
-import com.android.settings.deviceinfo.firmwareversion.FirmwareVersionPreferenceController;
-import com.android.settings.deviceinfo.imei.ImeiInfoPreferenceController;
-import com.android.settings.deviceinfo.simstatus.SimStatusPreferenceController;
-import com.android.settings.search.BaseSearchIndexProvider;
-import com.android.settings.search.Indexable;
-import com.android.settingslib.core.AbstractPreferenceController;
-import com.android.settingslib.core.lifecycle.Lifecycle;
-import com.android.settingslib.search.SearchIndexable;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import androidx.annotation.VisibleForTesting;
-
-@SearchIndexable
-public class DeviceInfoSettings extends DashboardFragment implements Indexable {
-
-    private static final String LOG_TAG = "DeviceInfoSettings";
-
-    private static final String KEY_LEGAL_CONTAINER = "legal_container";
-
-    @VisibleForTesting
-    static final int SIM_PREFERENCES_COUNT = 3;
-    @VisibleForTesting
-    static final int NON_SIM_PREFERENCES_COUNT = 2;
-
-    @Override
-    public void onAttach(Context context) {
-        super.onAttach(context);
-        use(FirmwareVersionPreferenceController.class).setHost(this /*parent*/);
-        use(DeviceModelPreferenceController.class).setHost(this /* parent */);
-    }
-
-    @Override
-    public int getMetricsCategory() {
-        return MetricsEvent.DEVICEINFO;
-    }
-
-    @Override
-    public int getHelpResource() {
-        return R.string.help_uri_about;
-    }
-
-    @Override
-    public int getInitialExpandedChildCount() {
-        final TelephonyManager telephonyManager = (TelephonyManager) getContext()
-                .getSystemService(Context.TELEPHONY_SERVICE);
-        return Math.max(SIM_PREFERENCES_COUNT,
-                SIM_PREFERENCES_COUNT * telephonyManager.getPhoneCount())
-                + NON_SIM_PREFERENCES_COUNT;
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        final BuildNumberPreferenceController buildNumberPreferenceController =
-                use(BuildNumberPreferenceController.class);
-        if (buildNumberPreferenceController.onActivityResult(requestCode, resultCode, data)) {
-            return;
-        }
-        super.onActivityResult(requestCode, resultCode, data);
-    }
-
-    @Override
-    protected String getLogTag() {
-        return LOG_TAG;
-    }
-
-    @Override
-    protected int getPreferenceScreenResId() {
-        return R.xml.device_info_settings;
-    }
-
-    @Override
-    protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
-        return buildPreferenceControllers(context, getActivity(), this /* fragment */,
-                getLifecycle());
-    }
-
-    private static class SummaryProvider implements SummaryLoader.SummaryProvider {
-
-        private final SummaryLoader mSummaryLoader;
-
-        public SummaryProvider(SummaryLoader summaryLoader) {
-            mSummaryLoader = summaryLoader;
-        }
-
-        @Override
-        public void setListening(boolean listening) {
-            if (listening) {
-                mSummaryLoader.setSummary(this, DeviceModelPreferenceController.getDeviceModel());
-            }
-        }
-    }
-
-    public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY
-            = new SummaryLoader.SummaryProviderFactory() {
-        @Override
-        public SummaryLoader.SummaryProvider createSummaryProvider(Activity activity,
-                SummaryLoader summaryLoader) {
-            return new SummaryProvider(summaryLoader);
-        }
-    };
-
-    private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
-            Activity activity, Fragment fragment, Lifecycle lifecycle) {
-        final List<AbstractPreferenceController> controllers = new ArrayList<>();
-        controllers.add(new PhoneNumberPreferenceController(context));
-        controllers.add(new SimStatusPreferenceController(context, fragment));
-        controllers.add(new ImeiInfoPreferenceController(context, fragment));
-        controllers.add(new IpAddressPreferenceController(context, lifecycle));
-        controllers.add(new WifiMacAddressPreferenceController(context, lifecycle));
-        controllers.add(new BluetoothAddressPreferenceController(context, lifecycle));
-        controllers.add(new RegulatoryInfoPreferenceController(context));
-        controllers.add(new SafetyInfoPreferenceController(context));
-        controllers.add(new ManualPreferenceController(context));
-        controllers.add(new FeedbackPreferenceController(fragment, context));
-        controllers.add(new FccEquipmentIdPreferenceController(context));
-        controllers.add(
-                new BuildNumberPreferenceController(context, activity, fragment, lifecycle));
-        return controllers;
-    }
-
-    /**
-     * For Search.
-     */
-    public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
-            new BaseSearchIndexProvider() {
-
-                @Override
-                public List<SearchIndexableResource> getXmlResourcesToIndex(
-                        Context context, boolean enabled) {
-                    final SearchIndexableResource sir = new SearchIndexableResource(context);
-                    sir.xmlResId = R.xml.device_info_settings;
-                    return Arrays.asList(sir);
-                }
-
-                @Override
-                public List<AbstractPreferenceController> createPreferenceControllers(
-                        Context context) {
-                    return buildPreferenceControllers(context, null /*activity */,
-                            null /* fragment */, null /* lifecycle */);
-                }
-
-                @Override
-                public List<String> getNonIndexableKeys(Context context) {
-                    List<String> keys = super.getNonIndexableKeys(context);
-                    keys.add(KEY_LEGAL_CONTAINER);
-                    return keys;
-                }
-            };
-}
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/DeviceInfoSettingsTest.java b/tests/robotests/src/com/android/settings/deviceinfo/DeviceInfoSettingsTest.java
deleted file mode 100644
index 169554d..0000000
--- a/tests/robotests/src/com/android/settings/deviceinfo/DeviceInfoSettingsTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2018 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.settings.deviceinfo;
-
-import static com.android.settings.SettingsActivity.EXTRA_FRAGMENT_ARG_KEY;
-import static com.android.settings.deviceinfo.DeviceInfoSettings.NON_SIM_PREFERENCES_COUNT;
-import static com.android.settings.deviceinfo.DeviceInfoSettings.SIM_PREFERENCES_COUNT;
-import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-
-import android.app.Activity;
-import android.content.Context;
-import android.os.Build;
-import android.os.Bundle;
-import androidx.preference.PreferenceScreen;
-import android.telephony.TelephonyManager;
-
-import com.android.settings.R;
-import com.android.settings.dashboard.SummaryLoader;
-import com.android.settings.testutils.FakeFeatureFactory;
-import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.testutils.XmlTestUtils;
-import com.android.settings.testutils.shadow.SettingsShadowResources;
-import com.android.settings.testutils.shadow.ShadowConnectivityManager;
-import com.android.settings.testutils.shadow.ShadowUserManager;
-import com.android.settings.testutils.shadow.ShadowUtils;
-import com.android.settingslib.DeviceInfoUtils;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
-import org.robolectric.shadows.ShadowApplication;
-
-import java.util.List;
-
-@RunWith(SettingsRobolectricTestRunner.class)
-@Config(shadows = {ShadowUtils.class, ShadowConnectivityManager.class, ShadowUserManager.class})
-public class DeviceInfoSettingsTest {
-
-    @Mock
-    private Activity mActivity;
-    @Mock
-    private PreferenceScreen mScreen;
-    @Mock
-    private SummaryLoader mSummaryLoader;
-    @Mock
-    private TelephonyManager mTelephonyManager;
-
-    private Context mContext;
-    private DeviceInfoSettings mSettings;
-
-    @Before
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-        FakeFeatureFactory.setupForTest();
-        mContext = RuntimeEnvironment.application;
-        mSettings = spy(new DeviceInfoSettings());
-
-        doReturn(mActivity).when(mSettings).getActivity();
-        doReturn(mContext).when(mSettings).getContext();
-        doReturn(mContext.getTheme()).when(mActivity).getTheme();
-        doReturn(mContext.getResources()).when(mSettings).getResources();
-        doNothing().when(mSettings).onCreatePreferences(any(), any());
-
-        doReturn(mScreen).when(mSettings).getPreferenceScreen();
-        ShadowApplication.getInstance()
-            .setSystemService(Context.TELEPHONY_SERVICE, mTelephonyManager);
-    }
-
-    @Test
-    public void getPrefXml_shouldReturnDeviceInfoXml() {
-        assertThat(mSettings.getPreferenceScreenResId()).isEqualTo(R.xml.device_info_settings);
-    }
-
-    @Test
-    public void getSummary_shouldReturnDeviceModel() {
-        final SummaryLoader.SummaryProvider mProvider =
-            DeviceInfoSettings.SUMMARY_PROVIDER_FACTORY.createSummaryProvider(null, mSummaryLoader);
-
-        mProvider.setListening(true);
-
-        verify(mSummaryLoader).setSummary(mProvider, Build.MODEL + DeviceInfoUtils.getMsvSuffix());
-    }
-
-    @Test
-    public void testNonIndexableKeys_existInXmlLayout() {
-        final Context context = RuntimeEnvironment.application;
-        final List<String> niks =
-            DeviceInfoSettings.SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(context);
-        final int xmlId = (new DeviceInfoSettings()).getPreferenceScreenResId();
-
-        final List<String> keys = XmlTestUtils.getKeysFromPreferenceXml(context, xmlId);
-
-        assertThat(keys).containsAllIn(niks);
-    }
-
-    @Test
-    @Config(shadows = SettingsShadowResources.SettingsShadowTheme.class)
-    public void onCreate_fromSearch_shouldNotOverrideInitialExpandedCount() {
-        final Bundle args = new Bundle();
-        args.putString(EXTRA_FRAGMENT_ARG_KEY, "search_key");
-        mSettings.setArguments(args);
-
-        mSettings.onCreate(null /* icicle */);
-
-        verify(mScreen).setInitialExpandedChildrenCount(Integer.MAX_VALUE);
-    }
-
-    @Test
-    @Config(shadows = SettingsShadowResources.SettingsShadowTheme.class)
-    public void onCreate_singleSim_shouldAddSingleSimCount() {
-        doReturn(1).when(mTelephonyManager).getPhoneCount();
-
-        mSettings.onCreate(null /* icicle */);
-
-        verify(mScreen).setInitialExpandedChildrenCount(
-                SIM_PREFERENCES_COUNT + NON_SIM_PREFERENCES_COUNT);
-    }
-
-    @Test
-    @Config(shadows = SettingsShadowResources.SettingsShadowTheme.class)
-    public void onCreate_dualeSim_shouldAddDualSimCount() {
-        doReturn(2).when(mTelephonyManager).getPhoneCount();
-
-        mSettings.onCreate(null /* icicle */);
-
-        verify(mScreen).setInitialExpandedChildrenCount(
-                2 * SIM_PREFERENCES_COUNT + NON_SIM_PREFERENCES_COUNT);
-    }
-}