summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2021-03-11 17:38:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-03-11 17:38:30 +0000
commitc06b30063862e0b4a8dc7d2c5d5bbb0e5c50cd52 (patch)
tree4569a06d442db08eb6887dd604a2f60dedf94148
parent6d3fb3d57c96ee3a7e6b7ec69ecf3f82547049f1 (diff)
parentb2973f8213b8edcff673fb795fe1da0151290408 (diff)
Merge "Add MetricsTimeZoneSuggestion for metrics use"
-rw-r--r--core/proto/android/app/time_zone_detector.proto27
1 files changed, 27 insertions, 0 deletions
diff --git a/core/proto/android/app/time_zone_detector.proto b/core/proto/android/app/time_zone_detector.proto
index c7919b39956d..b33ca1d4f476 100644
--- a/core/proto/android/app/time_zone_detector.proto
+++ b/core/proto/android/app/time_zone_detector.proto
@@ -30,3 +30,30 @@ message GeolocationTimeZoneSuggestionProto {
repeated string zone_ids = 1;
repeated string debug_info = 2;
}
+
+/*
+ * An obfuscated and simplified time zone suggestion for metrics use.
+ *
+ * The suggestion's time zone IDs (which relate to location) are obfuscated by
+ * mapping them to an ordinal. When the ordinal is assigned consistently across
+ * several objects (i.e. so the same time zone ID is always mapped to the same
+ * ordinal), this allows comparisons between those objects. For example, we can
+ * answer "did these two suggestions agree?", "does the suggestion match the
+ * device's current time zone?", without leaking knowledge of location. Ordinals
+ * are also significantly more compact than full IANA TZDB IDs, albeit highly
+ * unstable and of limited use.
+ */
+message MetricsTimeZoneSuggestion {
+ option (android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ enum Type {
+ CERTAIN = 1;
+ UNCERTAIN = 2;
+ }
+ optional Type type = 1;
+
+ // The ordinals for time zone(s) in the suggestion. Always empty for
+ // UNCERTAIN, and can be empty for CERTAIN, for example when the device is in
+ // a disputed area / on an ocean.
+ repeated uint32 time_zone_ordinals = 2;
+}