[Settings] Code refactor for device without SIM
Code refactor to hide some UI entries, since there's a BluetoothWiFiPreferenceController covers some of the work for device without SIM. Bug: 259611847 Test: local & auto Change-Id: Ia221663e180c8dabed2a25a927643c992ef8ac89
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.network;
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
|
||||
public class NetworkResetPreferenceController extends AbstractPreferenceController
|
||||
@@ -33,7 +34,8 @@ public class NetworkResetPreferenceController extends AbstractPreferenceControll
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return !mRestrictionChecker.hasUserRestriction();
|
||||
return (SubscriptionUtil.isSimHardwareVisible(mContext) &&
|
||||
(!mRestrictionChecker.hasUserRestriction()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user