Merge "Fail gracefully if the user fails to supply necessary args to bmgr" into kraken
This commit is contained in:
committed by
Android (Google) Code Review
commit
d7f659e897
@@ -175,6 +175,11 @@ public final class Bmgr {
|
|||||||
private void doTransport() {
|
private void doTransport() {
|
||||||
try {
|
try {
|
||||||
String which = nextArg();
|
String which = nextArg();
|
||||||
|
if (which == null) {
|
||||||
|
showUsage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String old = mBmgr.selectBackupTransport(which);
|
String old = mBmgr.selectBackupTransport(which);
|
||||||
if (old == null) {
|
if (old == null) {
|
||||||
System.out.println("Unknown transport '" + which
|
System.out.println("Unknown transport '" + which
|
||||||
@@ -318,6 +323,11 @@ public final class Bmgr {
|
|||||||
|
|
||||||
private void doRestore() {
|
private void doRestore() {
|
||||||
String arg = nextArg();
|
String arg = nextArg();
|
||||||
|
if (arg == null) {
|
||||||
|
showUsage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (arg.indexOf('.') >= 0) {
|
if (arg.indexOf('.') >= 0) {
|
||||||
// it's a package name
|
// it's a package name
|
||||||
doRestorePackage(arg);
|
doRestorePackage(arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user