Fix getAllCellInfo to handle null.
Phone.getAllCellInfo may return null, but List.addAll doesn't like that.
bug:23201508
Change-Id: Ic8b8c742e07712ea78c8fe4482a6aeaae267d8d5
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 93d369c..ebfab96 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1517,7 +1517,8 @@
if (DBG_LOC) log("getAllCellInfo: is active user");
List<CellInfo> cellInfos = new ArrayList<CellInfo>();
for (Phone phone : PhoneFactory.getPhones()) {
- cellInfos.addAll(phone.getAllCellInfo());
+ final List<CellInfo> info = phone.getAllCellInfo();
+ if (info != null) cellInfos.addAll(phone.getAllCellInfo());
}
return cellInfos;
} else {