From 5ddacf2d026fe06c618f04346096bc2789d5d431 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 30 May 2017 15:36:49 -0400 Subject: [PATCH] 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 --- .../java/com/android/server/notification/ManagedServices.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java index b8d633fc666f3..73a365b0da721 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 @@ abstract public class ManagedServices { restoredSettingName(element), newValue, userid); - updateSettingsAccordingToInstalledServices(element, userid); + if (mConfig.secureSettingName.equals(element)) { + updateSettingsAccordingToInstalledServices(element, userid); + } rebuildRestoredPackages(); } }