Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bac5d5c6 authored by Neil Fuller's avatar Neil Fuller Committed by Android (Google) Code Review
Browse files

Merge changes from topics "enable_background_geodetection_metrics", "enhanced_droidfood_metrics"

* changes:
  Add field to record state of background geotz
  Add fields for "enhanced metrics collection"
parents 8161eee7 9d569d32
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3436,7 +3436,10 @@ public class StatsPullAtomService extends SystemService {
                            metricsState.getLatestTelephonySuggestion()),
                    convertTimeZoneSuggestionToProtoBytes(
                            metricsState.getLatestGeolocationSuggestion()),
                    metricsState.isTelephonyTimeZoneFallbackSupported()
                    metricsState.isTelephonyTimeZoneFallbackSupported(),
                    metricsState.getDeviceTimeZoneId(),
                    metricsState.isEnhancedMetricsCollectionEnabled(),
                    metricsState.getGeoDetectionRunInBackgroundEnabled()
            ));
        } catch (RuntimeException e) {
            Slog.e(TAG, "Getting time zone detection state failed: ", e);
@@ -3483,6 +3486,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);