Class MAMSharedPreferencesBackupHelper

  • All Implemented Interfaces:
    android.app.backup.BackupHelper , com.microsoft.intune.mam.client.app.backup.HookedBackupHelper , com.microsoft.intune.mam.client.app.backup.HookedSharedPreferencesBackupHelper

    
    public final class MAMSharedPreferencesBackupHelper
    extends SharedPreferencesBackupHelper implements HookedSharedPreferencesBackupHelper
                        

    MAM version of SharedPreferencesBackupHelper.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<String> getFileNames() Get the file names associated with this backup helper.
      Context getContext() Get the context this helper was created with.
      boolean isValid() Determines whether this backup helper is in a good state and should be backed up.
      void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
      File getRootDirectory() Returns the directory where the files that this helper backs up exist.
      • Methods inherited from class android.app.backup.SharedPreferencesBackupHelper

        restoreEntity, writeNewStateDescription
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MAMSharedPreferencesBackupHelper

        MAMSharedPreferencesBackupHelper(Context context, Array<String> prefGroups)

        Creates a MAMSharedPreferencesBackupHelper to assist in backing up files.

        Parameters:
        context - the app's context.
        prefGroups - the preferences this helper will backup.
    • Method Detail

      • getFileNames

         Array<String> getFileNames()

        Get the file names associated with this backup helper.

        Returns:

        the file names.

      • getContext

         Context getContext()

        Get the context this helper was created with.

        Returns:

        the context.

      • isValid

         boolean isValid()

        Determines whether this backup helper is in a good state and should be backed up.

        Returns:

        true if it is in a good state, false otherwise.

      • performBackup

         void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState)
      • getRootDirectory

         File getRootDirectory()

        Returns the directory where the files that this helper backs up exist.

        Returns:

        the directory where the files that this helper backs up exist.