Merge "NullPointerException when running monkey test in IccLockSettings"

This commit is contained in:
Treehugger Robot
2017-06-01 18:51:43 +00:00
committed by Gerrit Code Review

View File

@@ -247,11 +247,15 @@ public class IccLockSettings extends SettingsPreferenceFragment
} }
private void updatePreferences() { private void updatePreferences() {
mPinDialog.setEnabled(mPhone != null); if (mPinDialog != null) {
mPinToggle.setEnabled(mPhone != null); mPinDialog.setEnabled(mPhone != null);
}
if (mPinToggle != null) {
mPinToggle.setEnabled(mPhone != null);
if (mPhone != null) { if (mPhone != null) {
mPinToggle.setChecked(mPhone.getIccCard().getIccLockEnabled()); mPinToggle.setChecked(mPhone.getIccCard().getIccLockEnabled());
}
} }
} }