Merge "Leave SettingsProvider running if cloning of a setting fails" into lmp-dev
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 4ef2189..30ccd2c 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -789,8 +789,15 @@
Slog.v(TAG, "putting to additional user "
+ mManagedProfiles.get(i).id);
}
- insertForUser(Settings.Secure.CONTENT_URI, values,
- mManagedProfiles.get(i).id);
+ try {
+ insertForUser(Settings.Secure.CONTENT_URI, values,
+ mManagedProfiles.get(i).id);
+ } catch (SecurityException e) {
+ // Temporary fix, see b/17450158
+ Slog.w(TAG, "Cannot clone request '" + request + "' with value '"
+ + newValue + "' to managed profile (id "
+ + mManagedProfiles.get(i).id + ")", e);
+ }
}
} finally {
Binder.restoreCallingIdentity(token);