Implement B&R for locale notification

Bug: 275306477
Test: by manual
Change-Id: I11471227a1c9263846f9451002d1ef149b460f7d
This commit is contained in:
Allen Su
2023-10-05 09:28:37 +00:00
parent 7b31a7a612
commit 00c40d85cd
2 changed files with 7 additions and 1 deletions

View File

@@ -16,10 +16,13 @@
package com.android.settings.backup;
import static com.android.settings.localepicker.LocaleNotificationDataManager.LOCALE_NOTIFICATION;
import android.app.backup.BackupAgentHelper;
import android.app.backup.BackupDataInputStream;
import android.app.backup.BackupDataOutput;
import android.app.backup.BackupHelper;
import android.app.backup.SharedPreferencesBackupHelper;
import android.os.ParcelFileDescriptor;
import com.android.settings.fuelgauge.BatteryBackupHelper;
@@ -33,12 +36,15 @@ import java.io.IOException;
* Backup agent for Settings APK
*/
public class SettingsBackupHelper extends BackupAgentHelper {
private static final String PREF_LOCALE_NOTIFICATION = "localeNotificationSharedPref";
@Override
public void onCreate() {
super.onCreate();
addHelper("no-op", new NoOpHelper());
addHelper(BatteryBackupHelper.TAG, new BatteryBackupHelper(this));
addHelper(PREF_LOCALE_NOTIFICATION,
new SharedPreferencesBackupHelper(this, LOCALE_NOTIFICATION));
}
@Override

View File

@@ -31,7 +31,7 @@ import java.util.Map;
* information.
*/
public class LocaleNotificationDataManager {
private static final String LOCALE_NOTIFICATION = "locale_notification";
public static final String LOCALE_NOTIFICATION = "locale_notification";
private Context mContext;
/**