Loading api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6293,6 +6293,7 @@ package android.app.backup { method public static void dataChanged(java.lang.String); method public long getAvailableRestoreToken(java.lang.String); method public java.lang.String getCurrentTransport(); method public boolean isAppEligibleForBackup(java.lang.String); method public boolean isBackupEnabled(); method public java.lang.String[] listAllTransports(); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver); Loading Loading @@ -6342,6 +6343,7 @@ package android.app.backup { method public int getNextFullRestoreDataChunk(android.os.ParcelFileDescriptor); method public int getRestoreData(android.os.ParcelFileDescriptor); method public int initializeDevice(); method public boolean isAppEligibleForBackup(android.content.pm.PackageInfo, boolean); method public java.lang.String name(); method public android.app.backup.RestoreDescription nextRestorePackage(); method public int performBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor, int); core/java/android/app/backup/BackupManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,29 @@ public class BackupManager { return 0; } /** * Ask the framework whether this app is eligible for backup. * * <p>Callers must hold the android.permission.BACKUP permission to use this method. * * @param packageName The name of the package. * @return Whether this app is eligible for backup. * * @hide */ @SystemApi public boolean isAppEligibleForBackup(String packageName) { checkServiceBinder(); if (sService != null) { try { return sService.isAppEligibleForBackup(packageName); } catch (RemoteException e) { Log.e(TAG, "isAppEligibleForBackup(pkg) couldn't connect"); } } return false; } /** * Request an immediate backup, providing an observer to which results of the backup operation * will be published. The Android backup system will decide for each package whether it will Loading core/java/android/app/backup/BackupTransport.java +18 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,18 @@ public class BackupTransport { "Transport cancelFullBackup() not implemented"); } /** * Ask the transport whether this app is eligible for backup. * * @param targetPackage The identity of the application. * @param isFullBackup If set, transport should check if app is eligible for full data backup, * otherwise to check if eligible for key-value backup. * @return Whether this app is eligible for backup. */ public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) { return true; } // ------------------------------------------------------------------------------------ // Full restore interfaces Loading Loading @@ -658,6 +670,12 @@ public class BackupTransport { BackupTransport.this.cancelFullBackup(); } @Override public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) throws RemoteException { return BackupTransport.this.isAppEligibleForBackup(targetPackage, isFullBackup); } @Override public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) { return BackupTransport.this.getNextFullRestoreDataChunk(socket); Loading core/java/android/app/backup/IBackupManager.aidl +10 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,16 @@ interface IBackupManager { */ long getAvailableRestoreToken(String packageName); /** * Ask the framework whether this app is eligible for backup. * * <p>Callers must hold the android.permission.BACKUP permission to use this method. * * @param packageName The name of the package. * @return Whether this app is eligible for backup. */ boolean isAppEligibleForBackup(String packageName); /** * Request an immediate backup, providing an observer to which results of the backup operation * will be published. The Android backup system will decide for each package whether it will Loading core/java/com/android/internal/backup/IBackupTransport.aidl +10 −1 Original line number Diff line number Diff line Loading @@ -239,6 +239,16 @@ interface IBackupTransport { int sendBackupData(int numBytes); void cancelFullBackup(); /** * Ask the transport whether this app is eligible for backup. * * @param targetPackage The identity of the application. * @param isFullBackup If set, transport should check if app is eligible for full data backup, * otherwise to check if eligible for key-value backup. * @return Whether this app is eligible for backup. */ boolean isAppEligibleForBackup(in PackageInfo targetPackage, boolean isFullBackup); // full restore stuff /** Loading Loading @@ -286,5 +296,4 @@ interface IBackupTransport { * operation will immediately be finished with no further attempts to restore app data. */ int abortFullRestore(); } Loading
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6293,6 +6293,7 @@ package android.app.backup { method public static void dataChanged(java.lang.String); method public long getAvailableRestoreToken(java.lang.String); method public java.lang.String getCurrentTransport(); method public boolean isAppEligibleForBackup(java.lang.String); method public boolean isBackupEnabled(); method public java.lang.String[] listAllTransports(); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver); Loading Loading @@ -6342,6 +6343,7 @@ package android.app.backup { method public int getNextFullRestoreDataChunk(android.os.ParcelFileDescriptor); method public int getRestoreData(android.os.ParcelFileDescriptor); method public int initializeDevice(); method public boolean isAppEligibleForBackup(android.content.pm.PackageInfo, boolean); method public java.lang.String name(); method public android.app.backup.RestoreDescription nextRestorePackage(); method public int performBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor, int);
core/java/android/app/backup/BackupManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -425,6 +425,29 @@ public class BackupManager { return 0; } /** * Ask the framework whether this app is eligible for backup. * * <p>Callers must hold the android.permission.BACKUP permission to use this method. * * @param packageName The name of the package. * @return Whether this app is eligible for backup. * * @hide */ @SystemApi public boolean isAppEligibleForBackup(String packageName) { checkServiceBinder(); if (sService != null) { try { return sService.isAppEligibleForBackup(packageName); } catch (RemoteException e) { Log.e(TAG, "isAppEligibleForBackup(pkg) couldn't connect"); } } return false; } /** * Request an immediate backup, providing an observer to which results of the backup operation * will be published. The Android backup system will decide for each package whether it will Loading
core/java/android/app/backup/BackupTransport.java +18 −0 Original line number Diff line number Diff line Loading @@ -482,6 +482,18 @@ public class BackupTransport { "Transport cancelFullBackup() not implemented"); } /** * Ask the transport whether this app is eligible for backup. * * @param targetPackage The identity of the application. * @param isFullBackup If set, transport should check if app is eligible for full data backup, * otherwise to check if eligible for key-value backup. * @return Whether this app is eligible for backup. */ public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) { return true; } // ------------------------------------------------------------------------------------ // Full restore interfaces Loading Loading @@ -658,6 +670,12 @@ public class BackupTransport { BackupTransport.this.cancelFullBackup(); } @Override public boolean isAppEligibleForBackup(PackageInfo targetPackage, boolean isFullBackup) throws RemoteException { return BackupTransport.this.isAppEligibleForBackup(targetPackage, isFullBackup); } @Override public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) { return BackupTransport.this.getNextFullRestoreDataChunk(socket); Loading
core/java/android/app/backup/IBackupManager.aidl +10 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,16 @@ interface IBackupManager { */ long getAvailableRestoreToken(String packageName); /** * Ask the framework whether this app is eligible for backup. * * <p>Callers must hold the android.permission.BACKUP permission to use this method. * * @param packageName The name of the package. * @return Whether this app is eligible for backup. */ boolean isAppEligibleForBackup(String packageName); /** * Request an immediate backup, providing an observer to which results of the backup operation * will be published. The Android backup system will decide for each package whether it will Loading
core/java/com/android/internal/backup/IBackupTransport.aidl +10 −1 Original line number Diff line number Diff line Loading @@ -239,6 +239,16 @@ interface IBackupTransport { int sendBackupData(int numBytes); void cancelFullBackup(); /** * Ask the transport whether this app is eligible for backup. * * @param targetPackage The identity of the application. * @param isFullBackup If set, transport should check if app is eligible for full data backup, * otherwise to check if eligible for key-value backup. * @return Whether this app is eligible for backup. */ boolean isAppEligibleForBackup(in PackageInfo targetPackage, boolean isFullBackup); // full restore stuff /** Loading Loading @@ -286,5 +296,4 @@ interface IBackupTransport { * operation will immediately be finished with no further attempts to restore app data. */ int abortFullRestore(); }