Don't verify secondary setting on restore
It'll already be verified as the primary setting of another
managed services type, and it will have a different service
interface, so it shouldn't be overwritten with the primary setting's
service information.
Fixes: 38236571
Test: restore a device. make sure the backup has vr notification
listener permissions on (or any other pkg with both a notification
listener and a condition provider) and some other enabled
notification listener (like a launcher). make sure both
listeners are enabled post restore.
Change-Id: I2e919c2bb06695a3326269571a901ed627c8bee6
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index b8d633f..73a365b 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -221,7 +221,9 @@
restoredSettingName(element),
newValue,
userid);
- updateSettingsAccordingToInstalledServices(element, userid);
+ if (mConfig.secureSettingName.equals(element)) {
+ updateSettingsAccordingToInstalledServices(element, userid);
+ }
rebuildRestoredPackages();
}
}