Commit 69716635 authored by TheScarastic's avatar TheScarastic Committed by Michael W

SetupWizard: Fix crash when sims are absent

Change-Id: I3e37f78f1c96be1630ea9fde866ce978f9ecf1d8
parent b1dd4299
......@@ -219,6 +219,10 @@ public class SetupWizardUtils {
return fingerprintManager.isHardwareDetected();
}
public static boolean simMissing() {
return PhoneMonitor.getInstance().simMissing();
}
public static String getDefaultThemePackageName(Context context) {
final String defaultThemePkg = CMSettings.Secure.getString(context.getContentResolver(),
CMSettings.Secure.DEFAULT_THEME_PACKAGE);
......@@ -248,6 +252,9 @@ public class SetupWizardUtils {
disableComponent(context, ChooseDataSimActivity.class);
} else if (!SetupWizardUtils.isMultiSimDevice(context)) {
disableComponent(context, ChooseDataSimActivity.class);
} else if (simMissing()) {
disableComponent(context, MobileDataActivity.class);
disableComponent(context, ChooseDataSimActivity.class);
}
if (!SetupWizardUtils.hasWifi(context)) {
disableComponent(context, WifiSetupActivity.class);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment