1 /* 2 * Copyright (C) 2016 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; 17 18 import android.annotation.IntDef; 19 import android.car.annotation.AddedInOrBefore; 20 21 import java.lang.annotation.Retention; 22 import java.lang.annotation.RetentionPolicy; 23 24 /** 25 * List of different supported area types for vehicle properties. 26 * 27 * <p>The constants defined by {@code VehicleAreaType} indicate the different vehicle area types for 28 * properties. A property is mapped to only one {@code VehicleAreaType}. Developers can retrieve the 29 * {@code VehicleAreaType} using {@link android.car.hardware.CarPropertyConfig#getAreaType()}. Refer 30 * to {@link android.car.hardware.CarPropertyConfig#getAreaIds()} for more information about area 31 * IDs. 32 */ 33 public final class VehicleAreaType { 34 /** 35 * Used for global properties. A global property is a property that applies to the entire 36 * vehicle and is not associated with a specific vehicle area type. For example, {@link 37 * android.car.VehiclePropertyIds#FUEL_LEVEL} and {@link 38 * android.car.VehiclePropertyIds#HVAC_STEERING_WHEEL_HEAT} are global properties. A global 39 * property is always mapped to {@code VEHICLE_AREA_TYPE_GLOBAL}. 40 */ 41 @AddedInOrBefore(majorVersion = 33) 42 public static final int VEHICLE_AREA_TYPE_GLOBAL = 0; 43 /** Area type is Window */ 44 @AddedInOrBefore(majorVersion = 33) 45 public static final int VEHICLE_AREA_TYPE_WINDOW = 2; 46 /** Area type is Seat */ 47 @AddedInOrBefore(majorVersion = 33) 48 public static final int VEHICLE_AREA_TYPE_SEAT = 3; 49 /** Area type is Door */ 50 @AddedInOrBefore(majorVersion = 33) 51 public static final int VEHICLE_AREA_TYPE_DOOR = 4; 52 /** Area type is Mirror */ 53 @AddedInOrBefore(majorVersion = 33) 54 public static final int VEHICLE_AREA_TYPE_MIRROR = 5; 55 /** Area type is Wheel */ 56 @AddedInOrBefore(majorVersion = 33) 57 public static final int VEHICLE_AREA_TYPE_WHEEL = 6; VehicleAreaType()58 private VehicleAreaType() {} 59 60 /** @hide */ 61 @IntDef(prefix = {"VEHICLE_AREA_TYPE_"}, value = { 62 VEHICLE_AREA_TYPE_GLOBAL, 63 VEHICLE_AREA_TYPE_WINDOW, 64 VEHICLE_AREA_TYPE_SEAT, 65 VEHICLE_AREA_TYPE_DOOR, 66 VEHICLE_AREA_TYPE_MIRROR, 67 VEHICLE_AREA_TYPE_WHEEL 68 }) 69 @Retention(RetentionPolicy.SOURCE) 70 public @interface VehicleAreaTypeValue {} 71 } 72