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

Commit 41bf50cc authored by Siddharth Ray's avatar Siddharth Ray Committed by android-build-merger
Browse files

Merge "Emergency SUPL when location is disabled" into oc-dev

am: 2ffd9867

Change-Id: I7f57683e774109f301e0763607853674c6fda9c9
parents 53f4db56 2ffd9867
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -778,6 +778,18 @@ public class GnssLocationProvider implements LocationProviderInterface {
                return isEnabled();
            }
        };

        /*
        * A cycle of native_init() and native_cleanup() is needed so that callbacks are registered
        * after bootup even when location is disabled. This will allow Emergency SUPL to work even
        * when location is disabled before device restart.
        * */
        boolean isInitialized = native_init();
        if(!isInitialized) {
            Log.d(TAG, "Failed to initialize at bootup");
        } else {
            native_cleanup();
        }
    }

    /**