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

Commit 9094e747 authored by Siddharth Ray's avatar Siddharth Ray Committed by android-build-merger
Browse files

Merge "Emergency SUPL when location is disabled" into oc-dr1-dev am: 424e517d

am: ea0e205a

Change-Id: I703fa0dbe43212422c577c4fa2083175d6fbb0aa
parents d6a2a8a1 ea0e205a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -789,6 +789,18 @@ public class GnssLocationProvider implements LocationProviderInterface {
            }
        };
        mGnssMetrics = new GnssMetrics();

        /*
        * 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();
        }
    }

    /**