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
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user