1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.os.statsd.wearservices; 20 21import "frameworks/proto_logging/stats/atoms.proto"; 22import "frameworks/proto_logging/stats/atom_field_options.proto"; 23import "frameworks/proto_logging/stats/enums/app/wearservices/wearservices_enums.proto"; 24 25option java_package = "com.android.os.wearservices"; 26option java_multiple_files = true; 27 28extend Atom { 29 // Pushed Atom 30 optional WsWearTimeSession ws_wear_time_session = 610 31 [(module) = "wearservices"]; 32 33 optional WsIncomingCallActionReported ws_incoming_call_action_reported = 626 34 [(module) = "wearservices"]; 35 36 optional WsCallDisconnectionReported ws_call_disconnection_reported = 627 37 [(module) = "wearservices"]; 38 39 optional WsCallDurationReported ws_call_duration_reported = 628 40 [(module) = "wearservices"]; 41 42 optional WsCallUserExperienceLatencyReported ws_call_user_experience_latency_reported = 629 43 [(module) = "wearservices"]; 44 45 optional WsCallInteractionReported ws_call_interaction_reported = 630 46 [(module) = "wearservices"]; 47 48 optional WsOnBodyStateChanged ws_on_body_state_changed = 787 49 [(module) = "wearservices"]; 50 51 optional WsWatchFaceRestrictedComplicationsImpacted 52 ws_watch_face_restricted_complications_impacted = 802 53 [(module) = "wearservices"]; 54 55 optional WsWatchFaceDefaultRestrictedComplicationsRemoved 56 ws_watch_face_default_restricted_complications_removed = 803 57 [(module) = "wearservices"]; 58 59 optional WsComplicationsImpactedNotificationEventReported 60 ws_complications_impacted_notification_event_reported = 804 61 [(module) = "wearservices"]; 62 63 // Pulled Atom 64 optional WsStandaloneModeSnapshot ws_standalone_mode_snapshot = 10197 65 [(module) = "wearservices"]; 66 67 optional WsFavouriteWatchFaceSnapshot ws_favorite_watch_face_snapshot = 10206 68 [(module) = "wearservices"]; 69} 70 71/** 72 * Logged whenever an incoming call is accepted or rejected or silenced. 73 * 74 * Logged from package : 75 * vendor/google_clockwork_partners/packages/WearServices 76 */ 77message WsIncomingCallActionReported { 78 79 // Depicts different call actions possible. 80 // Values: (CALL_ACTION_ACCEPTED, CALL_ACTION_REJECTED, CALL_ACTION_SILENCED) 81 optional android.app.wearservices.CallAction action = 1; 82 83 // Depicts different call account in use. 84 // Values: (CALL_SOURCE_WATCH, CALL_SOURCE_PHONE_HFP, 85 // CALL_SOURCE_PHONE_COMPANION) 86 optional android.app.wearservices.CallSource call_source = 2; 87} 88 89/** 90 * Logged whenever a call is disconnected. 91 * 92 * Logged from package : 93 * vendor/google_clockwork_partners/packages/WearServices 94 */ 95message WsCallDisconnectionReported { 96 97 // Depicts Disconnection reason. 98 // Values: (DISCONNECT_REASON_ERROR, DISCONNECT_REASON_REJECTED, etc) 99 optional android.app.wearservices.DisconnectionReason reason = 1; 100 101 // Depicts the error behind the disconnection. 102 // Values: (DISCONNECTION_ERROR_CODE_DIALER, 103 // DISCONNECTION_ERROR_CODE_PHONE_DISCONNECTED, etc) 104 optional android.app.wearservices.DisconnectionErrorCode error_code = 2; 105} 106 107/** 108 * Logged whenever an incoming or outgoing call is bridged and picked up. 109 * The call picked up can be either on the watch, phone or via another connected 110 * device like bluetooth headphones. 111 * 112 * Logged from package : 113 * vendor/google_clockwork_partners/packages/WearServices 114 */ 115message WsCallDurationReported { 116 117 // Depicts the type of call. 118 // Values: (CALL_TYPE_INCOMING, CALL_TYPE_OUTGOING) 119 optional android.app.wearservices.CallType call_type = 1; 120 121 // This field depicts whether the call was accepted or initiated on the watch. 122 // For OUTGOING calls it MUST be set to true when the call is initiated on the 123 // watch, for INCOMING calls it MUST be set to true when the call is accepted 124 // on the watch. 125 optional bool is_initiated_or_accepted_on_watch = 2; 126 127 // Depicts different call account in use. 128 // Values: (CALL_SOURCE_WATCH, CALL_SOURCE_PHONE_HFP, 129 // CALL_SOURCE_PHONE_COMPANION) 130 optional android.app.wearservices.CallSource call_source = 3; 131 132 // Depicts call duration in millis. 133 optional int32 call_duration_millis = 4; 134} 135 136/** 137 * Logged whenever a call request is received and bridged to the watch. 138 * This metric particularly measures the latency of different stages and actions 139 * during a call. 140 * 141 * Logged from package : 142 * vendor/google_clockwork_partners/packages/WearServices 143 */ 144message WsCallUserExperienceLatencyReported { 145 146 // Depicts for what action the latency is being reported. 147 // Values: (LATENCY_ACTION_CALL_CREATION, LATENCY_ACTION_RING, 148 // LATENCY_ACTION_PICKED_CALL, LATENCY_ACTION_AUDIO_OUTPUT_SWITCH) 149 optional android.app.wearservices.LatencyAction latency_action = 1; 150 151 // Depicts the result of the overall call. 152 // Values: CALL_RESULT_NO_INTERACTION_ON_WATCH, CALL_RESULT_ACCEPTED_ON_WATCH, 153 // CALL_RESULT_REJECTED_ON_WATCH) 154 optional android.app.wearservices.CallResult result = 2; 155 156 // Depicts latency duration in millis. 157 optional int32 latency_duration_millis = 3; 158} 159 160/** 161 * Logged for call interactions in Wear Services. 162 * 163 * Logged from package : 164 * vendor/google_clockwork_partners/packages/WearServices 165 */ 166message WsCallInteractionReported { 167 168 // Depicts user interaction during the call. 169 // Values: (CALL_INTERACTION_VOLUME_INCREASE, 170 // CALL_INTERACTION_VOLUME_DECREASE, CALL_INTERACTION_MUTE) 171 optional android.app.wearservices.CallInteraction interaction = 1; 172 173 // Depicts different call account in use. 174 // Values: (CALL_SOURCE_WATCH, CALL_SOURCE_PHONE_HFP, 175 // CALL_SOURCE_PHONE_COMPANION) 176 optional android.app.wearservices.CallSource call_source = 2; 177} 178 179/** 180 * Atom used to log the wear time for Wearables. 181 * 182 * Logged from package : 183 * vendor/google_clockwork_partners/packages/WearServices 184 */ 185message WsWearTimeSession { 186 optional int64 session_duration_millis = 1; 187} 188 189/** 190 * Atom used to log that on body state of a Wearable have changed. 191 * Logged from package : 192 * vendor/google_clockwork_partners/packages/WearServices 193 */ 194message WsOnBodyStateChanged { 195 optional android.app.wearservices.OnBodyState on_body_state = 1; 196} 197 198/** 199* A snapshot of the tether status on certain watches. 200* (go/wear-tether-mode-telemetry) 201* 202* Logged from package : 203* vendor/google_clockwork_partners/packages/WearServices 204*/ 205message WsStandaloneModeSnapshot { 206 // Depicts the standalone/tether status of the watch. 207 optional android.app.wearservices.TetherConfigurationStatus tether_configuration_status = 1; 208} 209 210/** 211 * Logged for each watch face affected by the complication restrictions during 212 * upgrading to a build that supports the feature. 213 */ 214message WsWatchFaceRestrictedComplicationsImpacted { 215 // Watch face package uid. 216 optional int32 watch_face_package_uid = 1 [(is_uid) = true]; 217 218 // Watch face component class name. 219 optional string watch_face_component_class_name = 2; 220 221 // Complication component package UIDs for complications being restricted. 222 // A single watch face may have multiple restricted complications and each entry in this field 223 // corresponds to one of the restricted complications being removed. 224 repeated int32 complication_component_package_uid = 3 [(is_uid) = true]; 225 226 // Complication component class names for complications being restricted corresponding to each 227 // restricted complication on the watch face. 228 repeated string complication_component_class_name = 4; 229 230 // Complication type (e.g. icon, small text) corresponding to the integer values defined in 231 // ComplicationData 232 // see: http://cs/h/googleplex-android/platform/frameworks/support/+/androidx-platform-release:wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.kt 233 repeated int32 complication_type = 5; 234 235 // Indicates whether this watch face is the currently active watch face. 236 optional bool is_current_active = 6; 237} 238 239/** 240 * Snapshot of a favorite watch face with all of its complications. 241 */ 242message WsFavouriteWatchFaceSnapshot { 243 // Active watch face package uid. 244 optional int32 watch_face_package_uid = 1 [(is_uid) = true]; 245 246 // Active watch face class name. This will be 247 // null for Declarative WF packages, as these packages have only one WF. 248 optional string watch_face_class_name = 2; 249 250 // An ID number generated on a watch to uniquely identify watch face instances. 251 // An Androidx watch face can be added multiple times to the favorites list and this field is used 252 // to differentiate each instance, without leaking any information about the watch face itself. 253 // Note: equals to -1 in case of WSL watch faces. 254 optional int32 favorite_id = 3; 255 256 // Complication package name. 257 repeated int32 complication_component_package_uid = 4 [(is_uid) = true]; 258 259 // Complication component class name. 260 repeated string complication_component_class_name = 5; 261 262 // Complication type (e.g. icon, small text) corresponding to the integer values defined in 263 // ComplicationData 264 // see: http://cs/h/googleplex-android/platform/frameworks/support/+/androidx-platform-release:wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.kt 265 repeated int32 complication_type = 6; 266 267 // Indicates whether this watch face is the current active one. 268 optional bool is_current_active = 7; 269 270 // Indicates whether this watch face is restricted. 271 optional bool is_restricted = 8; 272} 273 274/** 275 * Logged whenever a user adds a watch face to the list of favorites and it contains 276 * restricted default complications. 277 */ 278message WsWatchFaceDefaultRestrictedComplicationsRemoved { 279 // Watch face package uid. 280 optional int32 watch_face_package_uid = 1 [(is_uid) = true]; 281 282 // Watch face component class name. 283 optional string watch_face_component_class_name = 2; 284 285 // Complication component package uids for complications being restricted. 286 repeated int32 complication_component_package_uid = 3 [(is_uid) = true]; 287 288 // Complication component class names for complications being restricted. 289 repeated string complication_component_class_name = 4; 290 291 // Complication type (e.g. icon, small text) corresponding to the integer values defined in 292 // ComplicationData 293 // see: http://cs/h/googleplex-android/platform/frameworks/support/+/androidx-platform-release:wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.kt 294 repeated int32 complication_type = 5; 295 296 // Complication slot IDs being affected by the restriction. 297 // Each watch face defines some complication slots. Each slot corresponds to a complication that 298 // can be configured on the watch face (e.g. battery, steps). Slots on the same watch face are 299 // defined with unique IDs. Those IDs are not unique across devices. 300 repeated int32 slot_id = 6; 301 302 // Type of the watch face being affected by the restriction. 303 optional android.app.wearservices.WatchFaceType watch_face_type = 7; 304} 305 306/** 307 * Logged whenever a user gets the notification informing them that their watch faces are affected 308 * by the complications restrictions, or they click on the "open on phone" action. 309 */ 310message WsComplicationsImpactedNotificationEventReported { 311 enum Event { 312 UNSPECIFIED = 0; 313 314 // Indicates that the notification is sent. 315 SENT = 1; 316 317 // Indicates that the user clicked through the notification to the help center. 318 CLICKED = 2; 319 } 320 optional Event event = 1; 321} 322