diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-06-12 12:57:11 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-06-12 12:57:11 -0700 |
commit | b5858bbdc363e21bf87ac5643822ec9e57956c52 (patch) | |
tree | cd0d85b51d8f49fa9ce3211066255e2be470b270 /src | |
parent | 00808b0280d78d0930650e39eaf21a38915da5be (diff) | |
download | packages_apps_settings-b5858bbdc363e21bf87ac5643822ec9e57956c52.zip packages_apps_settings-b5858bbdc363e21bf87ac5643822ec9e57956c52.tar.gz packages_apps_settings-b5858bbdc363e21bf87ac5643822ec9e57956c52.tar.bz2 |
Fix NPE in rotation lock content observer.
Bug: 6647846
Change-Id: Idd17edb78f451807eabdd988017b68ce02b9c75f
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/AccessibilitySettings.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java index 149e336..6167f78 100644 --- a/src/com/android/settings/AccessibilitySettings.java +++ b/src/com/android/settings/AccessibilitySettings.java @@ -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() { |