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 public enum ResourceType { 89 COLOR, 90 DRAWABLE, 91 STRING, 92 DIMENSION, 93 BOOLEAN, 94 } 95 96 private final String mResourceName; 97 private final ResourceType mResourceType; 98 getResourceType()99 public ResourceType getResourceType() { 100 return mResourceType; 101 } 102 getResourceName()103 public String getResourceName() { 104 return mResourceName; 105 } 106 PartnerConfig(@artnerConfigKey String resourceName, ResourceType type)107 PartnerConfig(@PartnerConfigKey String resourceName, ResourceType type) { 108 this.mResourceName = resourceName; 109 this.mResourceType = type; 110 } 111 } 112