Remove unused resources
Bug: 123794771 Test: rebuild, robolectric Change-Id: I22f43220cc9ad4ec2074af425b0da75f59e470a4
This commit is contained in:
@@ -1,99 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2016 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="network_and_internet_screen"
|
|
||||||
android:title="@string/network_dashboard_title"
|
|
||||||
settings:initialExpandedChildrenCount="5">
|
|
||||||
|
|
||||||
<com.android.settings.widget.MasterSwitchPreference
|
|
||||||
android:fragment="com.android.settings.wifi.WifiSettings"
|
|
||||||
android:key="toggle_wifi"
|
|
||||||
android:title="@string/wifi_settings"
|
|
||||||
android:summary="@string/summary_placeholder"
|
|
||||||
android:icon="@drawable/ic_settings_wireless"
|
|
||||||
android:order="-30">
|
|
||||||
<intent
|
|
||||||
android:action="android.settings.WIFI_SETTINGS"
|
|
||||||
android:targetClass="Settings$WifiSettingsActivity" />
|
|
||||||
</com.android.settings.widget.MasterSwitchPreference>
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:key="mobile_network_settings"
|
|
||||||
android:title="@string/network_settings_title"
|
|
||||||
android:summary="@string/summary_placeholder"
|
|
||||||
android:icon="@drawable/ic_network_cell"
|
|
||||||
android:order="-15"
|
|
||||||
settings:keywords="@string/keywords_more_mobile_networks"
|
|
||||||
settings:userRestriction="no_config_mobile_networks"
|
|
||||||
settings:useAdminDisabledSummary="true">
|
|
||||||
</com.android.settingslib.RestrictedPreference>
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:fragment="com.android.settings.TetherSettings"
|
|
||||||
android:key="tether_settings"
|
|
||||||
android:title="@string/tether_settings_title_all"
|
|
||||||
android:icon="@drawable/ic_wifi_tethering"
|
|
||||||
android:order="-5"
|
|
||||||
android:summary="@string/summary_placeholder"
|
|
||||||
settings:keywords="@string/keywords_hotspot_tethering"
|
|
||||||
settings:userRestriction="no_config_tethering"
|
|
||||||
settings:useAdminDisabledSummary="true" />
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:key="manage_mobile_plan"
|
|
||||||
android:title="@string/manage_mobile_plan_title"
|
|
||||||
android:persistent="false"
|
|
||||||
android:order="0"
|
|
||||||
settings:userRestriction="no_config_mobile_networks"
|
|
||||||
settings:useAdminDisabledSummary="true" />
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedSwitchPreference
|
|
||||||
android:key="airplane_mode_old"
|
|
||||||
android:title="@string/airplane_mode"
|
|
||||||
android:icon="@drawable/ic_airplanemode_active"
|
|
||||||
android:disableDependentsState="true"
|
|
||||||
android:order="5"
|
|
||||||
settings:controller="com.android.settings.network.AirplaneModePreferenceController"
|
|
||||||
settings:userRestriction="no_airplane_mode"/>
|
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:fragment="com.android.settings.ProxySelector"
|
|
||||||
android:key="proxy_settings"
|
|
||||||
android:title="@string/proxy_settings_title" />
|
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
|
||||||
android:fragment="com.android.settings.vpn2.VpnSettings"
|
|
||||||
android:key="vpn_settings"
|
|
||||||
android:title="@string/vpn_settings_title"
|
|
||||||
android:icon="@drawable/ic_vpn_key"
|
|
||||||
android:order="10"
|
|
||||||
android:summary="@string/summary_placeholder"
|
|
||||||
settings:userRestriction="no_config_vpn"
|
|
||||||
settings:useAdminDisabledSummary="true" />
|
|
||||||
|
|
||||||
<com.android.settings.network.PrivateDnsModeDialogPreference
|
|
||||||
android:key="private_dns_settings"
|
|
||||||
android:title="@string/select_private_dns_configuration_title"
|
|
||||||
android:order="15"
|
|
||||||
android:dialogTitle="@string/select_private_dns_configuration_dialog_title"
|
|
||||||
android:dialogLayout="@layout/private_dns_mode_dialog"
|
|
||||||
android:positiveButtonText="@string/save"
|
|
||||||
android:negativeButtonText="@android:string/cancel" />
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
@@ -527,15 +527,6 @@ public final class Utils extends com.android.settingslib.Utils {
|
|||||||
|| um.getUserProfiles().contains(otherUser);
|
|| um.getUserProfiles().contains(otherUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return whether or not the user should have a SIM Cards option in Settings.
|
|
||||||
* TODO: Change back to returning true if count is greater than one after testing.
|
|
||||||
* TODO: See bug 16533525.
|
|
||||||
*/
|
|
||||||
public static boolean showSimCardTile(Context context) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries for the UserInfo of a user. Returns null if the user doesn't exist (was removed).
|
* Queries for the UserInfo of a user. Returns null if the user doesn't exist (was removed).
|
||||||
* @param userManager Instance of UserManager
|
* @param userManager Instance of UserManager
|
||||||
|
@@ -39,7 +39,6 @@ import androidx.core.content.res.TypedArrayUtils;
|
|||||||
import androidx.preference.PreferenceViewHolder;
|
import androidx.preference.PreferenceViewHolder;
|
||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.Utils;
|
|
||||||
import com.android.settings.overlay.FeatureFactory;
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settingslib.CustomDialogPreferenceCompat;
|
import com.android.settingslib.CustomDialogPreferenceCompat;
|
||||||
|
|
||||||
@@ -141,38 +140,15 @@ public class CellDataPreference extends CustomDialogPreferenceCompat implements
|
|||||||
mSubId);
|
mSubId);
|
||||||
final SubscriptionInfo nextSir = mSubscriptionManager.getDefaultDataSubscriptionInfo();
|
final SubscriptionInfo nextSir = mSubscriptionManager.getDefaultDataSubscriptionInfo();
|
||||||
if (mChecked) {
|
if (mChecked) {
|
||||||
// If the device is single SIM or is enabling data on the active data SIM then forgo
|
|
||||||
// the pop-up.
|
|
||||||
if (!Utils.showSimCardTile(getContext()) ||
|
|
||||||
(nextSir != null && currentSir != null &&
|
|
||||||
currentSir.getSubscriptionId() == nextSir.getSubscriptionId())) {
|
|
||||||
setMobileDataEnabled(false);
|
setMobileDataEnabled(false);
|
||||||
if (nextSir != null && currentSir != null &&
|
if (nextSir != null && currentSir != null
|
||||||
currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
|
&& currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
|
||||||
disableDataForOtherSubscriptions(mSubId);
|
disableDataForOtherSubscriptions(mSubId);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
// disabling data; show confirmation dialog which eventually
|
|
||||||
// calls setMobileDataEnabled() once user confirms.
|
|
||||||
mMultiSimDialog = false;
|
|
||||||
super.performClick(view);
|
|
||||||
} else {
|
|
||||||
// If we are showing the Sim Card tile then we are a Multi-Sim device.
|
|
||||||
if (Utils.showSimCardTile(getContext())) {
|
|
||||||
mMultiSimDialog = true;
|
|
||||||
if (nextSir != null && currentSir != null &&
|
|
||||||
currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
|
|
||||||
setMobileDataEnabled(true);
|
|
||||||
disableDataForOtherSubscriptions(mSubId);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
super.performClick(view);
|
|
||||||
} else {
|
} else {
|
||||||
setMobileDataEnabled(true);
|
setMobileDataEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void setMobileDataEnabled(boolean enabled) {
|
private void setMobileDataEnabled(boolean enabled) {
|
||||||
if (DataUsageSummary.LOGD) Log.d(TAG, "setMobileDataEnabled(" + enabled + ","
|
if (DataUsageSummary.LOGD) Log.d(TAG, "setMobileDataEnabled(" + enabled + ","
|
||||||
|
@@ -20,7 +20,6 @@ import static com.android.settings.network.MobilePlanPreferenceController.MANAGE
|
|||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.settings.SettingsEnums;
|
import android.app.settings.SettingsEnums;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.provider.SearchIndexableResource;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
@@ -37,7 +36,6 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
|
|||||||
import com.android.settingslib.search.SearchIndexable;
|
import com.android.settingslib.search.SearchIndexable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@SearchIndexable
|
@SearchIndexable
|
||||||
@@ -143,14 +141,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
new BaseSearchIndexProvider() {
|
new BaseSearchIndexProvider(R.xml.network_and_internet_v2) {
|
||||||
@Override
|
|
||||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
|
||||||
Context context, boolean enabled) {
|
|
||||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
|
||||||
sir.xmlResId = R.xml.network_and_internet_v2;
|
|
||||||
return Arrays.asList(sir);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AbstractPreferenceController> createPreferenceControllers(Context
|
public List<AbstractPreferenceController> createPreferenceControllers(Context
|
||||||
|
@@ -22,7 +22,6 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.provider.SearchIndexableResource;
|
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.telephony.SubscriptionManager;
|
import android.telephony.SubscriptionManager;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
@@ -49,7 +48,6 @@ import com.android.settings.widget.PreferenceCategoryController;
|
|||||||
import com.android.settingslib.core.AbstractPreferenceController;
|
import com.android.settingslib.core.AbstractPreferenceController;
|
||||||
import com.android.settingslib.search.SearchIndexable;
|
import com.android.settingslib.search.SearchIndexable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -261,17 +259,7 @@ public class MobileNetworkSettings extends RestrictedDashboardFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||||
new BaseSearchIndexProvider() {
|
new BaseSearchIndexProvider(R.xml.mobile_network_settings_v2) {
|
||||||
@Override
|
|
||||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
|
||||||
boolean enabled) {
|
|
||||||
final ArrayList<SearchIndexableResource> result = new ArrayList<>();
|
|
||||||
|
|
||||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
|
||||||
sir.xmlResId = R.xml.mobile_network_settings_v2;
|
|
||||||
result.add(sir);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** suppress full page if user is not admin */
|
/** suppress full page if user is not admin */
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user