summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2009-07-08 20:04:55 -0700
committerAmith Yamasani <yamasani@google.com>2009-07-09 12:01:25 -0700
commitd158214511a3c04753de04fa6389e46d33135c38 (patch)
tree50159ba5683d2685572a97bbd90659d259e76e3c /packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
parent8a715b4b791db4390d12e0ded02280592634a424 (diff)
downloadframeworks_base-d158214511a3c04753de04fa6389e46d33135c38.zip
frameworks_base-d158214511a3c04753de04fa6389e46d33135c38.tar.gz
frameworks_base-d158214511a3c04753de04fa6389e46d33135c38.tar.bz2
Restore audio settings and wifi.
Optimize backups by writing an entity only if the checksum of the data has changed. Call into the hidden AudioService API to apply changed audio settings. After restoring wifi data, make sure that the permissions and ownership are set properly for the supplicant process to access it. Locale isn't restoring properly - TODO added.
Diffstat (limited to 'packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 2abf8b3..c0de9a5 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -126,11 +126,14 @@ public class SettingsProvider extends ContentProvider {
// a notification and then using the contract class to get their data,
// the system property will be updated and they'll get the new data.
+ boolean backedUpDataChanged = false;
String property = null, table = uri.getPathSegments().get(0);
if (table.equals("system")) {
property = Settings.System.SYS_PROP_SETTING_VERSION;
+ backedUpDataChanged = true;
} else if (table.equals("secure")) {
property = Settings.Secure.SYS_PROP_SETTING_VERSION;
+ backedUpDataChanged = true;
} else if (table.equals("gservices")) {
property = Settings.Gservices.SYS_PROP_SETTING_VERSION;
}
@@ -142,7 +145,9 @@ public class SettingsProvider extends ContentProvider {
}
// Inform the backup manager about a data change
- mBackupManager.dataChanged();
+ if (backedUpDataChanged) {
+ mBackupManager.dataChanged();
+ }
// Now send the notification through the content framework.
String notify = uri.getQueryParameter("notify");