Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6938,7 +6938,7 @@ package android.app.backup { ctor public BackupManager(android.content.Context); method public void dataChanged(); method public static void dataChanged(java.lang.String); method public int requestRestore(android.app.backup.RestoreObserver); method public deprecated int requestRestore(android.app.backup.RestoreObserver); } public class FileBackupHelper implements android.app.backup.BackupHelper { api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,7 @@ package android.app.backup { method public java.lang.String[] listAllTransports(); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver, android.app.backup.BackupManagerMonitor, int); method public int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); method public deprecated int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); method public deprecated java.lang.String selectBackupTransport(java.lang.String); method public void selectBackupTransport(android.content.ComponentName, android.app.backup.SelectBackupTransportCallback); method public void setAutoRestore(boolean); Loading core/java/android/app/backup/BackupManager.java +9 −20 Original line number Diff line number Diff line Loading @@ -252,6 +252,8 @@ public class BackupManager { } /** * @deprecated Since Android P app can no longer request restoring of its backup. * * Restore the calling application from backup. The data will be restored from the * current backup dataset if the application has stored data there, or from * the dataset used during the last full device setup operation if the current Loading @@ -269,6 +271,7 @@ public class BackupManager { * * @return Zero on success; nonzero on error. */ @Deprecated public int requestRestore(RestoreObserver observer) { return requestRestore(observer, null); } Loading @@ -276,6 +279,8 @@ public class BackupManager { // system APIs start here /** * @deprecated Since Android P app can no longer request restoring of its backup. * * Restore the calling application from backup. The data will be restored from the * current backup dataset if the application has stored data there, or from * the dataset used during the last full device setup operation if the current Loading @@ -298,28 +303,12 @@ public class BackupManager { * * @hide */ @Deprecated @SystemApi public int requestRestore(RestoreObserver observer, BackupManagerMonitor monitor) { int result = -1; checkServiceBinder(); if (sService != null) { RestoreSession session = null; try { IRestoreSession binder = sService.beginRestoreSession(mContext.getPackageName(), null); if (binder != null) { session = new RestoreSession(mContext, binder); result = session.restorePackage(mContext.getPackageName(), observer, monitor); } } catch (RemoteException e) { Log.e(TAG, "restoreSelf() unable to contact service"); } finally { if (session != null) { session.endRestoreSession(); } } } return result; Log.w(TAG, "requestRestore(): Since Android P app can no longer request restoring" + " of its backup."); return -1; } /** Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -6938,7 +6938,7 @@ package android.app.backup { ctor public BackupManager(android.content.Context); method public void dataChanged(); method public static void dataChanged(java.lang.String); method public int requestRestore(android.app.backup.RestoreObserver); method public deprecated int requestRestore(android.app.backup.RestoreObserver); } public class FileBackupHelper implements android.app.backup.BackupHelper {
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,7 @@ package android.app.backup { method public java.lang.String[] listAllTransports(); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver); method public int requestBackup(java.lang.String[], android.app.backup.BackupObserver, android.app.backup.BackupManagerMonitor, int); method public int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); method public deprecated int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); method public deprecated java.lang.String selectBackupTransport(java.lang.String); method public void selectBackupTransport(android.content.ComponentName, android.app.backup.SelectBackupTransportCallback); method public void setAutoRestore(boolean); Loading
core/java/android/app/backup/BackupManager.java +9 −20 Original line number Diff line number Diff line Loading @@ -252,6 +252,8 @@ public class BackupManager { } /** * @deprecated Since Android P app can no longer request restoring of its backup. * * Restore the calling application from backup. The data will be restored from the * current backup dataset if the application has stored data there, or from * the dataset used during the last full device setup operation if the current Loading @@ -269,6 +271,7 @@ public class BackupManager { * * @return Zero on success; nonzero on error. */ @Deprecated public int requestRestore(RestoreObserver observer) { return requestRestore(observer, null); } Loading @@ -276,6 +279,8 @@ public class BackupManager { // system APIs start here /** * @deprecated Since Android P app can no longer request restoring of its backup. * * Restore the calling application from backup. The data will be restored from the * current backup dataset if the application has stored data there, or from * the dataset used during the last full device setup operation if the current Loading @@ -298,28 +303,12 @@ public class BackupManager { * * @hide */ @Deprecated @SystemApi public int requestRestore(RestoreObserver observer, BackupManagerMonitor monitor) { int result = -1; checkServiceBinder(); if (sService != null) { RestoreSession session = null; try { IRestoreSession binder = sService.beginRestoreSession(mContext.getPackageName(), null); if (binder != null) { session = new RestoreSession(mContext, binder); result = session.restorePackage(mContext.getPackageName(), observer, monitor); } } catch (RemoteException e) { Log.e(TAG, "restoreSelf() unable to contact service"); } finally { if (session != null) { session.endRestoreSession(); } } } return result; Log.w(TAG, "requestRestore(): Since Android P app can no longer request restoring" + " of its backup."); return -1; } /** Loading