am 77a6080a: am b5858bbd: Fix NPE in rotation lock content observer.

* commit '77a6080aebc9754bff2307edc1998bd54657fbb5':
  Fix NPE in rotation lock content observer.
This commit is contained in:
Jeff Brown
2012-06-12 14:52:43 -07:00
committed by Android Git Automerger

View File

@@ -449,8 +449,11 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
}
private void updateLockScreenRotationCheckbox() {
mToggleLockScreenRotationPreference.setChecked(
!RotationPolicy.isRotationLocked(getActivity()));
Context context = getActivity();
if (context != null) {
mToggleLockScreenRotationPreference.setChecked(
!RotationPolicy.isRotationLocked(context));
}
}
private void offerInstallAccessibilitySerivceOnce() {