public abstract class

MAMBackupAgent

extends BackupAgent
implements HookedBackupAgent
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.backup.BackupAgent
         ↳ com.microsoft.intune.mam.client.app.backup.MAMBackupAgent
Known Direct Subclasses

Class Overview

MAM version of BackupAgent.

Summary

[Expand]
Inherited Constants
From class android.app.backup.BackupAgent
From class android.content.Context
Public Constructors
MAMBackupAgent()
Public Methods
final void backupMAMFileIdentity(BackupDataOutput data, File... files)
Backs up the identity for the given files.
final void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
final void onCreate()
final void onFullBackup(FullBackupDataOutput data)
abstract void onMAMBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
void onMAMCreate()
void onMAMFullBackup(FullBackupDataOutput data)
void onMAMRestore(MAMBackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
void onMAMRestore(MAMBackupDataInput data, long appVersionCode, ParcelFileDescriptor newState)
void onMAMRestoreFile(ParcelFileDescriptor data, long size, File destination, int type, long mode, long mtime)
void onMAMRestoreFinished()
MAM version of onRestoreFinished.
final void onRestore(BackupDataInput data, long appVersionCode, ParcelFileDescriptor newState)
final void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
final void onRestoreFile(ParcelFileDescriptor data, long size, File destination, int type, long mode, long mtime)
final void onRestoreFinished()
Called when restore is finished only on API 21 and up.
Protected Methods
void attachBaseContext(Context context)
[Expand]
Inherited Methods
From class android.app.backup.BackupAgent
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface com.microsoft.intune.mam.client.app.backup.HookedBackupAgent

Public Constructors

public MAMBackupAgent ()

Public Methods

public final void backupMAMFileIdentity (BackupDataOutput data, File... files)

Backs up the identity for the given files. Upon app restore, the identities for these files will be automatically restored. Important: in your implementation of onMAMBackup, if you use this function at some point, you also need to call BackupDataOutput#readNextHeader to iterate through all the backup entities and follow the other steps recommended in the Android Developer Data Backup Guide.

Parameters
data The backup container being written to.
files The files whose identities are to be backed up.

public final void onBackup (ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)

Throws
IOException

public final void onCreate ()

public final void onFullBackup (FullBackupDataOutput data)

Throws
IOException

public abstract void onMAMBackup (ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)

Throws
IOException

public void onMAMCreate ()

public void onMAMFullBackup (FullBackupDataOutput data)

Throws
IOException

public void onMAMRestore (MAMBackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)

Throws
IOException

public void onMAMRestore (MAMBackupDataInput data, long appVersionCode, ParcelFileDescriptor newState)

Throws
IOException

public void onMAMRestoreFile (ParcelFileDescriptor data, long size, File destination, int type, long mode, long mtime)

Throws
IOException

public void onMAMRestoreFinished ()

MAM version of onRestoreFinished.

public final void onRestore (BackupDataInput data, long appVersionCode, ParcelFileDescriptor newState)

Throws
IOException

public final void onRestore (BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)

Throws
IOException

public final void onRestoreFile (ParcelFileDescriptor data, long size, File destination, int type, long mode, long mtime)

Throws
IOException

public final void onRestoreFinished ()

Called when restore is finished only on API 21 and up.

Protected Methods

protected void attachBaseContext (Context context)