Loading location/java/com/android/internal/location/GpsLocationProvider.java +23 −23 Original line number Diff line number Diff line Loading @@ -805,29 +805,6 @@ public class GpsLocationProvider extends ILocationProvider.Stub { if (VERBOSE) Log.v(TAG, "reportLocation lat: " + latitude + " long: " + longitude + " timestamp: " + timestamp); mLastFixTime = System.currentTimeMillis(); // report time to first fix if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { mTTFF = (int)(mLastFixTime - mFixRequestTime); if (Config.LOGD) Log.d(TAG, "TTFF: " + mTTFF); // notify status listeners synchronized(mListeners) { int size = mListeners.size(); for (int i = 0; i < size; i++) { Listener listener = mListeners.get(i); try { listener.mListener.onFirstFix(mTTFF); } catch (RemoteException e) { Log.w(TAG, "RemoteException in stopNavigating"); mListeners.remove(listener); // adjust for size of list changing size--; } } } } synchronized (mLocation) { mLocationFlags = flags; if ((flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { Loading Loading @@ -863,6 +840,29 @@ public class GpsLocationProvider extends ILocationProvider.Stub { } } mLastFixTime = System.currentTimeMillis(); // report time to first fix if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { mTTFF = (int)(mLastFixTime - mFixRequestTime); if (Config.LOGD) Log.d(TAG, "TTFF: " + mTTFF); // notify status listeners synchronized(mListeners) { int size = mListeners.size(); for (int i = 0; i < size; i++) { Listener listener = mListeners.get(i); try { listener.mListener.onFirstFix(mTTFF); } catch (RemoteException e) { Log.w(TAG, "RemoteException in stopNavigating"); mListeners.remove(listener); // adjust for size of list changing size--; } } } } if (mStarted && mStatus != LocationProvider.AVAILABLE) { mAlarmManager.cancel(mTimeoutIntent); // send an intent to notify that the GPS is receiving fixes. Loading Loading
location/java/com/android/internal/location/GpsLocationProvider.java +23 −23 Original line number Diff line number Diff line Loading @@ -805,29 +805,6 @@ public class GpsLocationProvider extends ILocationProvider.Stub { if (VERBOSE) Log.v(TAG, "reportLocation lat: " + latitude + " long: " + longitude + " timestamp: " + timestamp); mLastFixTime = System.currentTimeMillis(); // report time to first fix if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { mTTFF = (int)(mLastFixTime - mFixRequestTime); if (Config.LOGD) Log.d(TAG, "TTFF: " + mTTFF); // notify status listeners synchronized(mListeners) { int size = mListeners.size(); for (int i = 0; i < size; i++) { Listener listener = mListeners.get(i); try { listener.mListener.onFirstFix(mTTFF); } catch (RemoteException e) { Log.w(TAG, "RemoteException in stopNavigating"); mListeners.remove(listener); // adjust for size of list changing size--; } } } } synchronized (mLocation) { mLocationFlags = flags; if ((flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { Loading Loading @@ -863,6 +840,29 @@ public class GpsLocationProvider extends ILocationProvider.Stub { } } mLastFixTime = System.currentTimeMillis(); // report time to first fix if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) { mTTFF = (int)(mLastFixTime - mFixRequestTime); if (Config.LOGD) Log.d(TAG, "TTFF: " + mTTFF); // notify status listeners synchronized(mListeners) { int size = mListeners.size(); for (int i = 0; i < size; i++) { Listener listener = mListeners.get(i); try { listener.mListener.onFirstFix(mTTFF); } catch (RemoteException e) { Log.w(TAG, "RemoteException in stopNavigating"); mListeners.remove(listener); // adjust for size of list changing size--; } } } } if (mStarted && mStatus != LocationProvider.AVAILABLE) { mAlarmManager.cancel(mTimeoutIntent); // send an intent to notify that the GPS is receiving fixes. Loading