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

Commit 63f53d58 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use HwLight.type as the key of mLightsByType" am: ee4446c0 am:...

Merge "Use HwLight.type as the key of mLightsByType" am: ee4446c0 am: 9b53553c am: afea9341 am: 81945db9

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2198763



Change-Id: I69fa3fa7b896611bd2102117c7eb4dbd0414d9e9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a151336d 81945db9
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -465,9 +465,10 @@ public class LightsService extends SystemService {
        }
        }


        for (int i = mLightsById.size() - 1; i >= 0; i--) {
        for (int i = mLightsById.size() - 1; i >= 0; i--) {
            final int type = mLightsById.keyAt(i);
            LightImpl light = mLightsById.valueAt(i);
            final int type = light.mHwLight.type;
            if (0 <= type && type < mLightsByType.length) {
            if (0 <= type && type < mLightsByType.length) {
                mLightsByType[type] = mLightsById.valueAt(i);
                mLightsByType[type] = light;
            }
            }
        }
        }
    }
    }