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

Commit 9d703935 authored by Joël Stemmer's avatar Joël Stemmer
Browse files

Add `onRestoreFile` overload that takes a `FullRestoreDataInput` param

The `BackupAgent#onRestoreFile` method takes a number of parameters
related to the file being restored. We need to add some additional
parameters, for example the app version code (which is also passed to
`onRestore`) or transport flags. Rather than adding another overload
with all these additional parameters, we're taking the same approach as
we did with `onFullBackup` and define a new class that contains all
these parameters. This should also help us avoid adding more overloads
in case we want to add another parameter in the future.

This change only introduces the necessary API changes, but the new
parameters are all set to their default values. A follow up change will
modify the IBackupAgent.aidl and pass through the parameters from the
restore engine, which also requires updating non-backup owned code.

Bug: 403956528
Test: atest BackupAgentTest.java
Flag: com.android.server.backup.enable_cross_platform_transfer
API-Coverage-Bug: 430585746

Change-Id: Ic6e6235e782a47d1a6a722e99bc9976fce15fdc4
parent 4f90555c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment