Let the BackupManager know that we use client-side encryption
This commit is contained in:
parent
2f2fba8305
commit
84d91290ac
1 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,9 @@ import com.stevesoltys.backup.transport.component.RestoreComponent;
|
||||||
import com.stevesoltys.backup.transport.component.provider.ContentProviderBackupComponent;
|
import com.stevesoltys.backup.transport.component.provider.ContentProviderBackupComponent;
|
||||||
import com.stevesoltys.backup.transport.component.provider.ContentProviderRestoreComponent;
|
import com.stevesoltys.backup.transport.component.provider.ContentProviderRestoreComponent;
|
||||||
|
|
||||||
|
import static android.app.backup.BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
|
||||||
|
import static android.os.Build.VERSION.SDK_INT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Steve Soltys
|
* @author Steve Soltys
|
||||||
*/
|
*/
|
||||||
|
@ -52,6 +55,12 @@ public class ConfigurableBackupTransport extends BackupTransport {
|
||||||
return this.getClass().getName();
|
return this.getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTransportFlags() {
|
||||||
|
if (SDK_INT >= 28) return FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) {
|
public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) {
|
||||||
// TODO re-include key-value (incremental)
|
// TODO re-include key-value (incremental)
|
||||||
|
|
Loading…
Reference in a new issue