diff options
author | Svet Ganov <svetoslavganov@google.com> | 2014-12-11 22:59:08 -0800 |
---|---|---|
committer | Svet Ganov <svetoslavganov@google.com> | 2014-12-11 22:59:12 -0800 |
commit | 09687064f4cf681d2aa299c393e32f22fc013c96 (patch) | |
tree | d5f2e6e939f1fdbb1ca8c2f1c29b673ba5df4ea5 /services | |
parent | 8b33cf4d34a9ea75e1121ee2f1d829b21f3cb5d6 (diff) | |
download | frameworks_base-09687064f4cf681d2aa299c393e32f22fc013c96.zip frameworks_base-09687064f4cf681d2aa299c393e32f22fc013c96.tar.gz frameworks_base-09687064f4cf681d2aa299c393e32f22fc013c96.tar.bz2 |
Fix a NPE in AccessiiblityManagerService.
It is possible that the accessibility windows list is null which
is treated as if there is no window information. The getWindows
method was accessing properties of the windows filed witgout a
null check.
bug:18522998
Change-Id: Ieefe678d3da3d6e8f96c0e4bedac0c55975621fa
Diffstat (limited to 'services')
-rw-r--r-- | services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index 89aebe8..698d474 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -2145,6 +2145,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if (!permissionGranted) { return null; } + if (mSecurityPolicy.mWindows == null) { + return null; + } List<AccessibilityWindowInfo> windows = new ArrayList<>(); final int windowCount = mSecurityPolicy.mWindows.size(); for (int i = 0; i < windowCount; i++) { |