diff options
| author | 2023-06-19 09:44:58 +0000 | |
|---|---|---|
| committer | 2023-06-19 09:44:58 +0000 | |
| commit | ee4446c09ea7c02da0dc5df20a6c9fa36e8c57f0 (patch) | |
| tree | b3a7fc12341d273ebf5143aa99642922e3e16ef7 | |
| parent | 540962a60ac38757123a8988c4d441848c7dbf93 (diff) | |
| parent | f74fde197586486ce88445d2eb0db89a084c3722 (diff) | |
Merge "Use HwLight.type as the key of mLightsByType"
| -rw-r--r-- | services/core/java/com/android/server/lights/LightsService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/lights/LightsService.java b/services/core/java/com/android/server/lights/LightsService.java index 91f14de040fe..6c8ba1609f50 100644 --- a/services/core/java/com/android/server/lights/LightsService.java +++ b/services/core/java/com/android/server/lights/LightsService.java @@ -465,9 +465,10 @@ public class LightsService extends SystemService { } 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) { - mLightsByType[type] = mLightsById.valueAt(i); + mLightsByType[type] = light; } } } |