Revert "[Settings] configuration for hidding SIM provider UI"

Revert submission 2299468-settings_without_siminfo

Reason for revert: Fix build breakage
Reverted Changes:
I3d6ecec14:[Settings] configuration for hidding SIM settings ...
I8f0c1d53c:[Settings] configuration for hidding SIM remove UI...
I1b88f0f70:[Settings] configuration for hidding SIM notificat...
Ibe22c3ba3:[Settings] configuration for hidding SIM provider ...
Id5ea14ca8:[Settings] configuration for hidding SIM related U...
I70be07dbc:[Settings] configuration for hidding SIM lock UI

Log of breakage:
https://android-build.googleplex.com/builds/submitted/9318826/full-eng/latest/view/logs/build_error.log

Bug: 260055628
Merged-In: I1cb83787dc1ac1d61bb6bed6aa9c5e7a3ad6e69b
Change-Id: If1951dde860bb49e3ea4cd5603ed92ef18bd1f0d
This commit is contained in:
Bonian Chen
2022-11-22 09:51:54 +00:00
parent 3b7d0d2e17
commit a1c1bd0f81
7 changed files with 4 additions and 25 deletions

View File

@@ -37,7 +37,6 @@
android:icon="@drawable/ic_calls_sms"
android:order="-20"
android:summary="@string/summary_placeholder"
settings:isPreferenceVisible="@bool/config_show_sim_info"
settings:allowDividerBelow="true"
settings:keywords="@string/calls_and_sms"
settings:useAdminDisabledSummary="true" />
@@ -50,7 +49,6 @@
android:order="-15"
settings:keywords="@string/keywords_more_mobile_networks"
settings:userRestriction="no_config_mobile_networks"
settings:isPreferenceVisible="@bool/config_show_sim_info"
settings:allowDividerAbove="true"
settings:useAdminDisabledSummary="true" />
@@ -68,7 +66,6 @@
android:persistent="false"
android:order="19"
settings:userRestriction="no_config_mobile_networks"
settings:isPreferenceVisible="@bool/config_show_sim_info"
settings:useAdminDisabledSummary="true" />
<com.android.settingslib.RestrictedPreference

View File

@@ -46,7 +46,6 @@
android:key="provider_model_mobile_network"
android:title="@string/summary_placeholder"
android:layout="@layout/preference_category_no_label"
settings:isPreferenceVisible="@bool/config_show_sim_info"
settings:controller="com.android.settings.network.NetworkMobileProviderController"/>
<com.android.settingslib.RestrictedSwitchPreference

View File

@@ -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

View File

@@ -190,8 +190,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
@Override
public boolean isAvailable() {
return SubscriptionUtil.isSimHardwareVisible(mContext) &&
mUserManager.isAdminUser();
return mUserManager.isAdminUser();
}
@Override

View File

@@ -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();
}
};
}

View File

@@ -341,18 +341,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);

View File

@@ -145,10 +145,7 @@ public class NetworkProviderSettingsTest {
@Before
public void setUp() {
mNetworkProviderSettings = spy(new NetworkProviderSettings() {
@Override
boolean showAnySubscriptionInfo(Context context) { return true; }
});
mNetworkProviderSettings = spy(new NetworkProviderSettings());
doReturn(mContext).when(mNetworkProviderSettings).getContext();
doReturn(mPreferenceManager).when(mNetworkProviderSettings).getPreferenceManager();
doReturn(mPowerManager).when(mContext).getSystemService(PowerManager.class);