Remove unused resources
Bug: 123794771 Test: rebuild, robolectric Change-Id: I22f43220cc9ad4ec2074af425b0da75f59e470a4
This commit is contained in:
@@ -527,15 +527,6 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
|| 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).
|
||||
* @param userManager Instance of UserManager
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user