Backup / Restore locale preference.
Also backup development settings MOCK_LOCATION and USB_DEBUGGING.
Backup and restore more of the Audio settings. Won't work yet without a reboot.
Disable Wifi supplicant restore temporarily. It seems to be disabling Wifi due to
permissions problems.
Don't restore Ringtones.
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index a21bf32..2abf8b3 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -18,7 +18,7 @@
import java.io.FileNotFoundException;
-import android.backup.IBackupManager;
+import android.backup.BackupManager;
import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
@@ -46,6 +46,8 @@
private static final String TABLE_OLD_FAVORITES = "old_favorites";
private DatabaseHelper mOpenHelper;
+
+ private BackupManager mBackupManager;
/**
* Decode a content URL into the table, projection, and arguments
@@ -140,16 +142,7 @@
}
// Inform the backup manager about a data change
- IBackupManager ibm = IBackupManager.Stub.asInterface(
- ServiceManager.getService(Context.BACKUP_SERVICE));
- if (ibm != null) {
- try {
- ibm.dataChanged(getContext().getPackageName());
- } catch (Exception e) {
- // Try again later
- }
- }
-
+ mBackupManager.dataChanged();
// Now send the notification through the content framework.
String notify = uri.getQueryParameter("notify");
@@ -189,6 +182,7 @@
@Override
public boolean onCreate() {
mOpenHelper = new DatabaseHelper(getContext());
+ mBackupManager = new BackupManager(getContext());
return true;
}