1 /* 2 * Copyright (C) 2019 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.car.hardware; 18 19 import android.annotation.IntDef; 20 import android.annotation.SystemApi; 21 22 import java.lang.annotation.Retention; 23 import java.lang.annotation.RetentionPolicy; 24 25 /** 26 * {@code CarHvacFanDirection} is an abstraction for car's fan directions. 27 * <p> 28 * {@link android.car.VehiclePropertyIds#HVAC_FAN_DIRECTION} and 29 * {@link android.car.VehiclePropertyIds#HVAC_FAN_DIRECTION_AVAILABLE} use constants in 30 * {@link CarHvacFanDirection} as their property value. 31 * Developers can compare the property value with constants in this class to know which fan 32 * direction is used in cars. 33 * </p> 34 * @hide 35 */ 36 // This class is only designed to provide constants for car's fan direction. The constants should 37 // exactly be same as VehicleHvacFanDirection in file 38 // hardware/interfaces/automotive/vehicle/2.0/types.hal. 39 @SystemApi 40 public final class CarHvacFanDirection { 41 /** Constant for unknown fan direction. */ 42 public static final int UNKNOWN = 0x0; 43 /** Constant for face direction. */ 44 public static final int FACE = 0x01; 45 /** Constant for floor direction. */ 46 public static final int FLOOR = 0x02; 47 /** Constant for face and floor direction. FACE_AND_FLOOR = FACE | FLOOR */ 48 public static final int FACE_AND_FLOOR = 0x03; 49 /** Constant for defrost direction. */ 50 public static final int DEFROST = 0x04; 51 /** Constant for face and defrost direction. FACE_AND_DEFROST= FACE | DEFROST */ 52 public static final int FACE_AND_DEFROST = 0x05; 53 /** Constant for defrost and floor direction. DEFROST_AND_FLOOR = DEFROST | FLOOR */ 54 public static final int DEFROST_AND_FLOOR = 0x06; 55 /** 56 * Constant for face, defrost and floor direction. 57 * FACE_DEFROST_AND_FLOOR = FACE | DEFROST | FLOOR 58 */ 59 public static final int FACE_DEFROST_AND_FLOOR = 0x07; 60 61 /**@hide*/ 62 @IntDef(value = { 63 UNKNOWN, 64 FACE, 65 FLOOR, 66 FACE_AND_FLOOR, 67 DEFROST, 68 FACE_AND_DEFROST, 69 DEFROST_AND_FLOOR, 70 FACE_DEFROST_AND_FLOOR 71 }) 72 @Retention(RetentionPolicy.SOURCE) 73 public @interface Enum {} CarHvacFanDirection()74 private CarHvacFanDirection() {} 75 } 76