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

Commit 2f3ee9a1 authored by Tyler Trephan's avatar Tyler Trephan
Browse files

Fixed "adb shell dumpsys location" NullPointerException. If dumpsys is called...

Fixed "adb shell dumpsys location" NullPointerException. If dumpsys is called before systemRunning(), then NullPointerException is thrown because of null member variables.

Test: Tested on Hawk.
Fix: 128919170

Change-Id: I66097d94443bb18fa87e2f00c44901c772a1b851
parent 38076cdc
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -3597,10 +3597,18 @@ public class LocationManagerService extends ILocationManager.Stub {
                pw.println("    " + provider + ": " + location);
            }

            if (mGeofenceManager != null) {
                mGeofenceManager.dump(pw);
            } else {
                pw.println("  Geofences: null");
            }
          
            if (mBlacklist != null) {
                pw.append("  ");
                mBlacklist.dump(pw);
            } else {
                pw.println("  mBlacklist=null");
            }

            if (mLocationControllerExtraPackage != null) {
                pw.println(" Location controller extra package: " + mLocationControllerExtraPackage
@@ -3614,8 +3622,12 @@ public class LocationManagerService extends ILocationManager.Stub {
                }
            }

            if (mLocationFudger != null) {
                pw.append("  fudger: ");
                mLocationFudger.dump(fd, pw, args);
            } else {
                pw.println("  fudger: null");
            }

            if (args.length > 0 && "short".equals(args[0])) {
                return;