summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorRaff Tsai <rafftsai@google.com>2019-11-07 18:10:14 +0800
committerRaff Tsai <rafftsai@google.com>2019-11-07 18:12:34 +0800
commit4992919d95c65c849825d7252c4ebd0b69b7c1b6 (patch)
tree3120f49463cd6762dce2120149df31ae3525ca51 /src/com
parentefcfbaeb5a9224c219ec8a964931d1d7106ee31a (diff)
downloadpackages_apps_Settings-4992919d95c65c849825d7252c4ebd0b69b7c1b6.tar.gz
packages_apps_Settings-4992919d95c65c849825d7252c4ebd0b69b7c1b6.tar.bz2
packages_apps_Settings-4992919d95c65c849825d7252c4ebd0b69b7c1b6.zip
Remove unused resources
Bug: 123794771 Test: rebuild, robolectric Change-Id: I22f43220cc9ad4ec2074af425b0da75f59e470a4
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/Utils.java9
-rw-r--r--src/com/android/settings/datausage/CellDataPreference.java34
-rw-r--r--src/com/android/settings/network/NetworkDashboardFragment.java11
-rw-r--r--src/com/android/settings/network/telephony/MobileNetworkSettings.java14
4 files changed, 7 insertions, 61 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 5d49a3462c..436acef01e 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -528,15 +528,6 @@ public final class Utils extends com.android.settingslib.Utils {
}
/**
- * 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).
* @param userManager Instance of UserManager
* @param checkUser The user to check the existence of.
diff --git a/src/com/android/settings/datausage/CellDataPreference.java b/src/com/android/settings/datausage/CellDataPreference.java
index af7e16e221..5bfe967ff0 100644
--- a/src/com/android/settings/datausage/CellDataPreference.java
+++ b/src/com/android/settings/datausage/CellDataPreference.java
@@ -39,7 +39,6 @@ import androidx.core.content.res.TypedArrayUtils;
import androidx.preference.PreferenceViewHolder;
import com.android.settings.R;
-import com.android.settings.Utils;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.CustomDialogPreferenceCompat;
@@ -141,36 +140,13 @@ public class CellDataPreference extends CustomDialogPreferenceCompat implements
mSubId);
final SubscriptionInfo nextSir = mSubscriptionManager.getDefaultDataSubscriptionInfo();
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);
- if (nextSir != null && currentSir != null &&
- currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
- disableDataForOtherSubscriptions(mSubId);
- }
- return;
+ setMobileDataEnabled(false);
+ if (nextSir != null && currentSir != null
+ && currentSir.getSubscriptionId() == nextSir.getSubscriptionId()) {
+ disableDataForOtherSubscriptions(mSubId);
}
- // 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 {
- setMobileDataEnabled(true);
- }
+ setMobileDataEnabled(true);
}
}
diff --git a/src/com/android/settings/network/NetworkDashboardFragment.java b/src/com/android/settings/network/NetworkDashboardFragment.java
index 6e8444624d..fed2da3237 100644
--- a/src/com/android/settings/network/NetworkDashboardFragment.java
+++ b/src/com/android/settings/network/NetworkDashboardFragment.java
@@ -20,7 +20,6 @@ import static com.android.settings.network.MobilePlanPreferenceController.MANAGE
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.content.Context;
-import android.provider.SearchIndexableResource;
import android.util.Log;
import androidx.appcompat.app.AlertDialog;
@@ -37,7 +36,6 @@ 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;
@SearchIndexable
@@ -143,14 +141,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements
}
public static final BaseSearchIndexProvider 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.network_and_internet_v2;
- return Arrays.asList(sir);
- }
+ new BaseSearchIndexProvider(R.xml.network_and_internet_v2) {
@Override
public List<AbstractPreferenceController> createPreferenceControllers(Context
diff --git a/src/com/android/settings/network/telephony/MobileNetworkSettings.java b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
index 5cfdb610c2..1400e3a5a8 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkSettings.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkSettings.java
@@ -22,7 +22,6 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.UserManager;
-import android.provider.SearchIndexableResource;
import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -49,7 +48,6 @@ import com.android.settings.widget.PreferenceCategoryController;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.search.SearchIndexable;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -261,17 +259,7 @@ public class MobileNetworkSettings extends RestrictedDashboardFragment {
}
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
- new BaseSearchIndexProvider() {
- @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;
- }
+ new BaseSearchIndexProvider(R.xml.mobile_network_settings_v2) {
/** suppress full page if user is not admin */
@Override