Add onCreate method to SystemBackup agent that receives UserHandle.

This is done for go/br-framework-multi-user.

Bug:117590564
Test: Builds.
Change-Id: I7af0f7c604979da03efc3d88dbed2b2c9631bace
This commit is contained in:
Stefanot
2018-10-11 12:07:53 +01:00
parent 348a460038
commit 14bbdedec0

View File

@@ -29,6 +29,7 @@ import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
@@ -221,6 +222,18 @@ public abstract class BackupAgent extends ContextWrapper {
public void onCreate() {
}
/**
* Provided as a convenience for agent implementations that need an opportunity
* to do one-time initialization before the actual backup or restore operation
* is begun with information about the calling user.
* <p>
*
* @hide
*/
public void onCreate(UserHandle user) {
onCreate();
}
/**
* Provided as a convenience for agent implementations that need to do some
* sort of shutdown process after backup or restore is completed.