AI 145488: am: CL 145468 am: CL 145083 ADT #1777728: fix NPE when AVD list is empty
Original author: raphael Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 145488
This commit is contained in:
committed by
The Android Open Source Project
parent
d17eb0b21a
commit
aadd2c9c41
@@ -742,11 +742,12 @@ public final class AvdManager {
|
|||||||
private void buildAvdList(ArrayList<AvdInfo> list) throws AndroidLocationException {
|
private void buildAvdList(ArrayList<AvdInfo> list) throws AndroidLocationException {
|
||||||
|
|
||||||
File[] avds = buildAvdFilesList();
|
File[] avds = buildAvdFilesList();
|
||||||
|
if (avds != null) {
|
||||||
for (File avd : avds) {
|
for (File avd : avds) {
|
||||||
AvdInfo info = parseAvdInfo(avd, false /*acceptError*/);
|
AvdInfo info = parseAvdInfo(avd, false /*acceptError*/);
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
list.add(info);
|
list.add(info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user