[Settings] configuration for hidding SIM provider UI
Hide SIM provider UI based on configuraion. Bug: 240515161 Test: test cases and local testing Merged-In: I1cb83787dc1ac1d61bb6bed6aa9c5e7a3ad6e69b Change-Id: Ibe22c3ba377a15f770622d235ebddc63b4bf3ed6
This commit is contained in:
@@ -341,7 +341,18 @@ 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