blob: 52a2160cdd7496f15d57961c2ea7f3ced348cfd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
syntax = "proto3";
package com.android.settingslib.graph;
option java_package = "com.android.settingslib.graph.proto";
option java_multiple_files = true;
// Proto represents preference graph.
message PreferenceGraphProto {
// Preference screens appear in the graph.
// Key: preference key of the PreferenceScreen. Value: PreferenceScreen.
map<string, PreferenceScreenProto> screens = 1;
// Roots of the graph.
// Each element is a preference key of the PreferenceScreen.
repeated string roots = 2;
// Activities appear in the graph.
// Key: activity class. Value: preference key of associated PreferenceScreen.
map<string, string> activity_screens = 3;
}
// Proto of PreferenceScreen.
message PreferenceScreenProto {
// Intent to show the PreferenceScreen.
optional IntentProto intent = 1;
// Root of the PreferenceScreen hierarchy.
optional PreferenceGroupProto root = 2;
// If the preference screen provides complete hierarchy by source code.
optional bool complete_hierarchy = 3;
// Parameterized screens (not recursive, provided on the top level only)
repeated ParameterizedPreferenceScreenProto parameterized_screens = 4;
}
// Proto of parameterized preference screen
message ParameterizedPreferenceScreenProto {
optional BundleProto args = 1;
optional PreferenceScreenProto screen = 2;
}
// Proto of PreferenceGroup.
message PreferenceGroupProto {
// Self information of PreferenceGroup.
optional PreferenceProto preference = 1;
// A list of children.
repeated PreferenceOrGroupProto preferences = 2;
}
// Proto represents either PreferenceProto or PreferenceGroupProto.
message PreferenceOrGroupProto {
oneof kind {
// It is a Preference.
PreferenceProto preference = 1;
// It is a PreferenceGroup.
PreferenceGroupProto group = 2;
}
}
// Proto of Preference.
message PreferenceProto {
// Key of the preference.
optional string key = 1;
// Title of the preference.
optional TextProto title = 2;
// Summary of the preference.
optional TextProto summary = 3;
// Icon of the preference.
optional int32 icon = 4;
// Additional keywords for indexing.
optional int32 keywords = 5;
// Extras of the preference.
optional BundleProto extras = 6;
// Whether the preference is indexable.
optional bool indexable = 7;
// Whether the preference is enabled.
optional bool enabled = 8;
// Whether the preference is available/visible.
optional bool available = 9;
// Whether the preference is persistent.
optional bool persistent = 10;
// Whether the preference is restricted by managed configurations.
optional bool restricted = 11;
// Target of the preference action.
optional ActionTarget action_target = 12;
// Preference value (if present, it means `persistent` is true).
optional PreferenceValueProto value = 13;
// Intent to show and locate the preference (might have highlight animation on
// the preference).
optional IntentProto launch_intent = 14;
// Descriptor of the preference value.
optional PreferenceValueDescriptorProto value_descriptor = 15;
// Indicate how sensitive of the preference.
optional int32 sensitivity_level = 16;
// The required permissions to read preference value.
optional PermissionsProto read_permissions = 17;
// The required permissions to write preference value.
optional PermissionsProto write_permissions = 18;
// Tag constants associated with the preference.
repeated string tags = 19;
// Permit to read and write preference value (the lower 15 bits is reserved for read permit).
optional int32 read_write_permit = 20;
// Target of an Intent
message ActionTarget {
oneof kind {
// Resolved key of the preference screen located in current app.
// This is resolved from android:fragment or activity of current app.
string key = 1;
// Unresolvable Intent that is either an unrecognized activity of current
// app or activity belongs to other app.
IntentProto intent = 2;
}
}
}
// Proto of permissions
message PermissionsProto {
repeated PermissionProto all_of = 1;
repeated PermissionProto any_of = 2;
}
// Proto of permission
message PermissionProto {
oneof kind {
string permission = 1;
PermissionsProto permissions = 2;
}
}
// Proto of string or string resource id.
message TextProto {
oneof text {
int32 resource_id = 1;
string string = 2;
}
}
// Proto of preference value.
message PreferenceValueProto {
oneof value {
bool boolean_value = 1;
int32 int_value = 2;
float float_value = 3;
}
}
// Proto of preference value descriptor.
message PreferenceValueDescriptorProto {
oneof type {
bool boolean_type = 1;
RangeValueProto range_value = 2;
bool float_type = 3;
}
}
// Proto of preference value that is between a range.
message RangeValueProto {
// The lower bound (inclusive) of the range.
optional int32 min = 1;
// The upper bound (inclusive) of the range.
optional int32 max = 2;
// The increment step within the range. 0 means unset, which implies step size is 1.
optional int32 step = 3;
}
// Proto of android.content.Intent
message IntentProto {
// The action of the Intent.
optional string action = 1;
// The data attribute of the Intent, expressed as a URI.
optional string data = 2;
// The package attribute of the Intent, which may be set to force the
// detection of a particular application package that can handle the event.
optional string pkg = 3;
// The component attribute of the Intent, which may be set to force the
// detection of a particular component (app). If present, this must be a
// package name followed by a '/' and then followed by the class name.
optional string component = 4;
// Flags controlling how intent is handled. The value must be bitwise OR of
// intent flag constants defined by Android.
// http://developer.android.com/reference/android/content/Intent.html#setFlags(int)
optional int32 flags = 5;
// Extended data from the intent.
optional BundleProto extras = 6;
// The MIME type of the Intent (e.g. "text/plain").
//
// For more information, see
// https://developer.android.com/reference/android/content/Intent#setType(java.lang.String).
optional string mime_type = 7;
}
// Proto of android.os.Bundle
message BundleProto {
// Bundle data.
map<string, BundleValue> values = 1;
message BundleValue {
// Bundle data value for the associated key name.
// Can be extended to support other types of bundled data.
oneof value {
string string_value = 1;
bytes bytes_value = 2;
int32 int_value = 3;
int64 long_value = 4;
bool boolean_value = 5;
double double_value = 6;
BundleProto bundle_value = 7;
}
}
}
|