summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserActivity.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-07-17 12:35:21 -0700
committerJohn Reck <jreck@google.com>2011-07-17 12:35:21 -0700
commitd156adfc7abd9667fed08fd2c9c065d480b0f457 (patch)
tree292e90ff81c90a6ec971f60d2ba3aeef667dc68b /src/com/android/browser/BrowserActivity.java
parenta48377d67a3568a7e117f2c4011cd49a871bd13c (diff)
downloadpackages_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.java5
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);
}