/* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.photopicker; option java_outer_classname = "PhotopickerProtoEnums"; option java_multiple_files = true; /* Number of items allowed to be picked */ enum PickerPermittedSelection { SINGLE = 0; MULTIPLE = 1; } /* The user profile the picker is currently opened in */ enum UserProfile { WORK = 0; PERSONAL = 1; PRIVATE_SPACE = 2; UNKNOWN = 3; } /* Holds the picker state at the moment */ enum PickerStatus { OPENED = 0; CANCELED = 1; CONFIRMED = 2; } /* Defines the kind of picker that was opened */ enum PickerMode { REGULAR_PICKER = 0; EMBEDDED_PICKER = 1; PERMISSION_MODE_PICKER = 2; } /* Captures how the picker was closed */ enum PickerCloseMethod { SWIPE_DOWN = 0; CROSS_BUTTON =1; BACK_BUTTON = 2; } /* The size of the picker on the screen */ enum PickerSize { COLLAPSED = 0; EXPANDED = 1; } /* The intent action that launches the picker */ enum PickerIntentAction { ACTION_PICK_IMAGES = 0; ACTION_GET_CONTENT = 1; } /* Different media item types in the picker */ enum MediaType { PHOTO = 0; VIDEO = 1; GIF = 2; LIVE_PHOTO = 3; OTHER = 4; } /* Different picker tabs */ enum SelectedTab { PHOTOS = 0; ALBUMS = 1; COLLECTIONS = 2; } /* Different picker albums */ enum SelectedAlbum { FAVORITES = 0; CAMERA = 1; DOWNLOADS = 2; SCREENSHOTS = 3; VIDEOS = 4; UNDEFINED_LOCAL = 5; UNDEFINED_CLOUD = 6; } /* Holds multiple user interactions with the picker */ enum UiEvent { PICKER_MENU_CLICKED = 0; ENTER_PICKER_PREVIEW_MODE = 1; SWITCH_PICKER_TAB = 2; SWITCH_USER_PROFILE = 3; PICKER_MAIN_GRID_INTERACTION = 4; PICKER_ALBUMS_INTERACTION = 5; PICKER_CLICK_ADD_BUTTON = 6; PICKER_CLICK_VIEW_SELECTED = 7; PICKER_LONG_SELECT_MEDIA_ITEM = 8; EXPAND_PICKER = 9; COLLAPSE_PICKER = 10; PROFILE_SWITCH_BUTTON_CLICK = 11; ACTION_BAR_HOME_BUTTON_CLICK = 12; PICKER_BACK_GESTURE_CLICK = 13; PICKER_MENU_CLICK = 14; MAIN_GRID_OPEN = 15; ALBUM_FAVOURITES_OPEN = 16; ALBUM_CAMERA_OPEN = 17; ALBUM_DOWNLOADS_OPEN = 18; ALBUM_SCREENSHOTS_OPEN = 19; ALBUM_VIDEOS_OPEM = 20; ALBUM_FROM_CLOUD_OPEN = 21; UI_LOADED_PHOTOS = 22; UI_LOADED_ALBUMS = 23; UI_LOADED_ALBUM_CONTENTS = 24; CREATE_SURFACE_CONTROLLER_START = 25; CREATE_SURFACE_CONTROLLER_END = 26; PICKER_PRELOADING_START = 27; PICKER_PRELOADING_FINISHED = 28; PICKER_PRELOADING_FAILED = 29; PICKER_PRELOADING_CANCELLED = 30; PICKER_BROWSE_DOCUMENTS_UI = 31; ENTER_PICKER_SEARCH = 32; SELECT_SEARCH_CATEGORY = 33; } /* Holds the selection status of the media items */ enum MediaStatus { SELECTED = 0; UNSELECTED = 1; } /* Holds the location of the media item */ enum MediaLocation { MAIN_GRID = 0; ALBUM = 1; GROUP = 2; } /* Defines how the user entered the preview mode */ enum PreviewModeEntry { VIEW_SELECTED = 0; LONG_PRESS = 1; } /* Defines different video playback user interactions */ enum VideoPlayBackInteractions { PLAY = 0; PAUSE = 1; MUTE = 2; } /* Picket menu item options */ enum MenuItemSelected { BROWSE = 0; CLOUD_SETTINGS = 1; } /* Holds the different kind of banners displayed in the picker */ enum BannerType { CLOUD_MEDIA_AVAILABLE = 0; ACCOUNT_UPDATED = 1; CHOOSE_ACCOUNT = 2; CHOOSE_APP = 3; } /* Different user interactions with the above defined banners */ enum UserBannerInteraction { CLICK_BANNER_ACTION_BUTTON = 0; CLICK_BANNER_DISMISS_BUTTON = 1; CLICK_BANNER = 2; } /* Different ways of searching in the picker */ enum SearchMethod { SEARCH_QUERY = 0; COLLECTION = 1; SUGGESTED_SEARCHES = 2; }