Loading services/core/java/com/android/server/location/LocationManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -1253,7 +1253,8 @@ public class LocationManagerService extends ILocationManager.Stub { ArrayMap<String, ArrayMap<String, LocationEventLog.AggregateStats>> aggregateStats = mEventLog.copyAggregateStats(); for (int i = 0; i < aggregateStats.size(); i++) { ipw.println(aggregateStats.keyAt(i)); ipw.print(aggregateStats.keyAt(i)); ipw.println(":"); ipw.increaseIndent(); ArrayMap<String, LocationEventLog.AggregateStats> providerStats = aggregateStats.valueAt(i); Loading services/core/java/com/android/server/location/eventlog/LocationEventLog.java +9 −1 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public class LocationEventLog extends LocalEventLog { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_DELIVER_LOCATION, provider, numLocations, identity); } getAggregateStats(provider, identity.getPackageName()).markLocationDelivered(); } /** Logs that the location power save mode has changed. */ Loading Loading @@ -397,6 +398,8 @@ public class LocationEventLog extends LocalEventLog { private int mActiveRequestCount; @GuardedBy("this") private int mForegroundRequestCount; @GuardedBy("this") private int mDeliveredLocationCount; @GuardedBy("this") private long mFastestIntervalMs = Long.MAX_VALUE; Loading Loading @@ -464,6 +467,10 @@ public class LocationEventLog extends LocalEventLog { Preconditions.checkState(mForegroundRequestCount >= 0); } synchronized void markLocationDelivered() { mDeliveredLocationCount++; } public synchronized void updateTotals() { if (mAddedRequestCount > 0) { long realtimeMs = SystemClock.elapsedRealtime(); Loading @@ -488,7 +495,8 @@ public class LocationEventLog extends LocalEventLog { + intervalToString(mSlowestIntervalMs) + ", total/active/foreground duration = " + formatDuration(mAddedTimeTotalMs) + "/" + formatDuration(mActiveTimeTotalMs) + "/" + formatDuration(mForegroundTimeTotalMs); + formatDuration(mForegroundTimeTotalMs) + ", locations = " + mDeliveredLocationCount; } private static String intervalToString(long intervalMs) { Loading Loading
services/core/java/com/android/server/location/LocationManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -1253,7 +1253,8 @@ public class LocationManagerService extends ILocationManager.Stub { ArrayMap<String, ArrayMap<String, LocationEventLog.AggregateStats>> aggregateStats = mEventLog.copyAggregateStats(); for (int i = 0; i < aggregateStats.size(); i++) { ipw.println(aggregateStats.keyAt(i)); ipw.print(aggregateStats.keyAt(i)); ipw.println(":"); ipw.increaseIndent(); ArrayMap<String, LocationEventLog.AggregateStats> providerStats = aggregateStats.valueAt(i); Loading
services/core/java/com/android/server/location/eventlog/LocationEventLog.java +9 −1 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public class LocationEventLog extends LocalEventLog { if (Build.IS_DEBUGGABLE || D) { addLogEvent(EVENT_PROVIDER_DELIVER_LOCATION, provider, numLocations, identity); } getAggregateStats(provider, identity.getPackageName()).markLocationDelivered(); } /** Logs that the location power save mode has changed. */ Loading Loading @@ -397,6 +398,8 @@ public class LocationEventLog extends LocalEventLog { private int mActiveRequestCount; @GuardedBy("this") private int mForegroundRequestCount; @GuardedBy("this") private int mDeliveredLocationCount; @GuardedBy("this") private long mFastestIntervalMs = Long.MAX_VALUE; Loading Loading @@ -464,6 +467,10 @@ public class LocationEventLog extends LocalEventLog { Preconditions.checkState(mForegroundRequestCount >= 0); } synchronized void markLocationDelivered() { mDeliveredLocationCount++; } public synchronized void updateTotals() { if (mAddedRequestCount > 0) { long realtimeMs = SystemClock.elapsedRealtime(); Loading @@ -488,7 +495,8 @@ public class LocationEventLog extends LocalEventLog { + intervalToString(mSlowestIntervalMs) + ", total/active/foreground duration = " + formatDuration(mAddedTimeTotalMs) + "/" + formatDuration(mActiveTimeTotalMs) + "/" + formatDuration(mForegroundTimeTotalMs); + formatDuration(mForegroundTimeTotalMs) + ", locations = " + mDeliveredLocationCount; } private static String intervalToString(long intervalMs) { Loading