Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38eb00d6 authored by Bagus Maulana's avatar Bagus Maulana
Browse files

Disable SliceBackupHelper on devices with FEATURE_SLICES_DISABLED

Slices feature is disabled in Wear (ag/9542360)

Bug: 275378908
Test: flashed on watch, "handling new helper 'slices'" not in logcat
Change-Id: Icafd33679c0efbd0c4f62bd846f8b50419f5778f
parent ed3fb82e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.app.backup.FullBackup;
import android.app.backup.FullBackupDataOutput;
import android.app.backup.WallpaperBackupHelper;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -124,7 +125,9 @@ public class SystemBackupAgent extends BackupAgentHelper {
        addHelperIfEligibleForUser(USAGE_STATS_HELPER, new UsageStatsBackupHelper(mUserId));
        addHelperIfEligibleForUser(SHORTCUT_MANAGER_HELPER, new ShortcutBackupHelper(mUserId));
        addHelperIfEligibleForUser(ACCOUNT_MANAGER_HELPER, new AccountManagerBackupHelper(mUserId));
        if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_SLICES_DISABLED)) {
            addHelperIfEligibleForUser(SLICES_HELPER, new SliceBackupHelper(this));
        }
        addHelperIfEligibleForUser(PEOPLE_HELPER, new PeopleBackupHelper(mUserId));
        addHelperIfEligibleForUser(APP_LOCALES_HELPER, new AppSpecificLocalesBackupHelper(mUserId));
        addHelperIfEligibleForUser(APP_GENDER_HELPER,