diff options
author | John Reck <jreck@google.com> | 2011-07-17 12:35:21 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-07-17 12:35:21 -0700 |
commit | d156adfc7abd9667fed08fd2c9c065d480b0f457 (patch) | |
tree | 292e90ff81c90a6ec971f60d2ba3aeef667dc68b /src/com/android/browser/BrowserActivity.java | |
parent | a48377d67a3568a7e117f2c4011cd49a871bd13c (diff) | |
download | packages_apps_Browser-d156adfc7abd9667fed08fd2c9c065d480b0f457.zip packages_apps_Browser-d156adfc7abd9667fed08fd2c9c065d480b0f457.tar.gz packages_apps_Browser-d156adfc7abd9667fed08fd2c9c065d480b0f457.tar.bz2 |
Null check
Bug: 5021967
Check if ACCESSIBILITY_SERVICE is null. Documentation claims this
is acceptable, and it probably is happening due to low memory
Change-Id: Ie12059236baedd8b149831ad24da74f79453fae8
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 1e1698b..b6d269d 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -79,8 +79,9 @@ public class BrowserActivity extends Activity { return; } - if (((AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE)) - .isEnabled()) { + AccessibilityManager accessibilityManager = (AccessibilityManager) + getSystemService(ACCESSIBILITY_SERVICE); + if (accessibilityManager != null && accessibilityManager.isEnabled()) { setDefaultKeyMode(DEFAULT_KEYS_DISABLE); } |