Loading services/core/java/com/android/server/location/provider/LocationProviderManager.java +10 −4 Original line number Original line Diff line number Diff line Loading @@ -2523,11 +2523,17 @@ public class LocationProviderManager extends filtered = locationResult; filtered = locationResult; } } Location last = getLastLocationUnsafe(USER_CURRENT, PERMISSION_FINE, true, Long.MAX_VALUE); // check for non-monotonic locations if we're not the passive manager. the passive manager // is much more likely to see non-monotonic locations since it gets locations from all // providers, so this error log is not very useful there. if (mPassiveManager != null) { Location last = getLastLocationUnsafe(USER_CURRENT, PERMISSION_FINE, true, Long.MAX_VALUE); if (last != null && locationResult.get(0).getElapsedRealtimeNanos() if (last != null && locationResult.get(0).getElapsedRealtimeNanos() < last.getElapsedRealtimeNanos()) { < last.getElapsedRealtimeNanos()) { Log.e(TAG, "non-monotonic location received from " + mName + " provider"); Log.e(TAG, "non-monotonic location received from " + mName + " provider"); } } } // update last location // update last location setLastLocation(filtered.getLastLocation(), UserHandle.USER_ALL); setLastLocation(filtered.getLastLocation(), UserHandle.USER_ALL); Loading Loading
services/core/java/com/android/server/location/provider/LocationProviderManager.java +10 −4 Original line number Original line Diff line number Diff line Loading @@ -2523,11 +2523,17 @@ public class LocationProviderManager extends filtered = locationResult; filtered = locationResult; } } Location last = getLastLocationUnsafe(USER_CURRENT, PERMISSION_FINE, true, Long.MAX_VALUE); // check for non-monotonic locations if we're not the passive manager. the passive manager // is much more likely to see non-monotonic locations since it gets locations from all // providers, so this error log is not very useful there. if (mPassiveManager != null) { Location last = getLastLocationUnsafe(USER_CURRENT, PERMISSION_FINE, true, Long.MAX_VALUE); if (last != null && locationResult.get(0).getElapsedRealtimeNanos() if (last != null && locationResult.get(0).getElapsedRealtimeNanos() < last.getElapsedRealtimeNanos()) { < last.getElapsedRealtimeNanos()) { Log.e(TAG, "non-monotonic location received from " + mName + " provider"); Log.e(TAG, "non-monotonic location received from " + mName + " provider"); } } } // update last location // update last location setLastLocation(filtered.getLastLocation(), UserHandle.USER_ALL); setLastLocation(filtered.getLastLocation(), UserHandle.USER_ALL); Loading