Let the BackupManager know that we use client-side encryption

This commit is contained in:
Torsten Grote 2019-06-14 11:40:03 -03:00
parent 2f2fba8305
commit 84d91290ac
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -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.ContentProviderRestoreComponent;
import static android.app.backup.BackupAgent.FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
import static android.os.Build.VERSION.SDK_INT;
/**
* @author Steve Soltys
*/
@ -52,6 +55,12 @@ public class ConfigurableBackupTransport extends BackupTransport {
return this.getClass().getName();
}
@Override
public int getTransportFlags() {
if (SDK_INT >= 28) return FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED;
return 0;
}
@Override
public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) {
// TODO re-include key-value (incremental)