diff options
32 files changed, 336 insertions, 259 deletions
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp index f64028c9ef..41638795b3 100644 --- a/automotive/vehicle/2.0/Android.bp +++ b/automotive/vehicle/2.0/Android.bp @@ -14,61 +14,6 @@ hidl_interface { interfaces: [ "android.hidl.base@1.0", ], - types: [ - "DiagnosticFloatSensorIndex", - "DiagnosticIntegerSensorIndex", - "EvConnectorType", - "FuelType", - "Obd2CommonIgnitionMonitors", - "Obd2CompressionIgnitionMonitors", - "Obd2FuelSystemStatus", - "Obd2FuelType", - "Obd2IgnitionMonitorKind", - "Obd2SecondaryAirStatus", - "Obd2SparkIgnitionMonitors", - "PortLocationType", - "StatusCode", - "SubscribeFlags", - "SubscribeOptions", - "VehicleApPowerStateConfigFlag", - "VehicleApPowerStateReport", - "VehicleApPowerStateReq", - "VehicleApPowerStateReqIndex", - "VehicleApPowerStateShutdownParam", - "VehicleArea", - "VehicleAreaConfig", - "VehicleAreaDoor", - "VehicleAreaMirror", - "VehicleAreaSeat", - "VehicleAreaWheel", - "VehicleAreaWindow", - "VehicleDisplay", - "VehicleGear", - "VehicleHvacFanDirection", - "VehicleHwKeyInputAction", - "VehicleIgnitionState", - "VehicleLightState", - "VehicleLightSwitch", - "VehicleOilLevel", - "VehiclePropConfig", - "VehiclePropValue", - "VehicleProperty", - "VehiclePropertyAccess", - "VehiclePropertyChangeMode", - "VehiclePropertyGroup", - "VehiclePropertyStatus", - "VehiclePropertyType", - "VehicleTurnSignal", - "VehicleUnit", - "VmsAvailabilityStateIntegerValuesIndex", - "VmsBaseMessageIntegerValuesIndex", - "VmsMessageType", - "VmsMessageWithLayerAndPublisherIdIntegerValuesIndex", - "VmsMessageWithLayerIntegerValuesIndex", - "VmsOfferingMessageIntegerValuesIndex", - "VmsPublisherInformationIntegerValuesIndex", - "VmsSubscriptionsStateIntegerValuesIndex", - ], gen_java: true, } diff --git a/biometrics/face/1.0/Android.bp b/biometrics/face/1.0/Android.bp index 0f8c6e646b..222a09e5e9 100644 --- a/biometrics/face/1.0/Android.bp +++ b/biometrics/face/1.0/Android.bp @@ -14,15 +14,6 @@ hidl_interface { interfaces: [ "android.hidl.base@1.0", ], - types: [ - "FaceAcquiredInfo", - "FaceError", - "Feature", - "OptionalBool", - "OptionalUint64", - "Status", - "UserHandle", - ], gen_java: true, } diff --git a/camera/device/3.5/Android.bp b/camera/device/3.5/Android.bp index 6d1836720d..d51fd0ef87 100644 --- a/camera/device/3.5/Android.bp +++ b/camera/device/3.5/Android.bp @@ -20,16 +20,6 @@ hidl_interface { "android.hardware.graphics.common@1.0", "android.hidl.base@1.0", ], - types: [ - "BufferRequest", - "BufferRequestStatus", - "CameraBlob", - "CameraBlobId", - "StreamBufferRequestError", - "StreamBufferRet", - "StreamBuffersVal", - "StreamConfiguration", - ], gen_java: false, } diff --git a/camera/metadata/3.4/Android.bp b/camera/metadata/3.4/Android.bp index d1cba14d0d..2b75eba51a 100644 --- a/camera/metadata/3.4/Android.bp +++ b/camera/metadata/3.4/Android.bp @@ -13,19 +13,6 @@ hidl_interface { "android.hardware.camera.metadata@3.2", "android.hardware.camera.metadata@3.3", ], - types: [ - "CameraMetadataEnumAndroidDepthAvailableDynamicDepthStreamConfigurations", - "CameraMetadataEnumAndroidHeicAvailableHeicStreamConfigurations", - "CameraMetadataEnumAndroidHeicInfoSupported", - "CameraMetadataEnumAndroidInfoSupportedBufferManagementVersion", - "CameraMetadataEnumAndroidRequestAvailableCapabilities", - "CameraMetadataEnumAndroidScalerAvailableFormats", - "CameraMetadataEnumAndroidScalerAvailableRecommendedStreamConfigurations", - "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement", - "CameraMetadataSection", - "CameraMetadataSectionStart", - "CameraMetadataTag", - ], gen_java: true, } diff --git a/camera/provider/2.5/Android.bp b/camera/provider/2.5/Android.bp index 3de010a11b..a4af07e7c2 100644 --- a/camera/provider/2.5/Android.bp +++ b/camera/provider/2.5/Android.bp @@ -17,9 +17,6 @@ hidl_interface { "android.hardware.camera.provider@2.4", "android.hidl.base@1.0", ], - types: [ - "DeviceState", - ], gen_java: false, } diff --git a/current.txt b/current.txt index 6a4f9cbba4..5cd0c9ffdf 100644 --- a/current.txt +++ b/current.txt @@ -507,7 +507,7 @@ c3dfaa1fcd452c6cfc26d8dcbb67b71b08a1fe6dad5f87427e93d11a95372b05 android.hardwar 92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback 83885d366f22ada42c00d8854f0b7e7ba4cf73ddf80bb0d8e168ce132cec57ea android.hardware.neuralnetworks@1.2::IPreparedModel e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback -769f8650631eef7a3ceedc8cf130f4b99eb52fe698a11609d55de32985a3dddf android.hardware.neuralnetworks@1.2::types +c752cff336d86762c26dc82e7e037f4962b815b1a068d2319d40a3d068e26f68 android.hardware.neuralnetworks@1.2::types cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types 4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats diff --git a/drm/1.2/Android.bp b/drm/1.2/Android.bp index 4e0e8ba6e7..2d54302a58 100644 --- a/drm/1.2/Android.bp +++ b/drm/1.2/Android.bp @@ -19,11 +19,6 @@ hidl_interface { "android.hardware.drm@1.1", "android.hidl.base@1.0", ], - types: [ - "HdcpLevel", - "OfflineLicenseState", - "Status", - ], gen_java: false, } diff --git a/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp index 147a470f8a..cc34290fa8 100644 --- a/gnss/1.1/vts/functional/Android.bp +++ b/gnss/1.1/vts/functional/Android.bp @@ -27,5 +27,8 @@ cc_test { "android.hardware.gnss@1.1", "android.hardware.gnss@common-vts-lib", ], + shared_libs: [ + "android.hardware.gnss.measurement_corrections@1.0", + ], test_suites: ["general-tests"], } diff --git a/gnss/2.0/Android.bp b/gnss/2.0/Android.bp index 230dd907dd..c01ec55b99 100644 --- a/gnss/2.0/Android.bp +++ b/gnss/2.0/Android.bp @@ -24,11 +24,6 @@ hidl_interface { "android.hardware.gnss@1.1", "android.hidl.base@1.0", ], - types: [ - "ElapsedRealtime", - "ElapsedRealtimeFlags", - "GnssLocation", - ], gen_java: true, gen_java_constants: true, } diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp index f327197f62..64187e24d9 100644 --- a/gnss/2.0/default/Android.bp +++ b/gnss/2.0/default/Android.bp @@ -26,6 +26,7 @@ cc_binary { "AGnssRil.cpp", "Gnss.cpp", "GnssMeasurement.cpp", + "GnssMeasurementCorrections.cpp", "GnssVisibilityControl.cpp", "service.cpp" ], diff --git a/gnss/2.0/default/Gnss.cpp b/gnss/2.0/default/Gnss.cpp index 33edbd56eb..ee6da5374c 100644 --- a/gnss/2.0/default/Gnss.cpp +++ b/gnss/2.0/default/Gnss.cpp @@ -25,11 +25,14 @@ #include "AGnssRil.h" #include "GnssConfiguration.h" #include "GnssMeasurement.h" +#include "GnssMeasurementCorrections.h" #include "GnssVisibilityControl.h" #include "Utils.h" using ::android::hardware::Status; using ::android::hardware::gnss::common::Utils; +using ::android::hardware::gnss::measurement_corrections::V1_0::implementation:: + GnssMeasurementCorrections; using ::android::hardware::gnss::visibility_control::V1_0::implementation::GnssVisibilityControl; namespace android { @@ -248,8 +251,8 @@ Return<sp<V2_0::IGnssMeasurement>> Gnss::getExtensionGnssMeasurement_2_0() { Return<sp<measurement_corrections::V1_0::IMeasurementCorrections>> Gnss::getExtensionMeasurementCorrections() { - // TODO(b/124012850): Implement function. - return sp<measurement_corrections::V1_0::IMeasurementCorrections>{}; + ALOGD("Gnss::getExtensionMeasurementCorrections"); + return new GnssMeasurementCorrections(); } Return<sp<visibility_control::V1_0::IGnssVisibilityControl>> Gnss::getExtensionVisibilityControl() { diff --git a/gnss/2.0/default/GnssMeasurementCorrections.cpp b/gnss/2.0/default/GnssMeasurementCorrections.cpp new file mode 100644 index 0000000000..cbf34ba9c3 --- /dev/null +++ b/gnss/2.0/default/GnssMeasurementCorrections.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define LOG_TAG "GnssMeasurementCorrections" + +#include "GnssMeasurementCorrections.h" +#include <log/log.h> + +namespace android { +namespace hardware { +namespace gnss { +namespace measurement_corrections { +namespace V1_0 { +namespace implementation { + +// Methods from V1_0::IMeasurementCorrections follow. +Return<bool> GnssMeasurementCorrections::setCorrections(const MeasurementCorrections& corrections) { + ALOGD("setCorrections"); + ALOGD("corrections = lat: %f, lng: %f, alt: %f, hUnc: %f, vUnc: %f, toa: %llu, " + "satCorrections.size: %d", + corrections.latitudeDegrees, corrections.longitudeDegrees, corrections.altitudeMeters, + corrections.horizontalPositionUncertaintyMeters, + corrections.verticalPositionUncertaintyMeters, + static_cast<unsigned long long>(corrections.toaGpsNanosecondsOfWeek), + static_cast<int>(corrections.satCorrections.size())); + for (auto singleSatCorrection : corrections.satCorrections) { + ALOGD("singleSatCorrection = flags: %d, constellation: %d, svid: %d, cfHz: %f, probLos: %f," + " epl: %f, eplUnc: %f", + static_cast<int>(singleSatCorrection.singleSatCorrectionFlags), + static_cast<int>(singleSatCorrection.constellation), + static_cast<int>(singleSatCorrection.svid), singleSatCorrection.carrierFrequencyHz, + singleSatCorrection.probSatIsLos, singleSatCorrection.excessPathLengthMeters, + singleSatCorrection.excessPathLengthUncertaintyMeters); + ALOGD("reflecting plane = lat: %f, lng: %f, alt: %f, azm: %f", + singleSatCorrection.reflectingPlane.latitudeDegrees, + singleSatCorrection.reflectingPlane.longitudeDegrees, + singleSatCorrection.reflectingPlane.altitudeMeters, + singleSatCorrection.reflectingPlane.azimuthDegrees); + } + + return true; +} + +} // namespace implementation +} // namespace V1_0 +} // namespace measurement_corrections +} // namespace gnss +} // namespace hardware +} // namespace android diff --git a/gnss/2.0/default/GnssMeasurementCorrections.h b/gnss/2.0/default/GnssMeasurementCorrections.h new file mode 100644 index 0000000000..f758bc8a08 --- /dev/null +++ b/gnss/2.0/default/GnssMeasurementCorrections.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace android { +namespace hardware { +namespace gnss { +namespace measurement_corrections { +namespace V1_0 { +namespace implementation { + +using ::android::sp; +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; + +struct GnssMeasurementCorrections : public IMeasurementCorrections { + // Methods from V1_0::IMeasurementCorrections follow. + Return<bool> setCorrections(const MeasurementCorrections& corrections) override; +}; + +} // namespace implementation +} // namespace V1_0 +} // namespace measurement_corrections +} // namespace gnss +} // namespace hardware +} // namespace android diff --git a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp index b135dba2c1..3703ebaef9 100644 --- a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp +++ b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp @@ -18,6 +18,7 @@ #include <VtsHalHidlTargetTestBase.h> #include <gnss_hal_test.h> +#include "Utils.h" using android::hardware::hidl_string; using android::hardware::hidl_vec; @@ -32,6 +33,9 @@ using IAGnss_2_0 = android::hardware::gnss::V2_0::IAGnss; using IAGnss_1_0 = android::hardware::gnss::V1_0::IAGnss; using IAGnssCallback_2_0 = android::hardware::gnss::V2_0::IAGnssCallback; +using android::hardware::gnss::common::Utils; +using android::hardware::gnss::measurement_corrections::V1_0::IMeasurementCorrections; +using android::hardware::gnss::measurement_corrections::V1_0::MeasurementCorrections; using android::hardware::gnss::V1_0::IGnssNi; using android::hardware::gnss::V2_0::ElapsedRealtimeFlags; using android::hardware::gnss::visibility_control::V1_0::IGnssVisibilityControl; @@ -273,6 +277,24 @@ TEST_F(GnssHalTest, TestGnssVisibilityControlExtension) { } /* + * TestGnssMeasurementCorrections: + * Gets the GnssMeasurementCorrectionsExtension and verifies that it supports the + * gnss.measurement_corrections@1.0::IMeasurementCorrections interface by invoking a method. + */ +TEST_F(GnssHalTest, TestGnssMeasurementCorrections) { + // Verify IMeasurementCorrections is supported. + auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections(); + ASSERT_TRUE(measurementCorrections.isOk()); + sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections; + ASSERT_NE(iMeasurementCorrections, nullptr); + + // Set a mock MeasurementCorrections. + auto result = iMeasurementCorrections->setCorrections(Utils::getMockMeasurementCorrections()); + ASSERT_TRUE(result.isOk()); + EXPECT_TRUE(result); +} + +/* * TestGnssDataElapsedRealtimeFlags: * Sets a GnssMeasurementCallback, waits for a GnssData object, and verifies the flags in member * elapsedRealitme are valid. diff --git a/gnss/common/utils/vts/Android.bp b/gnss/common/utils/vts/Android.bp index 99d8cf9185..1988171979 100644 --- a/gnss/common/utils/vts/Android.bp +++ b/gnss/common/utils/vts/Android.bp @@ -29,6 +29,7 @@ cc_library_static { export_include_dirs: ["include"], shared_libs: [ "android.hardware.gnss@1.0", + "android.hardware.gnss.measurement_corrections@1.0", ], static_libs: [ "libgtest", diff --git a/gnss/common/utils/vts/Utils.cpp b/gnss/common/utils/vts/Utils.cpp index 24d68839a8..51d3ea18d5 100644 --- a/gnss/common/utils/vts/Utils.cpp +++ b/gnss/common/utils/vts/Utils.cpp @@ -22,6 +22,7 @@ namespace hardware { namespace gnss { namespace common { +using V1_0::GnssConstellationType; using V1_0::GnssLocationFlags; void Utils::checkLocation(const GnssLocation& location, bool check_speed, @@ -91,6 +92,53 @@ void Utils::checkLocation(const GnssLocation& location, bool check_speed, EXPECT_GT(location.timestamp, 1.48e12); } +const MeasurementCorrections Utils::getMockMeasurementCorrections() { + ReflectingPlane reflectingPlane = { + .latitudeDegrees = 37.4220039, + .longitudeDegrees = -122.0840991, + .altitudeMeters = 250.35, + .azimuthDegrees = 203.0, + }; + + SingleSatCorrection singleSatCorrection1 = { + .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY | + GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH | + GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC | + GnssSingleSatCorrectionFlags::HAS_REFLECTING_PLANE, + .constellation = GnssConstellationType::GPS, + .svid = 12, + .carrierFrequencyHz = 1.59975e+09, + .probSatIsLos = 0.50001, + .excessPathLengthMeters = 137.4802, + .excessPathLengthUncertaintyMeters = 25.5, + .reflectingPlane = reflectingPlane, + }; + SingleSatCorrection singleSatCorrection2 = { + .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY | + GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH | + GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC, + .constellation = GnssConstellationType::GPS, + .svid = 9, + .carrierFrequencyHz = 1.59975e+09, + .probSatIsLos = 0.873, + .excessPathLengthMeters = 26.294, + .excessPathLengthUncertaintyMeters = 10.0, + }; + + hidl_vec<SingleSatCorrection> singleSatCorrections = {singleSatCorrection1, + singleSatCorrection2}; + MeasurementCorrections mockCorrections = { + .latitudeDegrees = 37.4219999, + .longitudeDegrees = -122.0840575, + .altitudeMeters = 30.60062531, + .horizontalPositionUncertaintyMeters = 9.23542, + .verticalPositionUncertaintyMeters = 15.02341, + .toaGpsNanosecondsOfWeek = 2935633453L, + .satCorrections = singleSatCorrections, + }; + return mockCorrections; +} + } // namespace common } // namespace gnss } // namespace hardware diff --git a/gnss/common/utils/vts/include/Utils.h b/gnss/common/utils/vts/include/Utils.h index f8eeff6864..dce4c7b323 100644 --- a/gnss/common/utils/vts/include/Utils.h +++ b/gnss/common/utils/vts/include/Utils.h @@ -18,8 +18,10 @@ #define android_hardware_gnss_common_vts_Utils_H_ #include <android/hardware/gnss/1.0/IGnss.h> +#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h> using GnssLocation = ::android::hardware::gnss::V1_0::GnssLocation; +using namespace android::hardware::gnss::measurement_corrections::V1_0; namespace android { namespace hardware { @@ -29,6 +31,7 @@ namespace common { struct Utils { static void checkLocation(const GnssLocation& location, bool check_speed, bool check_more_accuracies); + static const MeasurementCorrections getMockMeasurementCorrections(); }; } // namespace common diff --git a/gnss/measurement_corrections/1.0/Android.bp b/gnss/measurement_corrections/1.0/Android.bp index 237b008bba..4aac7e04c8 100644 --- a/gnss/measurement_corrections/1.0/Android.bp +++ b/gnss/measurement_corrections/1.0/Android.bp @@ -14,12 +14,6 @@ hidl_interface { "android.hardware.gnss@1.0", "android.hidl.base@1.0", ], - types: [ - "GnssSingleSatCorrectionFlags", - "MeasurementCorrections", - "ReflectingPlane", - "SingleSatCorrection", - ], gen_java: true, } diff --git a/graphics/bufferqueue/2.0/Android.bp b/graphics/bufferqueue/2.0/Android.bp index 5385f2806a..97c05faf1e 100644 --- a/graphics/bufferqueue/2.0/Android.bp +++ b/graphics/bufferqueue/2.0/Android.bp @@ -17,11 +17,6 @@ hidl_interface { "android.hardware.graphics.common@1.2", "android.hidl.base@1.0", ], - types: [ - "ConnectionType", - "SlotIndex", - "Status", - ], gen_java: true, } diff --git a/graphics/common/1.2/Android.bp b/graphics/common/1.2/Android.bp index b6cd865dd0..088bc377f6 100644 --- a/graphics/common/1.2/Android.bp +++ b/graphics/common/1.2/Android.bp @@ -14,14 +14,6 @@ hidl_interface { "android.hardware.graphics.common@1.0", "android.hardware.graphics.common@1.1", ], - types: [ - "BufferUsage", - "ColorMode", - "Dataspace", - "HardwareBuffer", - "Hdr", - "PixelFormat", - ], gen_java: true, gen_java_constants: true, } diff --git a/graphics/mapper/3.0/Android.bp b/graphics/mapper/3.0/Android.bp index b2f0aa69b5..e34829652b 100644 --- a/graphics/mapper/3.0/Android.bp +++ b/graphics/mapper/3.0/Android.bp @@ -17,10 +17,6 @@ hidl_interface { "android.hardware.graphics.common@1.2", "android.hidl.base@1.0", ], - types: [ - "Error", - "YCbCrLayout", - ], gen_java: false, } diff --git a/input/common/1.0/Android.bp b/input/common/1.0/Android.bp index 3de18b4961..07b38cf3e5 100644 --- a/input/common/1.0/Android.bp +++ b/input/common/1.0/Android.bp @@ -9,23 +9,6 @@ hidl_interface { srcs: [ "types.hal", ], - types: [ - "Action", - "Axis", - "Button", - "Classification", - "EdgeFlag", - "Flag", - "Meta", - "MotionEvent", - "PointerCoords", - "PointerProperties", - "PolicyFlag", - "Source", - "SourceClass", - "ToolType", - "VideoFrame", - ], gen_java: true, } diff --git a/media/bufferpool/2.0/Android.bp b/media/bufferpool/2.0/Android.bp index 1f8bbdb888..0faa00ef00 100644 --- a/media/bufferpool/2.0/Android.bp +++ b/media/bufferpool/2.0/Android.bp @@ -16,13 +16,6 @@ hidl_interface { interfaces: [ "android.hidl.base@1.0", ], - types: [ - "Buffer", - "BufferInvalidationMessage", - "BufferStatus", - "BufferStatusMessage", - "ResultStatus", - ], gen_java: false, } diff --git a/media/c2/1.0/Android.bp b/media/c2/1.0/Android.bp index 56c78b2e6e..6c836af1a4 100644 --- a/media/c2/1.0/Android.bp +++ b/media/c2/1.0/Android.bp @@ -25,28 +25,6 @@ hidl_interface { "android.hardware.media@1.0", "android.hidl.base@1.0", ], - types: [ - "BaseBlock", - "Block", - "Buffer", - "FieldDescriptor", - "FieldId", - "FieldSupportedValues", - "FieldSupportedValuesQuery", - "FieldSupportedValuesQueryResult", - "FrameData", - "InfoBuffer", - "ParamDescriptor", - "ParamField", - "ParamFieldValues", - "SettingResult", - "Status", - "StructDescriptor", - "Work", - "WorkBundle", - "WorkOrdinal", - "Worklet", - ], gen_java: false, } diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal index ab17598d1c..4a8664f2c8 100644 --- a/neuralnetworks/1.2/types.hal +++ b/neuralnetworks/1.2/types.hal @@ -218,6 +218,7 @@ enum OperationType : int32_t { * ) / sum(1) * * Supported tensor {@link OperandType}: + * * {@link OperandType::TENSOR_FLOAT16} (since API level 29) * * {@link OperandType::TENSOR_FLOAT32} * * {@link OperandType::TENSOR_QUANT8_ASYMM} * @@ -333,7 +334,7 @@ enum OperationType : int32_t { * ) + bias[channel] * * Supported tensor {@link OperandType} configurations: - * * 32 bit Floating point : + * * 32 bit floating point: * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias. * * * Quantized: @@ -342,15 +343,15 @@ enum OperationType : int32_t { * * * input.scale * filter.scale). * * Available since API level 29: + * * 16 bit floating point: + * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. + * * * Quantized with symmetric per channel quantization for the filter: * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output. * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter. * * * {@link OperandType::TENSOR_INT32} for bias (scale set to 0.0, * * * each value scaling is separate and equal to input.scale * filter.scales[channel]). * - * * 16 bit Floating point: - * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. - * * Supported tensor rank: 4, with "NHWC" or "NCHW" data layout. * With the default data layout NHWC, the data is stored in the order of: * [batch, height, width, channels]. Alternatively, the data layout could @@ -482,7 +483,7 @@ enum OperationType : int32_t { * ) + bias[k * channel_multiplier + q] * * Supported tensor {@link OperandType} configurations: - * * 32 bit Floating point : + * * 32 bit floating point: * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias. * * * Quantized: @@ -491,6 +492,9 @@ enum OperationType : int32_t { * * * input.scale * filter.scale). * * Available since API level 29: + * * 16 bit floating point: + * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. + * * * Quantized with symmetric per channel quantization for the filter: * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output. * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter. @@ -1010,6 +1014,7 @@ enum OperationType : int32_t { * output = 1 / (1 + exp(-input)) * * Supported tensor {@link OperandType}: + * * {@link OperandType::TENSOR_FLOAT16} (since API level 29) * * {@link OperandType::TENSOR_FLOAT32} * * {@link OperandType::TENSOR_QUANT8_ASYMM} * @@ -1315,6 +1320,7 @@ enum OperationType : int32_t { * ) * * Supported tensor {@link OperandType}: + * * {@link OperandType::TENSOR_FLOAT16} (since API level 29) * * {@link OperandType::TENSOR_FLOAT32} * * {@link OperandType::TENSOR_QUANT8_ASYMM} * @@ -1623,6 +1629,7 @@ enum OperationType : int32_t { * independently on each 1-D slice along specified dimension. * * Supported tensor {@link OperandType}: + * * {@link OperandType::TENSOR_FLOAT16} (since API level 29) * * {@link OperandType::TENSOR_FLOAT32} * * {@link OperandType::TENSOR_QUANT8_ASYMM} * @@ -1631,8 +1638,12 @@ enum OperationType : int32_t { * * Inputs: * * 0: A 2-D or 4-D tensor, specifying the tensor to be reshaped. - * * 1: An {@link OperandType::FLOAT32} scalar, specifying the positive - * scaling factor for the exponent, beta. + * * 1: A scalar, specifying the positive scaling factor for the exponent, + * beta. If input0 is of {@link OperandType::TENSOR_FLOAT32} or + * {@link OperandType::TENSOR_QUANT8_ASYMM}, the scalar must be of + * {@link OperandType::FLOAT32}. If input0 is of {@link + * OperandType::TENSOR_FLOAT16}, then the scalar must be of {@link + * OperandType::FLOAT16}. * * 2: An optional {@link OperandType::INT32} scalar, default to -1, * specifying the dimension the activation would be performed on. * Negative index is used to specify axis from the end (e.g. -1 for @@ -2706,11 +2717,17 @@ enum OperationType : int32_t { * * 10: An {@link OperandType::INT32} scalar, only used when input7 is * set to true, specifying the maximum number of detections when * applying NMS algorithm for each single class. - * * 11: An {@link OperandType::FLOAT32} scalar, score_threshold. Boxes - * with scores lower than the threshold are filtered before sending - * to the NMS algorithm. - * * 12: An {@link OperandType::FLOAT32} scalar, specifying the IoU - * threshold for hard NMS. + * * 11: A scalar, score_threshold. Boxes with scores lower than the + * threshold are filtered before sending to the NMS algorithm. The + * scalar must be of {@link OperandType::FLOAT16} if input0 is of + * {@link OperandType::TENSOR_FLOAT16} and of {@link + * OperandType::FLOAT32} if input0 is of {@link + * OperandType::TENSOR_FLOAT32}. + * * 12: A scalar, specifying the IoU threshold for hard NMS. The scalar + * must be of {@link OperandType::FLOAT16} if input0 is of {@link + * OperandType::TENSOR_FLOAT16} and of {@link + * OperandType::FLOAT32} if input0 is of {@link + * OperandType::TENSOR_FLOAT32}. * * 13: An {@link OperandType::BOOL} scalar, set to true to include * background class in the list of label map for the output, set * to false to not include the background. When the background @@ -3007,11 +3024,11 @@ enum OperationType : int32_t { * where channel_multiplier = depth_out / num_groups * * Supported tensor {@link OperandType} configurations: - * * 32 bit Floating point : - * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias. + * * 16 bit floating point: + * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. * - * * 16 bit Floating point: - * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. + * * 32 bit floating point: + * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias. * * * Quantized: * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, filter, and output. @@ -3188,12 +3205,21 @@ enum OperationType : int32_t { * * Inputs: * * 0: An n-D tensor, specifying the tensor to be normalized. - * * 1: An {@link OperandType::FLOAT32} scalar, specifying gamma, the - * scale applied to the normalized tensor. - * * 2: An {@link OperandType::FLOAT32} scalar, specifying beta, the - * offset applied to the normalized tensor. - * * 3: An {@link OperandType::FLOAT32} scalar, specifying epsilon, the - * small value added to variance to avoid dividing by zero. + * * 1: A scalar, specifying gamma, the scale applied to the normalized + * tensor. The scalar must be of {@link OperandType::FLOAT16} if + * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link + * OperandType::FLOAT32} if input0 is of {@link + * OperandType::TENSOR_FLOAT32}. + * * 2: A scalar, specifying beta, the offset applied to the normalized + * tensor. The scalar must be of {@link OperandType::FLOAT16} if + * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link + * OperandType::FLOAT32} if input0 is of {@link + * OperandType::TENSOR_FLOAT32}. + * * 3: A scalar, specifying epsilon, the small value added to variance to + * avoid dividing by zero. The scalar must be of {@link OperandType::FLOAT16} if + * input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link + * OperandType::FLOAT32} if input0 is of {@link + * OperandType::TENSOR_FLOAT32}. * * 4: An {@link OperandType::BOOL} scalar, set to true to specify * NCHW data layout for input0 and output0. Set to false for NHWC. * @@ -3475,10 +3501,12 @@ enum OperationType : int32_t { * padding[i, 1] specifies the number of elements to be padded after * the end of dimension i. * * 2: An scalar specifying the value to use for padding input0. + * For input tensor of {@link OperandType::TENSOR_FLOAT16}, the + * pad value must be of {@link OperandType::FLOAT16}. * For input tensor of {@link OperandType::TENSOR_FLOAT32}, the - * pad value should be of {@link OperandType::FLOAT32}. + * pad value must be of {@link OperandType::FLOAT32}. * For input tensor of {@link OperandType::TENSOR_QUANT8_ASYMM}, - * the pad value should be of {@link OperandType::INT32}. The + * the pad value must be of {@link OperandType::INT32}. The * scale and zeroPoint are assumed to be the same as in input0. * * Outputs: @@ -3627,25 +3655,25 @@ enum OperationType : int32_t { * weights. * * 5: The recurrent-to-input weights. * A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM} - * and shape [outputSize, inputSize] specifying recurrent-to-input part + * and shape [outputSize, outputSize] specifying recurrent-to-input part * of weights for fully-connected layer inside the LSTM cell. * Quantization zero point and scale must be the same across all the * weights. * * 6: The recurrent-to-forget weights. * A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM} - * and shape [outputSize, inputSize] specifying recurrent-to-forget + * and shape [outputSize, outputSize] specifying recurrent-to-forget * part of weights for fully-connected layer inside the LSTM cell. * Quantization zero point and scale must be the same across all the * weights. * * 7: The recurrent-to-cell weights. * A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM} - * and shape [outputSize, inputSize] specifying recurrent-to-cell part + * and shape [outputSize, outputSize] specifying recurrent-to-cell part * of weights for fully-connected layer inside the LSTM cell. * Quantization zero point and scale must be the same across all the * weights. * * 8: The recurrent-to-output weights. * A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM} - * and shape [outputSize, inputSize] specifying recurrent-to-output + * and shape [outputSize, outputSize] specifying recurrent-to-output * part of weights for fully-connected layer inside the LSTM cell. * Quantization zero point and scale must be the same across all the * weights. @@ -4205,7 +4233,10 @@ enum OperationType : int32_t { * padding. * * Supported tensor {@link OperandCode} configurations: - * * 32 bit Floating point : + * * 16 bit floating point: + * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias. + * + * * 32 bit floating point: * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias. * * * Quantized: @@ -4213,7 +4244,6 @@ enum OperationType : int32_t { * * * {@link OperandType::TENSOR_INT32} for bias (with scale set to * * * input.scale * filter.scale). * - * Available since API level 29: * * Quantized with symmetric per channel quantization for the filter: * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output. * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter. diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp index 4f347cd53f..8e1dc3e3fb 100644 --- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp @@ -676,3 +676,85 @@ TEST_F(RadioHidlTest_v1_4, setAllowedCarriers_1_4) { } } } + +TEST_F(RadioHidlTest_v1_4, setDataProfile_1_4) { + serial = GetRandomSerialNumber(); + + // Create a dataProfileInfo + android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo; + memset(&dataProfileInfo, 0, sizeof(dataProfileInfo)); + dataProfileInfo.profileId = DataProfileId::DEFAULT; + dataProfileInfo.apn = hidl_string("internet"); + dataProfileInfo.protocol = PdpProtocolType::IPV4V6; + dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6; + dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP; + dataProfileInfo.user = hidl_string("username"); + dataProfileInfo.password = hidl_string("password"); + dataProfileInfo.type = DataProfileInfoType::THREE_GPP; + dataProfileInfo.maxConnsTime = 300; + dataProfileInfo.maxConns = 20; + dataProfileInfo.waitTime = 0; + dataProfileInfo.enabled = true; + dataProfileInfo.supportedApnTypesBitmap = 320; + dataProfileInfo.bearerBitmap = 161543; + dataProfileInfo.mtu = 0; + dataProfileInfo.preferred = true; + dataProfileInfo.persistent = true; + + // Create a dataProfileInfoList + android::hardware::hidl_vec<android::hardware::radio::V1_4::DataProfileInfo> + dataProfileInfoList = {dataProfileInfo}; + + radio_v1_4->setDataProfile_1_4(serial, dataProfileInfoList); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type); + EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial); + + if (cardStatus.base.base.cardState == CardState::ABSENT) { + ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, + {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE})); + } else if (cardStatus.base.base.cardState == CardState::PRESENT) { + ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, + {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE})); + } +} + +TEST_F(RadioHidlTest_v1_4, setInitialAttachApn_1_4) { + serial = GetRandomSerialNumber(); + + // Create a dataProfileInfo + android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo; + memset(&dataProfileInfo, 0, sizeof(dataProfileInfo)); + dataProfileInfo.profileId = DataProfileId::DEFAULT; + dataProfileInfo.apn = hidl_string("internet"); + dataProfileInfo.protocol = PdpProtocolType::IPV4V6; + dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6; + dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP; + dataProfileInfo.user = hidl_string("username"); + dataProfileInfo.password = hidl_string("password"); + dataProfileInfo.type = DataProfileInfoType::THREE_GPP; + dataProfileInfo.maxConnsTime = 300; + dataProfileInfo.maxConns = 20; + dataProfileInfo.waitTime = 0; + dataProfileInfo.enabled = true; + dataProfileInfo.supportedApnTypesBitmap = 320; + dataProfileInfo.bearerBitmap = 161543; + dataProfileInfo.mtu = 0; + dataProfileInfo.preferred = true; + dataProfileInfo.persistent = false; + + radio_v1_4->setInitialAttachApn_1_4(serial, dataProfileInfo); + + EXPECT_EQ(std::cv_status::no_timeout, wait()); + EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type); + EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial); + + if (cardStatus.base.base.cardState == CardState::ABSENT) { + ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, + {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE})); + } else if (cardStatus.base.base.cardState == CardState::PRESENT) { + ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, + {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE})); + } +} diff --git a/sensors/2.0/Android.bp b/sensors/2.0/Android.bp index 57d45ff473..eead1d3f28 100644 --- a/sensors/2.0/Android.bp +++ b/sensors/2.0/Android.bp @@ -15,11 +15,6 @@ hidl_interface { "android.hardware.sensors@1.0", "android.hidl.base@1.0", ], - types: [ - "EventQueueFlagBits", - "SensorTimeout", - "WakeLockQueueFlagBits", - ], gen_java: false, } diff --git a/thermal/2.0/Android.bp b/thermal/2.0/Android.bp index c513739e49..af23ee3df0 100644 --- a/thermal/2.0/Android.bp +++ b/thermal/2.0/Android.bp @@ -15,14 +15,6 @@ hidl_interface { "android.hardware.thermal@1.0", "android.hidl.base@1.0", ], - types: [ - "CoolingDevice", - "CoolingType", - "Temperature", - "TemperatureThreshold", - "TemperatureType", - "ThrottlingSeverity", - ], gen_java: true, } diff --git a/tv/cec/2.0/Android.bp b/tv/cec/2.0/Android.bp index 998cb23ecb..5a67fa55f6 100644 --- a/tv/cec/2.0/Android.bp +++ b/tv/cec/2.0/Android.bp @@ -15,32 +15,6 @@ hidl_interface { "android.hidl.base@1.0", "android.hidl.safe_union@1.0", ], - types: [ - "AbortReason", - "CecAllDeviceTypeValue", - "CecDeviceFeature", - "CecDeviceInfo", - "CecDeviceType", - "CecLogicalAddress", - "CecMessage", - "CecMessageType", - "CecPowerState", - "CecRcProfile", - "CecRcProfile1", - "CecRcProfileId", - "CecRcProfileSource", - "CecTopologyEvent", - "CecTopologyEventType", - "CecUICommandCodes", - "CecVersion", - "HdmiPortInfo", - "HdmiPortType", - "HotplugEvent", - "MaxLength", - "OptionKey", - "Result", - "SendMessageResult", - ], gen_java: true, } diff --git a/usb/1.2/Android.bp b/usb/1.2/Android.bp index 55ffad06b1..5206754d98 100644 --- a/usb/1.2/Android.bp +++ b/usb/1.2/Android.bp @@ -16,13 +16,6 @@ hidl_interface { "android.hardware.usb@1.1", "android.hidl.base@1.0", ], - types: [ - "ContaminantDetectionStatus", - "ContaminantProtectionMode", - "ContaminantProtectionStatus", - "PortStatus", - "Status", - ], gen_java: true, gen_java_constants: true, } diff --git a/wifi/1.3/Android.bp b/wifi/1.3/Android.bp index 8af1dc484e..401c7a618c 100644 --- a/wifi/1.3/Android.bp +++ b/wifi/1.3/Android.bp @@ -18,11 +18,6 @@ hidl_interface { "android.hardware.wifi@1.2", "android.hidl.base@1.0", ], - types: [ - "StaLinkLayerRadioStats", - "StaLinkLayerStats", - "WifiChannelStats", - ], gen_java: true, } diff --git a/wifi/supplicant/1.2/Android.bp b/wifi/supplicant/1.2/Android.bp index a0fc2b1b59..c685022b09 100644 --- a/wifi/supplicant/1.2/Android.bp +++ b/wifi/supplicant/1.2/Android.bp @@ -19,12 +19,6 @@ hidl_interface { "android.hardware.wifi.supplicant@1.1", "android.hidl.base@1.0", ], - types: [ - "DppAkm", - "DppFailureCode", - "DppNetRole", - "DppProgressCode", - ], gen_java: true, } |