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 17 package com.android.settings.accessibility; 18 19 import androidx.annotation.ColorInt; 20 import androidx.annotation.StringRes; 21 22 import com.android.settings.R; 23 24 enum ScreenFlashNotificationColor { 25 BLUE(0x4D0000FE, R.string.screen_flash_color_blue), 26 AZURE(0x660080FF, R.string.screen_flash_color_azure), 27 CYAN(0x4D00FFFF, R.string.screen_flash_color_cyan), 28 SPRING_GREEN(0x6600FF7F, R.string.screen_flash_color_spring_green), 29 GREEN(0x6600FF01, R.string.screen_flash_color_green), 30 CHARTREUSE_GREEN(0x6680FF00, R.string.screen_flash_color_chartreuse_green), 31 YELLOW(0x66FFFF00, R.string.screen_flash_color_yellow), 32 ORANGE(0x66FF7F00, R.string.screen_flash_color_orange), 33 RED(0x66FE0000, R.string.screen_flash_color_red), 34 ROSE(0x4DFF017E, R.string.screen_flash_color_rose), 35 MAGENTA(0x4DFF00FE, R.string.screen_flash_color_magenta), 36 VIOLET(0x667F00FF, R.string.screen_flash_color_violet); 37 38 static final int ALPHA_MASK = 0xFF000000; 39 40 final int mColorInt; 41 final int mOpaqueColorInt; 42 final int mStringRes; 43 ScreenFlashNotificationColor(@olorInt int colorInt, @StringRes int stringRes)44 ScreenFlashNotificationColor(@ColorInt int colorInt, @StringRes int stringRes) { 45 this.mColorInt = colorInt; 46 this.mStringRes = stringRes; 47 this.mOpaqueColorInt = colorInt | ALPHA_MASK; 48 } 49 } 50