Merge "Temporary NPE mitigation." into tm-dev

This commit is contained in:
TreeHugger Robot
2022-04-05 01:45:12 +00:00
committed by Android (Google) Code Review

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);
}
}
}
}