[automerger] DO NOT MERGE - SUPL ES Extension - Safer Init and Not After Boot am: b5e7bbe5b8 am: 1bb102e37d am: 1c348395f5 am: 26fda93676
Change-Id: I87431bd661f6d5243d4c442e3caf6db247dc89bd
This commit is contained in:
@@ -123,8 +123,8 @@ public class GpsNetInitiatedHandler {
|
|||||||
static private boolean mIsHexInput = true;
|
static private boolean mIsHexInput = true;
|
||||||
|
|
||||||
// End time of emergency call, and extension, if set
|
// End time of emergency call, and extension, if set
|
||||||
private long mCallEndElapsedRealtimeMillis = 0;
|
private volatile long mCallEndElapsedRealtimeMillis = 0;
|
||||||
private long mEmergencyExtensionMillis = 0;
|
private volatile long mEmergencyExtensionMillis = 0;
|
||||||
|
|
||||||
public static class GpsNiNotification
|
public static class GpsNiNotification
|
||||||
{
|
{
|
||||||
@@ -250,8 +250,9 @@ public class GpsNetInitiatedHandler {
|
|||||||
*/
|
*/
|
||||||
public boolean getInEmergency() {
|
public boolean getInEmergency() {
|
||||||
boolean isInEmergencyExtension =
|
boolean isInEmergencyExtension =
|
||||||
(SystemClock.elapsedRealtime() - mCallEndElapsedRealtimeMillis) <
|
(mCallEndElapsedRealtimeMillis > 0)
|
||||||
mEmergencyExtensionMillis;
|
&& ((SystemClock.elapsedRealtime() - mCallEndElapsedRealtimeMillis)
|
||||||
|
< mEmergencyExtensionMillis);
|
||||||
boolean isInEmergencyCallback = Boolean.parseBoolean(
|
boolean isInEmergencyCallback = Boolean.parseBoolean(
|
||||||
SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
|
SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
|
||||||
return mIsInEmergencyCall || isInEmergencyCallback || isInEmergencyExtension;
|
return mIsInEmergencyCall || isInEmergencyCallback || isInEmergencyExtension;
|
||||||
|
|||||||
@@ -759,12 +759,11 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
|||||||
// while IO initialization and registration is delegated to our internal handler
|
// while IO initialization and registration is delegated to our internal handler
|
||||||
// this approach is just fine because events are posted to our handler anyway
|
// this approach is just fine because events are posted to our handler anyway
|
||||||
mProperties = new Properties();
|
mProperties = new Properties();
|
||||||
sendMessage(INITIALIZE_HANDLER, 0, null);
|
// Create a GPS net-initiated handler (also needed by handleInitialize)
|
||||||
|
|
||||||
// Create a GPS net-initiated handler.
|
|
||||||
mNIHandler = new GpsNetInitiatedHandler(context,
|
mNIHandler = new GpsNetInitiatedHandler(context,
|
||||||
mNetInitiatedListener,
|
mNetInitiatedListener,
|
||||||
mSuplEsEnabled);
|
mSuplEsEnabled);
|
||||||
|
sendMessage(INITIALIZE_HANDLER, 0, null);
|
||||||
|
|
||||||
mListenerHelper = new GnssStatusListenerHelper(mHandler) {
|
mListenerHelper = new GnssStatusListenerHelper(mHandler) {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user