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