Merge changes from topic "revert-2299468-settings_without_siminfo-PZBVIDHEPA" am: 5125477d7b am: d33fbde071
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2310159 Change-Id: Idc1ee6fcf8fc403ed9592adf34417ebe2b15b7da Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -51,8 +51,7 @@ public class EraseEuiccDataController extends BasePreferenceController {
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return SubscriptionUtil.isSimHardwareVisible(mContext) &&
|
||||
mContext.getPackageManager().hasSystemFeature(
|
||||
return mContext.getPackageManager().hasSystemFeature(
|
||||
PackageManager.FEATURE_TELEPHONY_EUICC) ? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@@ -206,8 +206,7 @@ public class MobileNetworkSummaryController extends AbstractPreferenceController
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return SubscriptionUtil.isSimHardwareVisible(mContext) &&
|
||||
!Utils.isWifiOnly(mContext) && mUserManager.isAdminUser();
|
||||
return !Utils.isWifiOnly(mContext) && mUserManager.isAdminUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -190,8 +190,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return SubscriptionUtil.isSimHardwareVisible(mContext) &&
|
||||
mUserManager.isAdminUser();
|
||||
return mUserManager.isAdminUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,8 +100,7 @@ public class NetworkProviderCallsSmsFragment extends DashboardFragment {
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return SubscriptionUtil.isSimHardwareVisible(context) &&
|
||||
context.getSystemService(UserManager.class).isAdminUser();
|
||||
return context.getSystemService(UserManager.class).isAdminUser();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -342,18 +342,7 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to show any UI which is SIM related.
|
||||
*/
|
||||
@VisibleForTesting
|
||||
boolean showAnySubscriptionInfo(Context context) {
|
||||
return (context != null) && SubscriptionUtil.isSimHardwareVisible(context);
|
||||
}
|
||||
|
||||
private void addNetworkMobileProviderController() {
|
||||
if (!showAnySubscriptionInfo(getContext())) {
|
||||
return;
|
||||
}
|
||||
if (mNetworkMobileProviderController == null) {
|
||||
mNetworkMobileProviderController = new NetworkMobileProviderController(
|
||||
getContext(), PREF_KEY_PROVIDER_MOBILE_NETWORK);
|
||||
|
||||
Reference in New Issue
Block a user