1 /* 2 * Copyright (C) 2021 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 android.platform.helpers; 18 19 /** Automotive UI Resource Config Class */ 20 public class AutoConfigResource { 21 // Type of UI Resource - Resource ID, Text, Description 22 private String resourceType; 23 24 // Value for the UI Resource - id, text value or description for the resource 25 private String resourceValue; 26 27 // Application Package for the UI Resource if the type is Resource ID, 28 private String resourcePackage; 29 30 // Constructors AutoConfigResource(String resourceType, String resourceValue)31 public AutoConfigResource(String resourceType, String resourceValue) { 32 this.resourceType = resourceType; 33 this.resourceValue = resourceValue; 34 } 35 AutoConfigResource(String resourceType, String resourceValue, String resourcePackage)36 public AutoConfigResource(String resourceType, String resourceValue, String resourcePackage) { 37 this.resourceType = resourceType; 38 this.resourceValue = resourceValue; 39 this.resourcePackage = resourcePackage; 40 } 41 42 /** Get Resource Type ( RESOURCE_ID, TEXT, DESCRIPTION ) */ getResourceType()43 public String getResourceType() { 44 return this.resourceType; 45 } 46 47 /** Get Resource Value ( resource id, text value, description ) */ getResourceValue()48 public String getResourceValue() { 49 return this.resourceValue; 50 } 51 52 /** Get Resource Package */ getResourcePackage()53 public String getResourcePackage() { 54 return this.resourcePackage; 55 } 56 57 /** Set Resource Type ( RESOURCE_ID, TEXT, DESCRIPTION ) */ setResourceType(String resourceType)58 public void setResourceType(String resourceType) { 59 this.resourceType = resourceType; 60 } 61 62 /** Set Resource Value ( resource id, text value, description ) */ setResourceValue(String resourceValue)63 public void setResourceValue(String resourceValue) { 64 this.resourceValue = resourceValue; 65 } 66 67 /** Set Resource Package */ setResourcePackage(String resourcePackage)68 public void setResourcePackage(String resourcePackage) { 69 this.resourcePackage = resourcePackage; 70 } 71 } 72