Merge "Implement B&R for locale notification" into main
This commit is contained in:
@@ -16,10 +16,13 @@
|
|||||||
|
|
||||||
package com.android.settings.backup;
|
package com.android.settings.backup;
|
||||||
|
|
||||||
|
import static com.android.settings.localepicker.LocaleNotificationDataManager.LOCALE_NOTIFICATION;
|
||||||
|
|
||||||
import android.app.backup.BackupAgentHelper;
|
import android.app.backup.BackupAgentHelper;
|
||||||
import android.app.backup.BackupDataInputStream;
|
import android.app.backup.BackupDataInputStream;
|
||||||
import android.app.backup.BackupDataOutput;
|
import android.app.backup.BackupDataOutput;
|
||||||
import android.app.backup.BackupHelper;
|
import android.app.backup.BackupHelper;
|
||||||
|
import android.app.backup.SharedPreferencesBackupHelper;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
|
|
||||||
import com.android.settings.fuelgauge.BatteryBackupHelper;
|
import com.android.settings.fuelgauge.BatteryBackupHelper;
|
||||||
@@ -33,12 +36,15 @@ import java.io.IOException;
|
|||||||
* Backup agent for Settings APK
|
* Backup agent for Settings APK
|
||||||
*/
|
*/
|
||||||
public class SettingsBackupHelper extends BackupAgentHelper {
|
public class SettingsBackupHelper extends BackupAgentHelper {
|
||||||
|
private static final String PREF_LOCALE_NOTIFICATION = "localeNotificationSharedPref";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
addHelper("no-op", new NoOpHelper());
|
addHelper("no-op", new NoOpHelper());
|
||||||
addHelper(BatteryBackupHelper.TAG, new BatteryBackupHelper(this));
|
addHelper(BatteryBackupHelper.TAG, new BatteryBackupHelper(this));
|
||||||
|
addHelper(PREF_LOCALE_NOTIFICATION,
|
||||||
|
new SharedPreferencesBackupHelper(this, LOCALE_NOTIFICATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -31,7 +31,7 @@ import java.util.Map;
|
|||||||
* information.
|
* information.
|
||||||
*/
|
*/
|
||||||
public class LocaleNotificationDataManager {
|
public class LocaleNotificationDataManager {
|
||||||
private static final String LOCALE_NOTIFICATION = "locale_notification";
|
public static final String LOCALE_NOTIFICATION = "locale_notification";
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user