• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.photopicker;
20
21option java_outer_classname = "PhotopickerProtoEnums";
22option java_multiple_files = true;
23
24/*
25 Number of items allowed to be picked
26 */
27enum PickerPermittedSelection {
28  SINGLE = 0;
29  MULTIPLE = 1;
30  UNSET_PICKER_PERMITTED_SELECTION = 2;
31}
32
33/*
34 The user profile the picker is currently opened in
35 */
36enum UserProfile {
37  WORK = 0;
38  PERSONAL = 1;
39  PRIVATE_SPACE = 2;
40  UNKNOWN = 3;
41  UNSET_USER_PROFILE = 4;
42}
43
44/*
45 Holds the picker state at the moment
46 */
47enum PickerStatus {
48  OPENED = 0;
49  CANCELED = 1;
50  CONFIRMED = 2;
51  UNSET_PICKER_STATUS = 3;
52}
53
54/*
55 Defines the kind of picker that was opened
56 */
57enum PickerMode {
58  REGULAR_PICKER = 0;
59  EMBEDDED_PICKER = 1;
60  PERMISSION_MODE_PICKER = 2;
61  UNSET_PICKER_MODE = 3;
62}
63
64/*
65 Captures how the picker was closed
66 */
67enum PickerCloseMethod {
68  SWIPE_DOWN = 0;
69  CROSS_BUTTON  =1;
70  BACK_BUTTON = 2;
71  PICKER_SELECTION_CONFIRMED = 3;
72  UNSET_PICKER_CLOSE_METHOD = 4;
73}
74
75/*
76 The size of the picker on the screen
77 */
78enum PickerSize {
79  COLLAPSED = 0;
80  EXPANDED = 1;
81  UNSET_PICKER_SIZE = 2;
82}
83
84/*
85 The intent action that launches the picker
86 */
87enum PickerIntentAction {
88  ACTION_PICK_IMAGES = 0;
89  ACTION_GET_CONTENT = 1;
90  ACTION_USER_SELECT = 2;
91  UNSET_PICKER_INTENT_ACTION = 3;
92}
93
94/*
95 Different media item types in the picker
96 */
97enum MediaType {
98  PHOTO = 0;
99  VIDEO = 1;
100  PHOTO_VIDEO = 2;
101  GIF = 3;
102  LIVE_PHOTO = 4;
103  OTHER = 5;
104  UNSET_MEDIA_TYPE = 6;
105}
106
107/*
108 Different picker tabs
109 */
110enum SelectedTab {
111  PHOTOS = 0;
112  ALBUMS = 1;
113  COLLECTIONS = 2;
114  UNSET_SELECTED_TAB = 3;
115}
116
117/*
118 Different picker albums
119 */
120enum SelectedAlbum {
121  FAVORITES = 0;
122  CAMERA = 1;
123  DOWNLOADS = 2;
124  SCREENSHOTS = 3;
125  VIDEOS = 4;
126  UNDEFINED_LOCAL = 5;
127  UNDEFINED_CLOUD = 6;
128  UNSET_SELECTED_ALBUM = 7;
129}
130
131/*
132 Holds multiple user interactions with the picker
133 */
134enum UiEvent {
135  PICKER_MENU_CLICKED = 0;
136  ENTER_PICKER_PREVIEW_MODE = 1;
137  SWITCH_PICKER_TAB = 2;
138  SWITCH_USER_PROFILE = 3;
139  PICKER_MAIN_GRID_INTERACTION = 4;
140  PICKER_ALBUMS_INTERACTION = 5;
141  PICKER_CLICK_ADD_BUTTON = 6;
142  PICKER_CLICK_VIEW_SELECTED = 7;
143  PICKER_LONG_SELECT_MEDIA_ITEM = 8;
144  EXPAND_PICKER = 9;
145  COLLAPSE_PICKER = 10;
146  PROFILE_SWITCH_BUTTON_CLICK = 11;
147  ACTION_BAR_HOME_BUTTON_CLICK = 12;
148  PICKER_BACK_GESTURE_CLICK = 13;
149  PICKER_MENU_CLICK = 14;
150  MAIN_GRID_OPEN = 15;
151  ALBUM_FAVOURITES_OPEN = 16;
152  ALBUM_CAMERA_OPEN = 17;
153  ALBUM_DOWNLOADS_OPEN = 18;
154  ALBUM_SCREENSHOTS_OPEN = 19;
155  ALBUM_VIDEOS_OPEM = 20;
156  ALBUM_FROM_CLOUD_OPEN = 21;
157  UI_LOADED_PHOTOS = 22;
158  UI_LOADED_ALBUMS = 23;
159  UI_LOADED_ALBUM_CONTENTS = 24;
160  CREATE_SURFACE_CONTROLLER_START = 25;
161  CREATE_SURFACE_CONTROLLER_END = 26;
162  PICKER_PRELOADING_START = 27;
163  PICKER_PRELOADING_FINISHED = 28;
164  PICKER_PRELOADING_FAILED = 29;
165  PICKER_PRELOADING_CANCELLED = 30;
166  PICKER_BROWSE_DOCUMENTS_UI = 31;
167  ENTER_PICKER_SEARCH = 32;
168  SELECT_SEARCH_CATEGORY = 33;
169  UNSET_UI_EVENT = 34;
170  SELECT_SEARCH_RESULT = 35;
171  PICKER_CATEGORIES_INTERACTION = 36;
172  CATEGORIES_PEOPLEPET_OPEN = 37;
173  CATEGORIES_MEDIA_SETS_OPEN = 38;
174  UI_LOADED_CATEGORIES_AND_ALBUMS = 39;
175  UI_LOADED_MEDIA_SETS = 40;
176  UI_LOADED_MEDIA_SETS_CONTENTS = 41;
177  UI_LOADED_SEARCH_SUGGESTIONS = 42;
178  UI_LOADED_SEARCH_RESULTS = 43;
179  UI_LOADED_EMPTY_STATE = 44;
180  PICKER_TRANSCODING_STARTED = 45;
181  PICKER_TRANSCODING_FINISHED = 46;
182  PICKER_TRANSCODING_FAILED = 47;
183}
184
185/*
186 Holds the selection status of the media items
187 */
188enum MediaStatus {
189  SELECTED = 0;
190  UNSELECTED = 1;
191  UNSET_MEDIA_STATUS = 2;
192}
193
194/*
195 Holds the location of the media item
196 */
197enum MediaLocation {
198  MAIN_GRID = 0;
199  ALBUM = 1;
200  GROUP = 2 [deprecated = true];
201  UNSET_MEDIA_LOCATION = 3;
202  CATEGORY = 4;
203  SEARCH_GRID = 5;
204}
205
206/*
207 Defines how the user entered the preview mode
208 */
209enum PreviewModeEntry {
210  VIEW_SELECTED = 0;
211  LONG_PRESS = 1;
212  UNSET_PREVIEW_MODE_ENTRY = 2;
213}
214
215/*
216 Defines different video playback user interactions
217 */
218enum VideoPlayBackInteractions {
219  PLAY = 0;
220  PAUSE = 1;
221  MUTE = 2;
222  UNSET_VIDEO_PLAYBACK_INTERACTION = 3;
223}
224
225/*
226 Picker menu item options
227 */
228enum MenuItemSelected {
229  BROWSE = 0;
230  CLOUD_SETTINGS = 1;
231  UNSET_MENU_ITEM_SELECTED = 2;
232}
233
234/*
235 Holds the different kind of banners displayed in the picker
236 */
237enum BannerType {
238  CLOUD_MEDIA_AVAILABLE = 0;
239  ACCOUNT_UPDATED = 1;
240  CHOOSE_ACCOUNT = 2;
241  CHOOSE_APP = 3;
242  UNSET_BANNER_TYPE = 4;
243}
244
245/*
246 Different user interactions with the above defined banners
247 */
248enum UserBannerInteraction {
249  CLICK_BANNER_ACTION_BUTTON = 0;
250  CLICK_BANNER_DISMISS_BUTTON = 1;
251  CLICK_BANNER = 2;
252  UNSET_USER_BANNER_INTERACTION = 3;
253}
254
255/*
256 Different ways of searching in the picker
257 */
258enum SearchMethod {
259  SEARCH_QUERY = 0;
260  COLLECTION = 1 [deprecated = true];
261  SUGGESTED_SEARCHES = 2;
262  UNSET_SEARCH_METHOD = 3;
263  CATEGORY_SEARCH = 4;
264}
265
266/*
267 Different video HDR formats
268 */
269enum AppMediaCapabilityHdrType {
270  TYPE_UNSPECIFIED= 0;
271  TYPE_DOLBY_VISION = 1;
272  TYPE_HDR10 = 2;
273  TYPE_HDR10_PLUS = 3;
274  TYPE_HLG = 4;
275}
276
277/*
278 Different video mime types
279*/
280enum VideoMimeType {
281  MIME_UNSPECIFIED = 0;
282  MIME_DOLBY = 1;
283  MIME_HEVC = 2;
284}
285