Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01144882 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix null handling of getAllCellInfo

ServiceStateTracker.getAllCellInfo may return null, but
PhoneBase.privatizeCellInfoList may dereference that.  Check
for null rather than crash the phone.

bug:23201508
Change-Id: I26fcfc015fa1a8d1ec13e34f3369d1848954c44e
parent 69027fb2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1314,6 +1314,7 @@ public abstract class PhoneBase extends Handler implements Phone {
     * @return the original list with CDMA lat/long cleared if necessary
     */
    private List<CellInfo> privatizeCellInfoList(List<CellInfo> cellInfoList) {
        if (cellInfoList == null) return null;
        int mode = Settings.Secure.getInt(getContext().getContentResolver(),
                Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
        if (mode == Settings.Secure.LOCATION_MODE_OFF) {