diff options
author | Bernardo Rufino <brufino@google.com> | 2018-05-30 10:09:25 +0100 |
---|---|---|
committer | Bernardo Rufino <brufino@google.com> | 2018-06-06 08:25:26 +0000 |
commit | 52642716a3447d3c6159ce1456e6f6a17c330f4e (patch) | |
tree | aaf996344f2ad9f9a4d680db1605d1e8d4c55894 /cmds/bmgr | |
parent | 047577692e53c025ef7db7fee015cf265ed917d8 (diff) |
Remove adb shell bmgr restore <package>
Also put comment on RestoreSession saying that it doesn't kill the app
in the end.
Bug: 29255593
Test: Builds
adb shell bmgr help, verify usage
adb shell bmgr restore android, verify no-op
Change-Id: I89304149ea6c03a80937e321cf3a46fd173308e2
Diffstat (limited to 'cmds/bmgr')
-rw-r--r-- | cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java index 84a04e5ad6e3..448ce1590361 100644 --- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java @@ -704,34 +704,11 @@ public final class Bmgr { return; } } - - System.out.println("done"); } private void doRestorePackage(String pkg) { - try { - mRestore = mBmgr.beginRestoreSession(pkg, null); - if (mRestore == null) { - System.err.println(BMGR_NOT_RUNNING_ERR); - return; - } - - RestoreObserver observer = new RestoreObserver(); - // TODO implement monitor here - int err = mRestore.restorePackage(pkg, observer, null ); - if (err == 0) { - // Off and running -- wait for the restore to complete - observer.waitForCompletion(); - } else { - System.err.println("Unable to restore package " + pkg); - } - - // And finally shut down the session - mRestore.endRestoreSession(); - } catch (RemoteException e) { - System.err.println(e.toString()); - System.err.println(BMGR_NOT_RUNNING_ERR); - } + System.err.println("The syntax 'restore <package>' is no longer supported, please use "); + System.err.println("'restore <token> <package>'."); } private void doRestoreAll(long token, HashSet<String> filter) { @@ -784,6 +761,8 @@ public final class Bmgr { // once the restore has finished, close down the session and we're done mRestore.endRestoreSession(); + + System.out.println("done"); } catch (RemoteException e) { System.err.println(e.toString()); System.err.println(BMGR_NOT_RUNNING_ERR); @@ -823,7 +802,6 @@ public final class Bmgr { System.err.println(" bmgr transport WHICH|-c WHICH_COMPONENT"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr restore TOKEN PACKAGE..."); - System.err.println(" bmgr restore PACKAGE"); System.err.println(" bmgr run"); System.err.println(" bmgr wipe TRANSPORT PACKAGE"); System.err.println(" bmgr fullbackup PACKAGE..."); @@ -867,10 +845,6 @@ public final class Bmgr { System.err.println("'restore' operation supplying only a token, but applies a filter to the"); System.err.println("set of applications to be restored."); System.err.println(""); - System.err.println("The 'restore' command when given just a package name intiates a restore of"); - System.err.println("just that one package according to the restore set selection algorithm"); - System.err.println("used by the RestoreSession.restorePackage() method."); - System.err.println(""); System.err.println("The 'run' command causes any scheduled backup operation to be initiated"); System.err.println("immediately, without the usual waiting period for batching together"); System.err.println("data changes."); |