diff options
author | Christopher Tate <ctate@google.com> | 2009-07-06 11:17:02 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-07-06 11:17:02 -0700 |
commit | 80f4913d769babb89f5c69e1d80037394d3b25e2 (patch) | |
tree | 7c5c1bea2057a6610051be02f98ea9b0c03586e9 /cmds | |
parent | 3d204326490e76b2a9a92225ed5cb1a3fd2ffc63 (diff) | |
parent | d23d7f2d12c20314e1e8ff206fafc8f21745ca2d (diff) | |
download | frameworks_base-80f4913d769babb89f5c69e1d80037394d3b25e2.zip frameworks_base-80f4913d769babb89f5c69e1d80037394d3b25e2.tar.gz frameworks_base-80f4913d769babb89f5c69e1d80037394d3b25e2.tar.bz2 |
am d23d7f2d: Add a \'wipe\' operation to Bmgr
Merge commit 'd23d7f2d12c20314e1e8ff206fafc8f21745ca2d'
* commit 'd23d7f2d12c20314e1e8ff206fafc8f21745ca2d':
Add a 'wipe' operation to Bmgr
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java index c90b862..ee3ec1a 100644 --- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java @@ -97,6 +97,11 @@ public final class Bmgr { return; } + if ("wipe".equals(op)) { + doWipe(); + return; + } + System.err.println("Unknown command"); showUsage(); } @@ -183,6 +188,22 @@ public final class Bmgr { } } + private void doWipe() { + String pkg = nextArg(); + if (pkg == null) { + showUsage(); + return; + } + + try { + mBmgr.clearBackupData(pkg); + System.out.println("Wiped backup data for " + pkg); + } catch (RemoteException e) { + System.err.println(e.toString()); + System.err.println(BMGR_NOT_RUNNING_ERR); + } + } + private void doList() { String arg = nextArg(); // sets, transports, packages set# if ("transports".equals(arg)) { @@ -343,6 +364,7 @@ public final class Bmgr { System.err.println(" bmgr transport WHICH"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr run"); + System.err.println(" bmgr wipe PACKAGE"); System.err.println(""); System.err.println("The 'backup' command schedules a backup pass for the named package."); System.err.println("Note that the backup pass will effectively be a no-op if the package"); @@ -373,5 +395,9 @@ public final class Bmgr { 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."); + System.err.println(""); + System.err.println("The 'wipe' command causes all backed-up data for the given package to be"); + System.err.println("erased from the current transport's storage. The next backup operation"); + System.err.println("that the given application performs will rewrite its entire data set."); } } |