Merge "[Settings] Code refactor for device without SIM"

This commit is contained in:
Bonian Chen
2022-12-09 09:25:17 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 3 deletions

View File

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