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

am: 424e517d5d

Change-Id: I4d7c458c02e3de1d707c6314102bb8b00fe2bda6
This commit is contained in:
Siddharth Ray
2017-06-22 23:05:24 +00:00
committed by android-build-merger

View File

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