summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2021-11-24 16:10:54 +0000
committerNeil Fuller <nfuller@google.com>2022-01-14 14:19:54 +0000
commit4dd34c1fc36c1bf33f27e54478baccfee84dfd33 (patch)
treece5607daf649b6bae3bf50f62ccb4535c4b2f95b
parent0d042eb0ece8a6ac08a3844ba2666a4f34c3d423 (diff)
Add fields for "enhanced metrics collection"
Add metrics fields to record the state of the "enhanced metrics collection" server flags and the extra metrics that this feature enables. Bug: 200279201 Bug: 208789974 Test: build / manual testing Change-Id: I23a2745ba543b5f03920bf78e6b9b6d9beacc62b
-rw-r--r--services/core/java/com/android/server/stats/pull/StatsPullAtomService.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index 07a584913b0b..e8c20ccba3d3 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -3436,7 +3436,9 @@ public class StatsPullAtomService extends SystemService {
metricsState.getLatestTelephonySuggestion()),
convertTimeZoneSuggestionToProtoBytes(
metricsState.getLatestGeolocationSuggestion()),
- metricsState.isTelephonyTimeZoneFallbackSupported()
+ metricsState.isTelephonyTimeZoneFallbackSupported(),
+ metricsState.getDeviceTimeZoneId(),
+ metricsState.isEnhancedMetricsCollectionEnabled()
));
} catch (RuntimeException e) {
Slog.e(TAG, "Getting time zone detection state failed: ", e);
@@ -3483,6 +3485,14 @@ public class StatsPullAtomService extends SystemService {
android.app.time.MetricsTimeZoneSuggestion.TIME_ZONE_ORDINALS,
zoneIdOrdinal);
}
+ String[] zoneIds = suggestion.getZoneIds();
+ if (zoneIds != null) {
+ for (String zoneId : zoneIds) {
+ protoOutputStream.write(
+ android.app.time.MetricsTimeZoneSuggestion.TIME_ZONE_IDS,
+ zoneId);
+ }
+ }
}
protoOutputStream.flush();
closeQuietly(byteArrayOutputStream);