Temporary NPE mitigation.

To unblock failing presubmit. The team is working on the real fix.

Bug: 223905476
Test: presubmit
Change-Id: I713eac26f375ced798c9d02a47841645e39c907e
This commit is contained in:
Alex Buynytskyy
2022-04-04 13:14:37 -07:00
parent aea49e77fd
commit b1b99c28cf

View File

@@ -1421,8 +1421,11 @@ public final class InputManager {
}
mInputDevices = new SparseArray<InputDevice>();
for (int i = 0; i < ids.length; i++) {
mInputDevices.put(ids[i], null);
// TODO(b/223905476): remove when the rootcause is fixed.
if (ids != null) {
for (int i = 0; i < ids.length; i++) {
mInputDevices.put(ids[i], null);
}
}
}
}