| // Copyright 2020 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto2"; |
| |
| package ash.ml; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| // UserSettingsEvent contains information about user activities relating to |
| // settings changes. |
| message UserSettingsEvent { |
| message Event { |
| enum SettingType { |
| QUICK_SETTINGS = 1; |
| OS_SETTINGS = 2; |
| } |
| |
| enum SettingId { |
| WIFI = 1; |
| CELLULAR = 2; |
| BLUETOOTH = 3; |
| NIGHT_LIGHT = 4; |
| DO_NOT_DISTURB = 5; |
| ACCESSIBILITY = 6; |
| VOLUME = 7; |
| BRIGHTNESS = 8; |
| } |
| |
| enum AccessibilityId { |
| SPOKEN_FEEDBACK = 1; |
| SELECT_TO_SPEAK = 2; |
| DICTATION = 3; |
| HIGH_CONTRAST = 4; |
| MAGNIFIER = 5; |
| DOCKED_MAGNIFIER = 6; |
| LARGE_CURSOR = 7; |
| AUTO_CLICK = 8; |
| VIRTUAL_KEYBOARD = 9; |
| SWITCH_ACCESS = 10; |
| CARET_HIGHLIGHT = 11; |
| MONO_AUDIO = 12; |
| HIGHLIGHT_MOUSE_CURSOR = 13; |
| HIGHLIGHT_KEYBOARD_FOCUS = 14; |
| STICKY_KEYS = 15; |
| LIVE_CAPTION = 16; |
| } |
| |
| // Randomly generated ID that links together settings events that occurred |
| // at the same time. |
| optional int32 event_id = 1; |
| // The setting that was changed. |
| optional SettingId setting_id = 2; |
| // Where the settings event originated from. |
| optional SettingType setting_type = 3; |
| // Value of the setting before the change. |
| optional int32 previous_value = 4; |
| // Value of the setting after the change. |
| optional int32 current_value = 5; |
| |
| // The accessibility setting that was changed. Only populated if |
| // |setting_id| is ACCESSIBILITY. |
| optional AccessibilityId accessibility_id = 6; |
| } |
| |
| message Features { |
| enum DayOfWeek { |
| SUN = 0; |
| MON = 1; |
| TUE = 2; |
| WED = 3; |
| THU = 4; |
| FRI = 5; |
| SAT = 6; |
| } |
| |
| enum NetworkStatus { |
| OFFLINE = 1; |
| ONLINE_WIFI = 2; |
| ONLINE_CELLULAR = 3; |
| ONLINE_OTHER = 4; |
| } |
| |
| enum DeviceMode { |
| CLAMSHELL_MODE = 1; |
| TABLET_MODE = 2; |
| } |
| |
| enum DeviceOrientation { |
| LANDSCAPE = 1; |
| PORTRAIT = 2; |
| } |
| |
| // Time in minutes since the last settings change. |
| optional int32 time_since_last_settings_change = 1; |
| // Whether or not search was used to navigate to the setting. |
| optional bool is_from_search = 2; |
| |
| // Time in hours since midnight in the local time zone. |
| optional int32 hour_of_day = 3; |
| optional DayOfWeek day_of_week = 4; |
| // Country ID at install, corresponding to the value used by |
| // src/components/country_codes/country_codes.h. |
| optional int32 country = 5; |
| // Battery percentage from 0 to 100. |
| optional int32 battery_percentage = 6; |
| optional bool is_charging = 7; |
| optional bool is_playing_audio = 8; |
| optional bool is_playing_video = 9; |
| optional NetworkStatus network_status = 10; |
| // Whether the device has been presenting in the last 5 minutes. |
| optional bool is_recently_presenting = 11; |
| // Whether the device has been in fullscreen mode in the last 5 minutes. |
| optional bool is_recently_fullscreen = 12; |
| optional DeviceMode device_mode = 13; |
| optional DeviceOrientation device_orientation = 14; |
| |
| // The signal strength for the connected network. Only populated upon |
| // connection to a wifi or cellular network. |
| optional int32 signal_strength = 15; |
| // Whether or not the current wifi network has security. Only populated upon |
| // connection to a wifi network. |
| optional bool has_wifi_security = 16; |
| // Whether the user has connected to a cellular network in the current |
| // session. |
| optional bool used_cellular_in_session = 17; |
| // Whether or not the current bluetooth device was already paired. Only |
| // populated upon connection to a bluetooth device. |
| optional bool is_paired_bluetooth_device = 18; |
| // Whether the user has set up a night light schedule. |
| optional bool has_night_light_schedule = 19; |
| // True if it is after sunset and before sunrise in the local time. |
| optional bool is_after_sunset = 20; |
| } |
| |
| optional Event event = 1; |
| optional Features features = 2; |
| } |