Fix incorrect index usage in SensorPrivacyService init
TODO: Add test coverage for service init
Merged-In: I0ce26eda21035a34f1cb09a71c94ee84301aef84
Change-Id: I0ce26eda21035a34f1cb09a71c94ee84301aef84
Test: None yet
Bug: 186578100
(cherry picked from commit adb86329d8)
This commit is contained in:
@@ -203,7 +203,7 @@ public final class SensorPrivacyService extends SystemService {
|
||||
SparseBooleanArray userIndividualEnabled =
|
||||
mIndividualEnabled.valueAt(i);
|
||||
for (int j = 0; j < userIndividualEnabled.size(); j++) {
|
||||
int sensor = userIndividualEnabled.keyAt(i);
|
||||
int sensor = userIndividualEnabled.keyAt(j);
|
||||
boolean enabled = userIndividualEnabled.valueAt(j);
|
||||
setUserRestriction(userId, sensor, enabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user