xref: /aosp_15_r20/frameworks/proto_logging/stats/atoms/wearservices/wearservices_atoms.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
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/atom_field_options.proto";
22import "frameworks/proto_logging/stats/enums/app/wearservices/wearservices_enums.proto";
23
24option java_package = "com.android.os.wearservices";
25option java_multiple_files = true;
26
27/**
28 * Logged during a backup session in Wear Services.
29 *
30 * Logged from :
31 * vendor/google_clockwork_partners/packages/WearServices/src/com/google/wear/services/backup/WearServicesBackupAgent.java
32 */
33message WsBackupActionReported {
34  // Depicts the action being performed for backup.
35  // Values : (BACKUP_STARTED, BACKUP_SUCCEEDED, BACKUP_FAILED)
36  optional android.app.wearservices.BackupAction action = 1;
37}
38
39/**
40 * Logged during a restore session in Wear Services.
41 *
42 * Logged from package :
43 * vendor/google_clockwork_partners/packages/WearServices
44 */
45message WsRestoreActionReported {
46  // Depicts the action being performed for restore.
47  // Values : (RESTORE_STARTED, RESTORE_SUCCEEDED, RESTORE_FAILED)
48  optional android.app.wearservices.RestoreAction action = 1;
49}
50
51/** Logged when a notification is updated in the WearServices application. */
52message WsNotificationUpdated {
53  // Package name of the application that created the notification event.
54  optional string package_name = 1;
55
56  // Notification action that this event represents.
57  optional android.app.wearservices.NotificationUpdateAction update_action = 2;
58
59  // Device on which the notification event was created.
60  optional android.app.wearservices.RequestSource source_device = 3;
61
62  // Importance of the notification after this update.
63  optional android.app.wearservices.NotificationImportance importance = 4;
64
65  // The transport channel this notification is coming from.
66  optional android.app.wearservices.NotificationTransportChannel
67      transport_channel = 5;
68
69  // The alerting effect of the notification.
70  optional android.app.wearservices.NotificationAlertingEffect alerting_effect =
71      6;
72
73  // The group alert behavior of the notification.
74  optional android.app.wearservices.NotificationGroupAlertBehavior
75      group_alert_behavior = 7;
76
77  // The alert behavior controlled by the ALERT_ONLY_ONCE flag.
78  optional android.app.wearservices.NotificationAlertOnlyOnce alert_only_once =
79      8;
80
81  // The group type of the notification.
82  optional android.app.wearservices.NotificationGroupType group_type = 9;
83
84  // The style of the notification.
85  optional android.app.wearservices.NotificationStyle style = 10;
86
87  // The hidden reason of the notification.
88  optional android.app.wearservices.NotificationHiddenReason hidden_reason = 11;
89
90  // The categories for the notification.
91  optional android.app.wearservices.NotificationCategory category = 12;
92
93  // Whether this notification has set FLAG_ONGOING_EVENT. Which means there may
94  // be many updates for this notification. (eg. app download progress updates).
95  optional bool is_ongoing_notification = 13;
96
97  // Whether this notification is an emergency cell broadcast message.
98  optional bool is_emergency = 14;
99
100  // Whether this notification comes from apps running in the work profile.
101  optional bool is_work_profile = 15;
102
103  // The content intent actions for the notification.
104  optional android.app.wearservices.NotificationContentIntent content_intent =
105      16;
106
107  // Whether actions contain remote input (e.g. Reply).
108  optional bool has_remote_input = 17;
109
110  // Number value for all actions, including actions with remote input. Count
111  // wearable actions if they exist, otherwise counting the standard actions.
112  // Can be 0 or above, cap to 10 as we have this same limit in SysUI.
113  optional int32 action_count = 18;
114
115  // Whether this notification contains bigPicture image, largeIcon image, or
116  // message images.
117  optional bool has_big_images = 19;
118
119  // Whether this notification has set a dismissal-id.
120  optional bool has_dismissal_id = 20;
121
122  // Whether this notification has set FLAG_FOREGROUND_SERVICE. Which means the
123  // notification may be frequently updated.
124  optional bool is_foreground_service = 21;
125
126  // Whether this notification has set FLAG_PROMOTED_ONGOING.
127  optional bool is_promoted_ongoing = 22;
128
129  // Whether this notification has promotable characteristics, taken from
130  // Notification#hasPromotableCharacteristics().
131  optional bool has_promotable_characteristics = 23;
132}
133
134/** Logged when a notification is updated in the WearServices application. */
135message WsNotificationDismissalActioned {
136  // Package name of the application that created the notification event.
137  optional string package_name = 1;
138
139  // Defining the actions for notification to be dismissed.
140  optional android.app.wearservices.NotificationDismissAction dismiss_action = 2;
141
142  // Device on which the notification event was created.
143  optional android.app.wearservices.RequestSource source_device = 3;
144
145  // Importance of the notification after this update.
146  optional android.app.wearservices.NotificationImportance importance = 4;
147
148  // The style of the notification.
149  optional android.app.wearservices.NotificationStyle style = 5;
150
151  // The categories for the notification.
152  optional android.app.wearservices.NotificationCategory category = 6;
153
154  // Whether this notification comes from apps running in the work profile.
155  optional bool is_work_profile = 7;
156
157  // Supported notification cancellation reasons for which the notification is being dismissed.
158  optional android.app.wearservices.NotificationCancelReason cancel_reason = 8;
159
160  // The group type of the notification.
161  optional android.app.wearservices.NotificationGroupType group_type = 9;
162}
163
164/** Logged when a notification is updated in the WearServices application. */
165message WsNotificationActioned {
166  // Package name of the application that created the notification event.
167  optional string package_name = 1;
168
169  // Defines the action for a particular update.
170  optional android.app.wearservices.NotificationActionType action_type = 2;
171
172  // Device on which the notification event was created.
173  optional android.app.wearservices.RequestSource source_device = 3;
174
175  // Importance of the notification after this update.
176  optional android.app.wearservices.NotificationImportance importance = 4;
177
178  // The style of the notification.
179  optional android.app.wearservices.NotificationStyle style = 5;
180
181  // The categories for the notification.
182  optional android.app.wearservices.NotificationCategory category = 6;
183
184  // Whether this notification comes from apps running in the work profile.
185  optional bool is_work_profile = 7;
186
187  // Representing string for the notification action title for the action pressed.
188  optional android.app.wearservices.NotificationActionTitle action_title = 8;
189}
190
191/** Logged when bridge mode configuration of notifications for an applications are updated. */
192message WsNotificationBridgemodeUpdated {
193  // Package name of the application that created the notification event.
194  optional string package_name = 1;
195
196  // Represents whether notification bridging is enabled in the configuration.
197  optional bool is_bridging_enabled = 2;
198
199  // Defines the bridge configuration type.
200  optional android.app.wearservices.BridgeConfig bridge_config = 3;
201
202  // Represents the number of excluded tags added.
203  optional android.app.wearservices.ExcludedTagsCount excluded_tags_count= 4;
204}
205
206/** Logged when a notification is blocked/unblocked in the WearServices application. */
207message WsNotificationBlocking {
208  // Package name of the application that created the notification event.
209  optional string package_name = 1;
210
211  // Device on which the notification event was created.
212  optional android.app.wearservices.RequestSource source_device = 2;
213
214  // Defines on which device the blocked state is changed.
215  optional android.app.wearservices.DeviceLocation device_location = 3;
216
217  // Defines in which profile the application is installed.
218  optional android.app.wearservices.Profile profile= 4;
219
220  // Blocking status of the notifications for the application.
221  optional android.app.wearservices.NotificationBlockingStatus notification_blocking_status = 5;
222}
223
224/** Logged for estimating the latency of a specific notification in a component. */
225message WsNotificationLatency {
226  // Package name of the application that created the notification event.
227  optional string package_name = 1;
228
229  // Device on which the notification event was created.
230  optional android.app.wearservices.RequestSource source_device = 2;
231
232  // Defines the notification flow component for which the latency is to be calculated.
233  optional android.app.wearservices.NotificationFlowComponent component_flow = 3;
234
235  // Defines which component the latency is being calculated for.
236  optional android.app.wearservices.ComponentName component_name= 4;
237
238  // The latency in milliseconds for the specific notification flow.
239  optional int64 duration_millis = 5;
240}
241
242/** Logged when a complication is tapped by the user. */
243message WsComplicationTapped {
244  // UID of the package name hosting the complication, calculated by
245  // PackageManager#getPackageUid.
246  optional int32 wf_component_package_uid = 1 [(is_uid) = true];
247
248  // Package uid for the provider component for complication.
249  optional int32 provider_component_package_uid = 2 [(is_uid) = true];
250
251  // Class name for the provider component.
252  optional string provider_class_name = 3;
253
254  // Type of the complication. Valid values are listed in
255  // androidx.wear.watchface.complications.data.ComplicationType.
256  optional int32 type = 4;
257}
258