From b77ef77d3cb488ba4f1844d0d26adfffbc9725ea Mon Sep 17 00:00:00 2001 From: Evan Severson Date: Fri, 12 Feb 2021 12:07:40 -0800 Subject: [PATCH] Fix parsing in sensorprivacyservice Test: reboot Fixes: 178329882 Change-Id: I46e91e15a895816d5a261a806a4e4fe6d96c78a4 --- services/core/java/com/android/server/SensorPrivacyService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/SensorPrivacyService.java b/services/core/java/com/android/server/SensorPrivacyService.java index 0aee78050929e..7f0b9621bb36b 100644 --- a/services/core/java/com/android/server/SensorPrivacyService.java +++ b/services/core/java/com/android/server/SensorPrivacyService.java @@ -568,7 +568,7 @@ public final class SensorPrivacyService extends SystemService { // User may no longer exist or isn't set continue; } - int sensor = parser.getAttributeIndex(null, XML_ATTRIBUTE_SENSOR); + int sensor = parser.getAttributeInt(null, XML_ATTRIBUTE_SENSOR); boolean isEnabled = parser.getAttributeBoolean(null, XML_ATTRIBUTE_ENABLED); SparseBooleanArray userIndividualEnabled = individualEnabled.get(