• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 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.permissioncontroller;
20
21import "frameworks/proto_logging/stats/atoms.proto";
22import "frameworks/proto_logging/stats/atom_field_options.proto";
23
24// This file contains extension atoms for permission controller.
25option java_package = "com.android.os.permissioncontroller";
26option java_multiple_files = true;
27
28extend Atom {
29    optional PermissionRationaleDialogViewed permission_rationale_dialog_viewed =
30        645 [(module) = "permissioncontroller"];
31    optional PermissionRationaleDialogActionReported permission_rationale_dialog_action_reported =
32        646 [(module) = "permissioncontroller"];
33    optional AppDataSharingUpdatesNotificationInteraction app_data_sharing_updates_notification_interaction =
34        647 [(module) = "permissioncontroller"];
35    optional AppDataSharingUpdatesFragmentViewed app_data_sharing_updates_fragment_viewed =
36        648 [(module) = "permissioncontroller"];
37    optional AppDataSharingUpdatesFragmentActionReported app_data_sharing_updates_fragment_action_reported =
38        649 [(module) = "permissioncontroller"];
39}
40
41/**
42* Information about a Permission Rationale dialog viewed by user.
43* Logged from ui/model/v34/PermissionRationaleViewModel.java
44*/
45message PermissionRationaleDialogViewed {
46    // id which identifies single session of user interacting with permission controller
47    optional int64 session_id = 1;
48
49    // UID of package for which permissions are viewed
50    optional int32 uid = 2 [(is_uid) = true];
51
52    // Permission group viewed
53    optional string permission_group_name = 3;
54
55    // Data usage purposes shown to user for this permission group in the dialog - bit flags,
56    // bit numbers are in accordance with PURPOSE_ constants in DataPurposeConstants.java
57    optional int32 purposes_presented = 4;
58}
59
60/**
61 * Information about a button clicks made by user inside PermissionRationaleActivity
62 */
63message PermissionRationaleDialogActionReported {
64    // id which identifies single session of user interacting with permission controller
65    optional int64 session_id = 1;
66
67    // UID of package the permission belongs to
68    optional int32 uid = 2 [(is_uid) = true];
69
70    // The permission group currently presented
71    optional string permission_group_name = 3;
72
73    enum Button {
74        UNDEFINED = 0;
75        // Dialog canceled or back clicked
76        CANCEL = 1;
77        // Link to install source (app store)
78        INSTALL_SOURCE = 2;
79        // Link to help center article
80        HELP_CENTER = 3;
81        // Link to permission settings
82        PERMISSION_SETTINGS = 4;
83    }
84
85    // Button pressed in the dialog
86    optional Button button_pressed = 4;
87}
88
89/**
90 * Information about AppDataSharingUpdates notification and interaction
91 */
92message AppDataSharingUpdatesNotificationInteraction {
93    // Session Id to link the notification with the issue card.
94    optional int64 session_id = 1; // to map the notification and issue card interaction
95
96    enum Action {
97        UNKNOWN = 0;
98        NOTIFICATION_SHOWN = 1;
99        NOTIFICATION_CLICKED = 2;
100        DISMISSED = 3;
101    }
102
103    // Action taken on the notification.
104    optional Action action = 2;
105
106    // Number app data sharing updates represented by the notification
107    optional int32 number_of_app_updates = 3;
108}
109
110/**
111* Information about AppDataSharingUpdatesFragment viewed by user.
112* Logged from ui/model/v34/AppDataSharingUpdatesViewModel.java
113*/
114message AppDataSharingUpdatesFragmentViewed {
115    // id which identifies single session of user interacting with permission controller
116    optional int64 session_id = 1;
117
118    // Number of app data sharing updates displayed when viewed
119    optional int32 number_of_app_updates = 2;
120}
121
122/**
123 * Information about a button clicks made by user inside AppDataSharingUpdatesFragment
124 */
125message AppDataSharingUpdatesFragmentActionReported {
126    // id which identifies single session of user interacting with permission controller
127    optional int64 session_id = 1;
128
129    // UID of package the interacted data sharing update belongs to
130    optional int32 uid = 2 [(is_uid) = true];
131
132    enum DataSharingChange {
133        UNKNOWN = 0;
134        ADDS_ADVERTISING_PURPOSE = 1;
135        ADDS_SHARING_WITHOUT_ADVERTISING_PURPOSE = 2;
136        ADDS_SHARING_WITH_ADVERTISING_PURPOSE = 3;
137    }
138
139    // Data sharing change associated with this data sharing update
140    optional DataSharingChange data_sharing_change = 3;
141}
142