summaryrefslogtreecommitdiffstats
path: root/cmds/bmgr
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2010-10-01 11:16:10 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2010-10-01 11:16:10 -0700
commit04686f428995fde3f6f5f5f12ccdd135f885ac84 (patch)
tree16d3da40249f7a0463b305c5aea2e0106ffe193b /cmds/bmgr
parentf01a873029641da2155ca1882f311d8f4e92675a (diff)
downloadframeworks_base-04686f428995fde3f6f5f5f12ccdd135f885ac84.zip
frameworks_base-04686f428995fde3f6f5f5f12ccdd135f885ac84.tar.gz
frameworks_base-04686f428995fde3f6f5f5f12ccdd135f885ac84.tar.bz2
Fix bug #3055578 ("adb shell bmgr list sets" generates NPE and cannot be run again when device has no account setup)
- fix NPE - code cleaning Change-Id: Ieb30b666d995de8cbd27ee6d17e2178e7ea670f6
Diffstat (limited to 'cmds/bmgr')
-rw-r--r--cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 39b3a20..37c8ad0 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -34,7 +34,6 @@ public final class Bmgr {
private String[] mArgs;
private int mNextArg;
- private String mCurArgData;
public static void main(String[] args) {
try {
@@ -274,6 +273,10 @@ public final class Bmgr {
}
private void printRestoreSets(RestoreSet[] sets) {
+ if (sets == null || sets.length == 0) {
+ System.out.println("No restore sets");
+ return;
+ }
for (RestoreSet s : sets) {
System.out.println(" " + Long.toHexString(s.token) + " : " + s.name);
}