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

Commit faab6f2c authored by Darrell Shi's avatar Darrell Shi
Browse files

Backup lockscreen widgets on mobile

This change allows lockscreen widgets to be backed up on mobile by
checking the new flag and config in addition to the config used on
tablets.

Fix: 395239759
Test: verified widgets are backed up and restored on a felix; there are
no exiting unit test for the system ui backup helper
Flag: com.android.systemui.glanceable_hub_v2

Change-Id: I2083d9e7667c4cb4d33a3a149234c25353e47fa8
parent 2ba3a051
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.ParcelFileDescriptor
import android.os.UserHandle
import android.util.Log
import com.android.app.tracing.traceSection
import com.android.systemui.Flags
import com.android.systemui.backup.BackupHelper.Companion.ACTION_RESTORE_FINISHED
import com.android.systemui.communal.data.backup.CommunalBackupHelper
import com.android.systemui.communal.data.backup.CommunalBackupUtils
@@ -118,7 +119,9 @@ open class BackupHelper : BackupAgentHelper() {
    }

    private fun communalEnabled(): Boolean {
        return resources.getBoolean(R.bool.config_communalServiceEnabled)
        return resources.getBoolean(R.bool.config_communalServiceEnabled) ||
            (Flags.glanceableHubV2() &&
                resources.getBoolean(com.android.internal.R.bool.config_glanceableHubEnabled))
    }

    /**