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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user