Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d061457 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Remove redundant array allocation.

Fix: 266550596
Test: atest InputControllerTest
Change-Id: I64daddb6f3f397e6d5979db3b9fb0e0865f04df4
parent 319a5201
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -338,9 +338,7 @@ class InputController {
        }

        synchronized (mLock) {
            InputDeviceDescriptor[] values = mInputDeviceDescriptors.values().toArray(
                    new InputDeviceDescriptor[0]);
            for (InputDeviceDescriptor value : values) {
            for (InputDeviceDescriptor value : mInputDeviceDescriptors.values()) {
                if (value.mName.equals(deviceName)) {
                    throw new DeviceCreationException(
                            "Input device name already in use: " + deviceName);