SetupWizard: Catch exceptions reading key disabler

Change-Id: Ib86e71ec9358db88ff4bcddd9cf26e2dd5b0b817
This commit is contained in:
cretin45 2015-01-30 13:57:27 -08:00
parent a912fa829f
commit 1e23a8f801
1 changed files with 9 additions and 1 deletions

View File

@ -152,6 +152,14 @@ public class CyanogenSettingsPage extends SetupPage {
} }
} }
private static boolean isKeyDisablerActive() {
try {
return KeyDisabler.isActive();
} catch (Exception e) {
return false;
}
}
private static boolean hideWhisperPush(Context context) { private static boolean hideWhisperPush(Context context) {
final int playServicesAvailable = GooglePlayServicesUtil final int playServicesAvailable = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(context); .isGooglePlayServicesAvailable(context);
@ -243,7 +251,7 @@ public class CyanogenSettingsPage extends SetupPage {
mNavKeysRow.setVisibility(View.GONE); mNavKeysRow.setVisibility(View.GONE);
} else { } else {
boolean navKeysDisabled = boolean navKeysDisabled =
KeyDisabler.isActive(); isKeyDisablerActive();
mNavKeys.setChecked(navKeysDisabled); mNavKeys.setChecked(navKeysDisabled);
} }
mSecureSmsRow = mRootView.findViewById(R.id.secure_sms); mSecureSmsRow = mRootView.findViewById(R.id.secure_sms);