From 1e23a8f80119726aa0bf0cb576e5c932db9c7e6c Mon Sep 17 00:00:00 2001 From: cretin45 Date: Fri, 30 Jan 2015 13:57:27 -0800 Subject: [PATCH] SetupWizard: Catch exceptions reading key disabler Change-Id: Ib86e71ec9358db88ff4bcddd9cf26e2dd5b0b817 --- .../setupwizard/setup/CyanogenSettingsPage.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java index ab7c07f..8128968 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java @@ -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) { final int playServicesAvailable = GooglePlayServicesUtil .isGooglePlayServicesAvailable(context); @@ -243,7 +251,7 @@ public class CyanogenSettingsPage extends SetupPage { mNavKeysRow.setVisibility(View.GONE); } else { boolean navKeysDisabled = - KeyDisabler.isActive(); + isKeyDisablerActive(); mNavKeys.setChecked(navKeysDisabled); } mSecureSmsRow = mRootView.findViewById(R.id.secure_sms);