Merge "Add accessibility appearance related B&R function for Onboarding" into main
diff --git a/src/com/android/settings/backup/SettingsBackupHelper.java b/src/com/android/settings/backup/SettingsBackupHelper.java
index 556ab72..73760a4 100644
--- a/src/com/android/settings/backup/SettingsBackupHelper.java
+++ b/src/com/android/settings/backup/SettingsBackupHelper.java
@@ -28,19 +28,30 @@
/** Backup agent for Settings APK */
public class SettingsBackupHelper extends BackupAgentHelper {
public static final String SOUND_BACKUP_HELPER = "SoundSettingsBackup";
+ public static final String ACCESSIBILITY_APPEARANCE_BACKUP_HELPER =
+ "AccessibilityAppearanceSettingsBackup";
@Override
public void onCreate() {
super.onCreate();
BackupRestoreStorageManager.getInstance(this).addBackupAgentHelpers(this);
+ OnboardingFeatureProvider onboardingFeatureProvider =
+ FeatureFactory.getFeatureFactory().getOnboardingFeatureProvider();
+
if (Flags.enableSoundBackup()) {
- OnboardingFeatureProvider onboardingFeatureProvider =
- FeatureFactory.getFeatureFactory().getOnboardingFeatureProvider();
if (onboardingFeatureProvider != null) {
addHelper(SOUND_BACKUP_HELPER, onboardingFeatureProvider.
getSoundBackupHelper(this, this.getBackupRestoreEventLogger()));
}
}
+
+ if (Flags.accessibilityAppearanceSettingsBackupEnabled()) {
+ if (onboardingFeatureProvider != null) {
+ addHelper(ACCESSIBILITY_APPEARANCE_BACKUP_HELPER,
+ onboardingFeatureProvider.getAccessibilityAppearanceBackupHelper(
+ this, this.getBackupRestoreEventLogger()));
+ }
+ }
}
@Override
diff --git a/src/com/android/settings/onboarding/OnboardingFeatureProvider.kt b/src/com/android/settings/onboarding/OnboardingFeatureProvider.kt
index f76e29a..58afb25 100644
--- a/src/com/android/settings/onboarding/OnboardingFeatureProvider.kt
+++ b/src/com/android/settings/onboarding/OnboardingFeatureProvider.kt
@@ -39,4 +39,12 @@
* @param logger To log B&R stats.
*/
fun getSoundBackupHelper(context: Context, logger: BackupRestoreEventLogger): BackupHelper
+
+ /**
+ * Return a BackupHelper for backup accessibility appearance related settings.
+ *
+ * @param context App context
+ * @param logger To log B&R stats.
+ */
+ fun getAccessibilityAppearanceBackupHelper(context: Context, logger: BackupRestoreEventLogger): BackupHelper
}
\ No newline at end of file