am 7e8566a6: am d7f659e8: Merge "Fail gracefully if the user fails to supply necessary args to bmgr" into kraken
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 8263e75..39b3a20 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -175,6 +175,11 @@
private void doTransport() {
try {
String which = nextArg();
+ if (which == null) {
+ showUsage();
+ return;
+ }
+
String old = mBmgr.selectBackupTransport(which);
if (old == null) {
System.out.println("Unknown transport '" + which
@@ -318,6 +323,11 @@
private void doRestore() {
String arg = nextArg();
+ if (arg == null) {
+ showUsage();
+ return;
+ }
+
if (arg.indexOf('.') >= 0) {
// it's a package name
doRestorePackage(arg);