1 /* 2 * Copyright (C) 2019 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.car.setupwizardlib.partner; 18 19 /** Resources that can be customized by partner overlay APK. */ 20 public enum PartnerConfig { 21 22 CONFIG_IMMERSIVE_MODE( 23 PartnerConfigKey.KEY_IMMERSIVE_MODE, ResourceType.STRING), 24 25 CONFIG_TOOLBAR_BG_COLOR( 26 PartnerConfigKey.KEY_TOOLBAR_BG_COLOR, ResourceType.COLOR), 27 28 CONFIG_TOOLBAR_BUTTON_ICON_BACK( 29 PartnerConfigKey.KEY_TOOLBAR_BUTTON_ICON_BACK, ResourceType.DRAWABLE), 30 31 CONFIG_TOOLBAR_BUTTON_ICON_CLOSE( 32 PartnerConfigKey.KEY_TOOLBAR_BUTTON_ICON_CLOSE, ResourceType.DRAWABLE), 33 34 CONFIG_TOOLBAR_NAV_ICON_MIRRORING_IN_RTL( 35 PartnerConfigKey.KEY_TOOLBAR_NAV_BUTTON_MIRRORING_IN_RTL, ResourceType.BOOLEAN), 36 37 CONFIG_TOOLBAR_BUTTON_FONT_FAMILY( 38 PartnerConfigKey.KEY_TOOLBAR_BUTTON_FONT_FAMILY, ResourceType.STRING), 39 40 CONFIG_TOOLBAR_BUTTON_PADDING_HORIZONTAL( 41 PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_HORIZONTAL, ResourceType.DIMENSION), 42 43 CONFIG_TOOLBAR_BUTTON_PADDING_VERTICAL( 44 PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_VERTICAL, ResourceType.DIMENSION), 45 46 CONFIG_TOOLBAR_BUTTON_RADIUS( 47 PartnerConfigKey.KEY_TOOLBAR_BUTTON_RADIUS, ResourceType.DIMENSION), 48 49 CONFIG_TOOLBAR_BUTTON_SPACING( 50 PartnerConfigKey.KEY_TOOLBAR_BUTTON_SPACING, ResourceType.DIMENSION), 51 52 CONFIG_TOOLBAR_BUTTON_TEXT_SIZE( 53 PartnerConfigKey.KEY_TOOLBAR_BUTTON_TEXT_SIZE, ResourceType.DIMENSION), 54 55 CONFIG_TOOLBAR_PRIMARY_BUTTON_BG( 56 PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_BG, ResourceType.DRAWABLE), 57 58 CONFIG_TOOLBAR_PRIMARY_BUTTON_BG_COLOR( 59 PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_BG_COLOR, ResourceType.COLOR), 60 61 CONFIG_TOOLBAR_PRIMARY_BUTTON_TEXT_COLOR( 62 PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_TEXT_COLOR, ResourceType.COLOR), 63 64 CONFIG_TOOLBAR_SECONDARY_BUTTON_BG( 65 PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_BG, ResourceType.DRAWABLE), 66 67 CONFIG_TOOLBAR_SECONDARY_BUTTON_BG_COLOR( 68 PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_BG_COLOR, ResourceType.COLOR), 69 70 CONFIG_TOOLBAR_SECONDARY_BUTTON_TEXT_COLOR( 71 PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_TEXT_COLOR, ResourceType.COLOR), 72 73 CONFIG_TOOLBAR_DIVIDER_BG( 74 PartnerConfigKey.KEY_TOOLBAR_DIVIDER_BG, ResourceType.DRAWABLE), 75 76 CONFIG_TOOLBAR_DIVIDER_LINE_WEIGHT( 77 PartnerConfigKey.KEY_TOOLBAR_DIVIDER_LINE_WEIGHT, ResourceType.DIMENSION), 78 79 CONFIG_LOADING_INDICATOR_COLOR( 80 PartnerConfigKey.KEY_LOADING_INDICATOR_COLOR, ResourceType.COLOR), 81 82 CONFIG_LOADING_INDICATOR_LINE_WEIGHT( 83 PartnerConfigKey.KEY_LOADING_INDICATOR_LINE_WEIGHT, ResourceType.DIMENSION), 84 85 CONFIG_LAYOUT_BG_COLOR( 86 PartnerConfigKey.KEY_LAYOUT_BG_COLOR, ResourceType.COLOR), 87 88 CONFIG_ULTRA_WIDE_SCREEN_CONTENT_WIDTH( 89 PartnerConfigKey.KEY_ULTRA_WIDE_SCREEN_CONTENT_WIDTH, ResourceType.DIMENSION); 90 91 public enum ResourceType { 92 COLOR, 93 DRAWABLE, 94 STRING, 95 DIMENSION, 96 BOOLEAN, 97 } 98 99 private final String mResourceName; 100 private final ResourceType mResourceType; 101 getResourceType()102 public ResourceType getResourceType() { 103 return mResourceType; 104 } 105 getResourceName()106 public String getResourceName() { 107 return mResourceName; 108 } 109 PartnerConfig(@artnerConfigKey String resourceName, ResourceType type)110 PartnerConfig(@PartnerConfigKey String resourceName, ResourceType type) { 111 this.mResourceName = resourceName; 112 this.mResourceType = type; 113 } 114 } 115