diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java index df27d583d3610..c983d4f687106 100644 --- a/core/java/android/app/backup/BackupAgent.java +++ b/core/java/android/app/backup/BackupAgent.java @@ -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. + *
+ * + * @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.