Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb7ef72c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove VehiclePermisionMode from VHAL"

parents 36148eda a833eba9
Loading
Loading
Loading
Loading
+0 −34
Original line number Diff line number Diff line
@@ -681,21 +681,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (VehiclePermissionModel)
#
GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehiclePermissionModel.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.vehicle@2.0::types.VehiclePermissionModel

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
@@ -1634,25 +1619,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (VehiclePermissionModel)
#
GEN := $(intermediates)/android/hardware/vehicle/V2_0/VehiclePermissionModel.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.vehicle@2.0::types.VehiclePermissionModel

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (VehiclePropConfig)
#
+0 −14
Original line number Diff line number Diff line
@@ -32,14 +32,12 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::INFO_MAKE,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::STATIC,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
    },

    {
        .prop = VehicleProperty::HVAC_POWER_ON,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1)
    },

@@ -47,7 +45,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_DEFROSTER,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas =
                VehicleAreaWindow::FRONT_WINDSHIELD
                | VehicleAreaWindow::REAR_WINDSHIELD
@@ -57,7 +54,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_RECIRC_ON,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1)
    },

@@ -65,7 +61,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_AC_ON,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1)
    },

@@ -73,7 +68,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_AUTO_ON,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1)
    },

@@ -81,7 +75,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_FAN_SPEED,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1),
        .areaConfigs = {
            VehicleAreaConfig {
@@ -96,7 +89,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_FAN_DIRECTION,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = toInt(VehicleAreaZone::ROW_1),
    },

@@ -104,7 +96,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_TEMPERATURE_SET,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas =
                VehicleAreaZone::ROW_1_LEFT
                | VehicleAreaZone::ROW_1_RIGHT,
@@ -126,28 +117,24 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::NIGHT_MODE,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
    },

    {
        .prop = VehicleProperty::DRIVING_STATUS,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
    },

    {
        .prop = VehicleProperty::GEAR_SELECTION,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
    },

    {
        .prop = VehicleProperty::INFO_FUEL_CAPACITY,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
        .areaConfigs = {
            VehicleAreaConfig {
                .minFloatValue = 0,
@@ -160,7 +147,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
        .areaConfigs = {
            VehicleAreaConfig {
                .minInt32Value = 0,
+0 −7
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::INFO_MAKE,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::STATIC,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
        .configString = "Some=config,options=if,you=have_any",
    },

@@ -40,7 +39,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_FAN_SPEED,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = static_cast<int32_t>(
            VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT),
        .areaConfigs = {
@@ -61,7 +59,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::HVAC_SEAT_TEMPERATURE,
        .access = VehiclePropertyAccess::WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_SET,
        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
        .supportedAreas = static_cast<int32_t>(
            VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT),
        .areaConfigs = {
@@ -81,7 +78,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::INFO_FUEL_CAPACITY,
        .access = VehiclePropertyAccess::READ,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
        .areaConfigs = {
            VehicleAreaConfig {
                .minFloatValue = 0,
@@ -94,7 +90,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,
        .areaConfigs = {
            VehicleAreaConfig {
                .minInt32Value = 0,
@@ -107,7 +102,6 @@ const VehiclePropConfig kVehicleProperties[] = {
        .prop = VehicleProperty::MIRROR_FOLD,
        .access = VehiclePropertyAccess::READ_WRITE,
        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
        .permissionModel = VehiclePermissionModel::OEM_ONLY,

    }
};
@@ -238,7 +232,6 @@ inline std::string toString(const VehiclePropConfig &config) {
       << "  prop: " << enumToHexString(config.prop) << ",\n"
       << "  supportedAreas: " << hexString(config.supportedAreas) << ",\n"
       << "  access: " << enumToHexString(config.access) << ",\n"
       << "  permissionModel: " << enumToHexString(config.permissionModel) << ",\n"
       << "  changeMode: " << enumToHexString(config.changeMode) << ",\n"
       << "  configFlags: " << hexString(config.configFlags) << ",\n"
       << "  minSampleRate: " << config.minSampleRate << ",\n"
+0 −29
Original line number Diff line number Diff line
@@ -2143,30 +2143,6 @@ enum VehiclePropertyAccess : int32_t {
  READ_WRITE = 0x03,
};

/*
 * These permissions define how the OEMs want to distribute their information
 * and security they want to apply. On top of these restrictions, android will
 * have additional 'app-level' permissions that the apps will need to ask the
 * user before the apps have the information.
 * This information must be kept in VehiclePropConfig#permissionModel.
 */
enum VehiclePermissionModel : int32_t {
  /*
   * No special restriction, but each property can still require specific
   * android app-level permission.
   */
  NO_RESTRICTION = 0,

  /* Signature only. Only APKs signed with OEM keys are allowed. */
  OEM_ONLY = 0x1,

  /* System only. APKs built-in to system  can access the property. */
  SYSTEM_APP_ONLY = 0x2,

  /* Equivalent to “system|signature” */
  OEM_OR_SYSTEM_APP = 0x3,
};

/*
 * Car states.
 *
@@ -2310,11 +2286,6 @@ struct VehiclePropConfig {
     */
    VehiclePropertyChangeMode changeMode;

    /*
     * Defines permission model to access the data.
     */
    VehiclePermissionModel permissionModel;

    /*
     * Some of the properties may have associated areas (for example, some hvac
     * properties are associated with VehicleAreaZone), in these
+0 −30
Original line number Diff line number Diff line
@@ -1168,31 +1168,6 @@ attribute: {
    }
}

attribute: {
    name: "::android::hardware::vehicle::V2_0::VehiclePermissionModel"
    type: TYPE_ENUM
    enum_value: {
        scalar_type: "int32_t"

        enumerator: "NO_RESTRICTION"
        scalar_value: {
            int32_t: 0
        }
        enumerator: "OEM_ONLY"
        scalar_value: {
            int32_t: 1
        }
        enumerator: "SYSTEM_APP_ONLY"
        scalar_value: {
            int32_t: 2
        }
        enumerator: "OEM_OR_SYSTEM_APP"
        scalar_value: {
            int32_t: 3
        }
    }
}

attribute: {
    name: "::android::hardware::vehicle::V2_0::VehicleDrivingStatus"
    type: TYPE_ENUM
@@ -1603,11 +1578,6 @@ attribute: {
        type: TYPE_ENUM
        predefined_type: "::android::hardware::vehicle::V2_0::VehiclePropertyChangeMode"
    }
    struct_value: {
        name: "permissionModel"
        type: TYPE_ENUM
        predefined_type: "::android::hardware::vehicle::V2_0::VehiclePermissionModel"
    }
    struct_value: {
        name: "supportedAreas"
        type: TYPE_SCALAR