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 package android.car.hardware.property; 17 import android.annotation.IntDef; 18 import android.car.annotation.AddedInOrBefore; 19 20 import java.lang.annotation.Retention; 21 import java.lang.annotation.RetentionPolicy; 22 23 /** 24 * Used by {@link android.car.VehiclePropertyIds#ELECTRONIC_TOLL_COLLECTION_CARD_STATUS} to 25 * enumerate ETC(electronic toll collection) card types in the vehicle. 26 * Use in {@link android.car.hardware.property.CarPropertyManager#getProperty(int, int)} to 27 * get this property value. 28 */ 29 public class VehicleElectronicTollCollectionCardStatus { 30 /** 31 * Status could not be determined 32 */ 33 @AddedInOrBefore(majorVersion = 33) 34 public static final int UNKNOWN = 0; 35 /** 36 * A valid electronic toll collection card is present 37 */ 38 @AddedInOrBefore(majorVersion = 33) 39 public static final int ELECTRONIC_TOLL_COLLECTION_CARD_VALID = 1; 40 /** 41 * An electronic toll collection card is present, but it is expired or otherwise invalid 42 */ 43 @AddedInOrBefore(majorVersion = 33) 44 public static final int ELECTRONIC_TOLL_COLLECTION_CARD_INVALID = 2; 45 /** 46 * No electronic toll collection card is inserted in the reader 47 */ 48 @AddedInOrBefore(majorVersion = 33) 49 public static final int ELECTRONIC_TOLL_COLLECTION_CARD_NOT_INSERTED = 3; 50 51 /** @hide */ 52 @IntDef({ 53 UNKNOWN, 54 ELECTRONIC_TOLL_COLLECTION_CARD_VALID, 55 ELECTRONIC_TOLL_COLLECTION_CARD_NOT_INSERTED, 56 ELECTRONIC_TOLL_COLLECTION_CARD_INVALID 57 }) 58 @Retention(RetentionPolicy.SOURCE) 59 public @interface Enum {} VehicleElectronicTollCollectionCardStatus()60 private VehicleElectronicTollCollectionCardStatus() {} 61 } 62