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.hardware.CarPropertyConfig; 20 21 import java.lang.annotation.Retention; 22 import java.lang.annotation.RetentionPolicy; 23 24 /** 25 * Object used to indicate area types for car properties. 26 * <p> 27 * The constants defined by {@link VehicleAreaType} indicate the area types for properties. A 28 * property only has one area type. Developers can query the area type using 29 * {@link CarPropertyConfig#getPropertyType()}. 30 * </p><p> 31 * Refer to {@link VehicleAreaSeat} and {@link VehicleAreaWheel} for more information about areaId. 32 * </p> 33 */ 34 35 // This class is only designed to provide constants for VehicleAreaType. The constants should 36 // exactly be same as VehicleAreaType in /hardware/interfaces/automotive/vehicle/2.0/types.hal. 37 public final class VehicleAreaType { 38 /** Used for global properties */ 39 public static final int VEHICLE_AREA_TYPE_GLOBAL = 0; 40 /** Area type is Window */ 41 public static final int VEHICLE_AREA_TYPE_WINDOW = 2; 42 /** Area type is Seat */ 43 public static final int VEHICLE_AREA_TYPE_SEAT = 3; 44 /** Area type is Door */ 45 public static final int VEHICLE_AREA_TYPE_DOOR = 4; 46 /** Area type is Mirror */ 47 public static final int VEHICLE_AREA_TYPE_MIRROR = 5; 48 /** Area type is Wheel */ 49 public static final int VEHICLE_AREA_TYPE_WHEEL = 6; VehicleAreaType()50 private VehicleAreaType() {} 51 52 /** @hide */ 53 @IntDef(prefix = {"VEHICLE_AREA_TYPE_"}, value = { 54 VEHICLE_AREA_TYPE_GLOBAL, 55 VEHICLE_AREA_TYPE_WINDOW, 56 VEHICLE_AREA_TYPE_SEAT, 57 VEHICLE_AREA_TYPE_DOOR, 58 VEHICLE_AREA_TYPE_MIRROR, 59 VEHICLE_AREA_TYPE_WHEEL 60 }) 61 @Retention(RetentionPolicy.SOURCE) 62 public @interface VehicleAreaTypeValue {} 63 } 64