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

Commit d3c246c4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Adding nullptr check for some framework components" into main

parents ca384f86 5dc21225
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -83,8 +83,11 @@ public final class Geocoder {
     * succeed.
     */
    public static boolean isPresent() {
        ILocationManager lm = Objects.requireNonNull(ILocationManager.Stub.asInterface(
                ServiceManager.getService(Context.LOCATION_SERVICE)));
        ILocationManager lm = ILocationManager.Stub.asInterface(
                ServiceManager.getService(Context.LOCATION_SERVICE));
        if (lm == null) {
            return false;
        }
        try {
            return lm.isGeocodeAvailable();
        } catch (RemoteException e) {