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,11 +1421,14 @@ public final class InputManager {
} }
mInputDevices = new SparseArray<InputDevice>(); mInputDevices = new SparseArray<InputDevice>();
// TODO(b/223905476): remove when the rootcause is fixed.
if (ids != null) {
for (int i = 0; i < ids.length; i++) { for (int i = 0; i < ids.length; i++) {
mInputDevices.put(ids[i], null); mInputDevices.put(ids[i], null);
} }
} }
} }
}
private void onInputDevicesChanged(int[] deviceIdAndGeneration) { private void onInputDevicesChanged(int[] deviceIdAndGeneration) {
if (DEBUG) { if (DEBUG) {