Merge changes from topics 'cam-hidl-fence', 'camera-hidl-bufId'
* changes:
Camera: make fence import agnostic to hidl transport
Camera: add bufferId field to StreamBuffer
diff --git a/contexthub/1.0/IContexthub.hal b/contexthub/1.0/IContexthub.hal
index 42f2e2d..c0928d5 100644
--- a/contexthub/1.0/IContexthub.hal
+++ b/contexthub/1.0/IContexthub.hal
@@ -77,7 +77,8 @@
* device.
*
* @param hubId identifer of the contextHub
- * appBinary serialized NanoApppBinary for the nanoApp
+ * appBinary contains the binary representation of the nanoApp, plus
+ * metadata
* transactionId transactionId for this call
*
* @return result OK if transation started
@@ -88,7 +89,7 @@
*
*/
loadNanoApp(uint32_t hubId,
- vec<uint8_t> appBinary,
+ NanoAppBinary appBinary,
uint32_t transactionId)
generates (Result result);
diff --git a/contexthub/1.0/default/Contexthub.cpp b/contexthub/1.0/default/Contexthub.cpp
index 5f78004..4a6b3f2 100644
--- a/contexthub/1.0/default/Contexthub.cpp
+++ b/contexthub/1.0/default/Contexthub.cpp
@@ -22,6 +22,7 @@
#include <android/hardware/contexthub/1.0/IContexthub.h>
#include <hardware/context_hub.h>
+#include <sys/endian.h>
#undef LOG_TAG
#define LOG_TAG "ContextHubHalAdapter"
@@ -385,7 +386,7 @@
}
Return<Result> Contexthub::loadNanoApp(uint32_t hubId,
- const ::android::hardware::hidl_vec<uint8_t>& appBinary,
+ const NanoAppBinary& appBinary,
uint32_t transactionId) {
if (!isInitialized()) {
return Result::NOT_INIT;
@@ -401,11 +402,34 @@
return Result::BAD_PARAMS;
}
- hubMsg.message_type = CONTEXT_HUB_LOAD_APP;
- hubMsg.message_len = appBinary.size();
- hubMsg.message = appBinary.data();
+ // Data from the nanoapp header is passed through HIDL as explicit fields,
+ // but the legacy HAL expects it prepended to the binary, therefore we must
+ // reconstruct it here prior to passing to the legacy HAL.
+ uint32_t targetChreApiVersion =
+ (appBinary.targetChreApiMajorVersion << 24) |
+ (appBinary.targetChreApiMinorVersion << 16);
+ const struct nano_app_binary_t header = {
+ .header_version = htole32(1),
+ .magic = htole32(NANOAPP_MAGIC),
+ .app_id.id = htole64(appBinary.appId),
+ .app_version = htole32(appBinary.appVersion),
+ .flags = htole32(appBinary.flags),
+ .hw_hub_type = htole64(0),
+ .reserved[0] = htole32(targetChreApiVersion),
+ .reserved[1] = 0,
+ };
+ const uint8_t *headerBytes = reinterpret_cast<const uint8_t *>(&header);
- if(mContextHubModule->send_message(hubId, &hubMsg) != 0) {
+ std::vector<uint8_t> binaryWithHeader(appBinary.customBinary);
+ binaryWithHeader.insert(binaryWithHeader.begin(),
+ headerBytes,
+ headerBytes + sizeof(header));
+
+ hubMsg.message_type = CONTEXT_HUB_LOAD_APP;
+ hubMsg.message_len = binaryWithHeader.size();
+ hubMsg.message = binaryWithHeader.data();
+
+ if (mContextHubModule->send_message(hubId, &hubMsg) != 0) {
return Result::TRANSACTION_FAILED;
} else {
mTransactionId = transactionId;
diff --git a/contexthub/1.0/default/Contexthub.h b/contexthub/1.0/default/Contexthub.h
index 0883ce8..236e079 100644
--- a/contexthub/1.0/default/Contexthub.h
+++ b/contexthub/1.0/default/Contexthub.h
@@ -40,7 +40,7 @@
const ContextHubMsg &msg) override;
Return<Result> loadNanoApp(uint32_t hubId,
- const ::android::hardware::hidl_vec<uint8_t>& appBinary,
+ const NanoAppBinary& appBinary,
uint32_t transactionId) override;
Return<Result> unloadNanoApp(uint32_t hubId,
diff --git a/contexthub/1.0/types.hal b/contexthub/1.0/types.hal
index 2326b58..4950627 100644
--- a/contexthub/1.0/types.hal
+++ b/contexthub/1.0/types.hal
@@ -26,35 +26,26 @@
};
enum NanoAppFlags : uint32_t {
- SIGNED = (1<<0), // Signed nanoapp
- ENCRYPTED = (1<<1),// Encrypted nanoapp
-};
-
-enum HostEndPoint : uint16_t {
- BROADCAST = 0xFFFF, // The message endpoint is a broadcast end point.
- // This value must never be used for a message from
- // the host to the hub.
- // If BROADCAST is specified as a destination for a
- // message from the context hub to the ContextHub
- // service, the message must be broadcast to all
- // registered clients by the Context Hub service.
- UNSPECIFIED = 0xFFFE, // The message endpoint is unspecified. This value
- // must not be used for messages from the hub to host.
- // This value may be used for messages from the host
- // to the hub.
+ SIGNED = 1 << 0,
+ ENCRYPTED = 1 << 1,
};
struct NanoAppBinary {
- uint32_t headerVersion; // 0x1 for this version
- uint32_t magic; // "NANO"
- uint64_t appId; // App ID (contains vendor ID in most significant
- // 5 bytes)
- uint32_t appVersion; // Version of the app
- uint32_t flags; // Mask of NanoAppFlags
- uint64_t hwHubType; // Which hub type is this app is compiled for. A
- // unique ID for each h/w + toolchain
- // combination.
- vec<uint8_t> customBinary; // start of custom binary data
+ uint64_t appId; // Nanoapp identifier
+ uint32_t appVersion; // Version of the app (semantics defined by app)
+ bitfield<NanoAppFlags> flags;
+
+ // The version of the CHRE API that this nanoApp was compiled against. See
+ // the CHRE API header file chre/version.h for more information. The hub
+ // implementation must use this to confirm compatibility before loading
+ // this nanoApp.
+ uint8_t targetChreApiMajorVersion;
+ uint8_t targetChreApiMinorVersion;
+
+ // Implementation-specific binary nanoapp data. This does not include the
+ // common nanoapp header that contains the app ID, etc., as this data is
+ // explicitly passed through the other fields in this struct.
+ vec<uint8_t> customBinary;
};
enum SensorType : uint32_t {
@@ -130,20 +121,34 @@
// be sent to the hub in one chunk (in bytes)
// Machine-readable CHRE platform ID, returned to nanoapps in the CHRE API
- // function call chreGetPlatformId(). The most significant 5 bytes of this
- // value identify the vendor, while the remaining bytes are set by the
- // vendor to uniquely identify each different CHRE implementation/hardware
- // that the vendor supplies. This field pairs with the patch version part of
- // chreVersion to fully specify the CHRE implementation version. See also
- // the CHRE API header file chre/version.h.
+ // function call chreGetPlatformId(). This field pairs with
+ // chreApiMajorVersion, chreApiMinorVersion, and chrePatchVersion to fully
+ // specify the CHRE implementation version. See also the CHRE API header
+ // file chre/version.h.
uint64_t chrePlatformId;
- // CHRE implementation version, returned to nanoApps in the CHRE API
- // function call chreGetVersion(). This value consists of the implemented
- // CHRE API version (major version in most significant byte, followed by
- // minor version), and the platform-specific implementation patch version
- // in the lower two bytes. See also the CHRE API header file chre/version.h.
- uint32_t chreVersion;
+ // The version of the CHRE implementation returned to nanoApps in the CHRE
+ // API function call chreGetVersion(). The major and minor version specify
+ // the implemented version of the CHRE API, while the patch version
+ // describes the implementation version within the scope of the platform
+ // ID. See also the CHRE API header file chre/version.h.
+ uint8_t chreApiMajorVersion;
+ uint8_t chreApiMinorVersion;
+ uint16_t chrePatchVersion;
+};
+
+enum HostEndPoint : uint16_t {
+ BROADCAST = 0xFFFF, // The message endpoint is a broadcast end point.
+ // This value must never be used for a message from
+ // the host to the hub.
+ // If BROADCAST is specified as a destination for a
+ // message from the context hub to the ContextHub
+ // service, the message must be broadcast to all
+ // registered clients by the Context Hub service.
+ UNSPECIFIED = 0xFFFE, // The message endpoint is unspecified. This value
+ // must not be used for messages from the hub to host.
+ // This value may be used for messages from the host
+ // to the hub.
};
struct ContextHubMsg {
@@ -160,16 +165,16 @@
};
enum HubMemoryFlag : uint32_t {
- READ = (1<<0), // Readable
- WRITE = (1<<1), // Writable
- EXEC = (1<<2), // Executable
+ READ = 1 << 0, // Readable
+ WRITE = 1 << 1, // Writable
+ EXEC = 1 << 2, // Executable
};
struct MemRange {
uint32_t totalBytes; // Total capacity in bytes
uint32_t freeBytes; // Free capacity in bytes
HubMemoryType type; // Type of memory, see HubMemoryType
- uint32_t flags; // Mask of HubMemoryFlag
+ bitfield<HubMemoryFlag> flags;
};
enum AsyncEventType : uint32_t {
diff --git a/gnss/1.0/default/GnssUtils.cpp b/gnss/1.0/default/GnssUtils.cpp
index 4b3ca44..82a516b 100644
--- a/gnss/1.0/default/GnssUtils.cpp
+++ b/gnss/1.0/default/GnssUtils.cpp
@@ -28,7 +28,10 @@
GnssLocation gnssLocation = {};
if (location != nullptr) {
gnssLocation = {
- .gnssLocationFlags = location->flags,
+ // Bit operation AND with 1f below is needed to clear vertical accuracy,
+ // speed accuracy and bearing accuracy flags as some vendors are found
+ // to be setting these bits in pre-Android-O devices
+ .gnssLocationFlags = static_cast<uint16_t>(location->flags & 0x1f),
.latitudeDegrees = location->latitude,
.longitudeDegrees = location->longitude,
.altitudeMeters = location->altitude,
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index 8ea4b97..c145bc2 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -64,3 +64,160 @@
"android.hidl.base@1.0",
],
}
+
+genrule {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "types.hal",
+ "IAllocator.hal",
+ "IAllocatorClient.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "types.hal",
+ "IAllocator.hal",
+ "IAllocatorClient.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator.vts.driver@2.0",
+ generated_sources: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator.vts.driver@2.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libvts_common",
+ "libvts_datatype",
+ "libvts_measurement",
+ "libvts_multidevice_proto",
+ "libcamera_metadata",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocator.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocator.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/Allocator.vts.h",
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler",
+ generated_sources: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocator-vts.profiler_genc++_headers"],
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "libhidltransport",
+ "libvts_profiling",
+ "libvts_multidevice_proto",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocatorClient.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.cpp",
+ "android/hardware/graphics/allocator/2.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.allocator@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/graphics/allocator/2.0/ $(genDir)/android/hardware/graphics/allocator/2.0/",
+ srcs: [
+ "IAllocatorClient.hal",
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/allocator/2.0/AllocatorClient.vts.h",
+ "android/hardware/graphics/allocator/2.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler",
+ generated_sources: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++"],
+ generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.allocator@2.0-IAllocatorClient-vts.profiler_genc++_headers"],
+ shared_libs: [
+ "libbase",
+ "libhidlbase",
+ "libhidltransport",
+ "libvts_profiling",
+ "libvts_multidevice_proto",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ "android.hidl.base@1.0",
+ "android.hardware.graphics.allocator@2.0",
+ ],
+}
+
diff --git a/graphics/allocator/2.0/vts/Allocator.vts b/graphics/allocator/2.0/vts/Allocator.vts
index 04d4314..e767cbd 100644
--- a/graphics/allocator/2.0/vts/Allocator.vts
+++ b/graphics/allocator/2.0/vts/Allocator.vts
@@ -4,6 +4,7 @@
package: "android.hardware.graphics.allocator"
+import: "android.hardware.graphics.allocator@2.0::IAllocatorClient"
import: "android.hardware.graphics.allocator@2.0::types"
interface: {
@@ -21,36 +22,10 @@
scalar_value: {
int32_t: 1
}
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::IAllocator::BufferDescriptorInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "width"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "height"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::PixelFormat"
- }
- struct_value: {
- name: "producerUsageMask"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "consumerUsageMask"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
+ enumerator: "LAYERED_BUFFERS"
+ scalar_value: {
+ int32_t: 2
+ }
}
}
@@ -91,18 +66,15 @@
}
api: {
- name: "createDescriptor"
+ name: "createClient"
return_type_hidl: {
type: TYPE_ENUM
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
}
return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocator::BufferDescriptorInfo"
+ type: TYPE_HIDL_INTERFACE
+ predefined_type: "IAllocatorClient"
+ is_callback: false
}
callflow: {
entry: true
@@ -112,104 +84,4 @@
}
}
- api: {
- name: "destroyDescriptor"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "testAllocate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- callflow: {
- next: "allocate"
- }
- }
-
- api: {
- name: "allocate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- callflow: {
- next: "exportHandle"
- }
- }
-
- api: {
- name: "free"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "exportHandle"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "free"
- }
- }
-
}
diff --git a/graphics/allocator/2.0/vts/AllocatorClient.vts b/graphics/allocator/2.0/vts/AllocatorClient.vts
index face060..2ab19f7 100644
--- a/graphics/allocator/2.0/vts/AllocatorClient.vts
+++ b/graphics/allocator/2.0/vts/AllocatorClient.vts
@@ -9,6 +9,472 @@
interface: {
attribute: {
+ name: "::android::hardware::graphics::common::V1_0::PixelFormat"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "RGBA_8888"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "RGBX_8888"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "RGB_888"
+ scalar_value: {
+ int32_t: 3
+ }
+ enumerator: "RGB_565"
+ scalar_value: {
+ int32_t: 4
+ }
+ enumerator: "BGRA_8888"
+ scalar_value: {
+ int32_t: 5
+ }
+ enumerator: "RGBA_FP16"
+ scalar_value: {
+ int32_t: 22
+ }
+ enumerator: "YV12"
+ scalar_value: {
+ int32_t: 842094169
+ }
+ enumerator: "Y8"
+ scalar_value: {
+ int32_t: 538982489
+ }
+ enumerator: "Y16"
+ scalar_value: {
+ int32_t: 540422489
+ }
+ enumerator: "RAW16"
+ scalar_value: {
+ int32_t: 32
+ }
+ enumerator: "RAW10"
+ scalar_value: {
+ int32_t: 37
+ }
+ enumerator: "RAW12"
+ scalar_value: {
+ int32_t: 38
+ }
+ enumerator: "RAW_OPAQUE"
+ scalar_value: {
+ int32_t: 36
+ }
+ enumerator: "BLOB"
+ scalar_value: {
+ int32_t: 33
+ }
+ enumerator: "IMPLEMENTATION_DEFINED"
+ scalar_value: {
+ int32_t: 34
+ }
+ enumerator: "YCBCR_420_888"
+ scalar_value: {
+ int32_t: 35
+ }
+ enumerator: "YCBCR_422_888"
+ scalar_value: {
+ int32_t: 39
+ }
+ enumerator: "YCBCR_444_888"
+ scalar_value: {
+ int32_t: 40
+ }
+ enumerator: "FLEX_RGB_888"
+ scalar_value: {
+ int32_t: 41
+ }
+ enumerator: "FLEX_RGBA_8888"
+ scalar_value: {
+ int32_t: 42
+ }
+ enumerator: "YCBCR_422_SP"
+ scalar_value: {
+ int32_t: 16
+ }
+ enumerator: "YCRCB_420_SP"
+ scalar_value: {
+ int32_t: 17
+ }
+ enumerator: "YCBCR_422_I"
+ scalar_value: {
+ int32_t: 20
+ }
+ enumerator: "JPEG"
+ scalar_value: {
+ int32_t: 256
+ }
+ }
+ }
+
+ attribute: {
+ name: "::android::hardware::graphics::common::V1_0::Transform"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "FLIP_H"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "FLIP_V"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "ROT_90"
+ scalar_value: {
+ int32_t: 4
+ }
+ enumerator: "ROT_180"
+ scalar_value: {
+ int32_t: 3
+ }
+ enumerator: "ROT_270"
+ scalar_value: {
+ int32_t: 7
+ }
+ }
+ }
+
+ attribute: {
+ name: "::android::hardware::graphics::common::V1_0::Dataspace"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "UNKNOWN"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "ARBITRARY"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "STANDARD_SHIFT"
+ scalar_value: {
+ int32_t: 16
+ }
+ enumerator: "STANDARD_MASK"
+ scalar_value: {
+ int32_t: 4128768
+ }
+ enumerator: "STANDARD_UNSPECIFIED"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "STANDARD_BT709"
+ scalar_value: {
+ int32_t: 65536
+ }
+ enumerator: "STANDARD_BT601_625"
+ scalar_value: {
+ int32_t: 131072
+ }
+ enumerator: "STANDARD_BT601_625_UNADJUSTED"
+ scalar_value: {
+ int32_t: 196608
+ }
+ enumerator: "STANDARD_BT601_525"
+ scalar_value: {
+ int32_t: 262144
+ }
+ enumerator: "STANDARD_BT601_525_UNADJUSTED"
+ scalar_value: {
+ int32_t: 327680
+ }
+ enumerator: "STANDARD_BT2020"
+ scalar_value: {
+ int32_t: 393216
+ }
+ enumerator: "STANDARD_BT2020_CONSTANT_LUMINANCE"
+ scalar_value: {
+ int32_t: 458752
+ }
+ enumerator: "STANDARD_BT470M"
+ scalar_value: {
+ int32_t: 524288
+ }
+ enumerator: "STANDARD_FILM"
+ scalar_value: {
+ int32_t: 589824
+ }
+ enumerator: "STANDARD_DCI_P3"
+ scalar_value: {
+ int32_t: 655360
+ }
+ enumerator: "STANDARD_ADOBE_RGB"
+ scalar_value: {
+ int32_t: 720896
+ }
+ enumerator: "TRANSFER_SHIFT"
+ scalar_value: {
+ int32_t: 22
+ }
+ enumerator: "TRANSFER_MASK"
+ scalar_value: {
+ int32_t: 130023424
+ }
+ enumerator: "TRANSFER_UNSPECIFIED"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "TRANSFER_LINEAR"
+ scalar_value: {
+ int32_t: 4194304
+ }
+ enumerator: "TRANSFER_SRGB"
+ scalar_value: {
+ int32_t: 8388608
+ }
+ enumerator: "TRANSFER_SMPTE_170M"
+ scalar_value: {
+ int32_t: 12582912
+ }
+ enumerator: "TRANSFER_GAMMA2_2"
+ scalar_value: {
+ int32_t: 16777216
+ }
+ enumerator: "TRANSFER_GAMMA2_6"
+ scalar_value: {
+ int32_t: 20971520
+ }
+ enumerator: "TRANSFER_GAMMA2_8"
+ scalar_value: {
+ int32_t: 25165824
+ }
+ enumerator: "TRANSFER_ST2084"
+ scalar_value: {
+ int32_t: 29360128
+ }
+ enumerator: "TRANSFER_HLG"
+ scalar_value: {
+ int32_t: 33554432
+ }
+ enumerator: "RANGE_SHIFT"
+ scalar_value: {
+ int32_t: 27
+ }
+ enumerator: "RANGE_MASK"
+ scalar_value: {
+ int32_t: 939524096
+ }
+ enumerator: "RANGE_UNSPECIFIED"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "RANGE_FULL"
+ scalar_value: {
+ int32_t: 134217728
+ }
+ enumerator: "RANGE_LIMITED"
+ scalar_value: {
+ int32_t: 268435456
+ }
+ enumerator: "RANGE_EXTENDED"
+ scalar_value: {
+ int32_t: 402653184
+ }
+ enumerator: "SRGB_LINEAR"
+ scalar_value: {
+ int32_t: 512
+ }
+ enumerator: "V0_SRGB_LINEAR"
+ scalar_value: {
+ int32_t: 138477568
+ }
+ enumerator: "V0_SCRGB_LINEAR"
+ scalar_value: {
+ int32_t: 406913024
+ }
+ enumerator: "SRGB"
+ scalar_value: {
+ int32_t: 513
+ }
+ enumerator: "V0_SRGB"
+ scalar_value: {
+ int32_t: 142671872
+ }
+ enumerator: "V0_SCRGB"
+ scalar_value: {
+ int32_t: 411107328
+ }
+ enumerator: "JFIF"
+ scalar_value: {
+ int32_t: 257
+ }
+ enumerator: "V0_JFIF"
+ scalar_value: {
+ int32_t: 146931712
+ }
+ enumerator: "BT601_625"
+ scalar_value: {
+ int32_t: 258
+ }
+ enumerator: "V0_BT601_625"
+ scalar_value: {
+ int32_t: 281149440
+ }
+ enumerator: "BT601_525"
+ scalar_value: {
+ int32_t: 259
+ }
+ enumerator: "V0_BT601_525"
+ scalar_value: {
+ int32_t: 281280512
+ }
+ enumerator: "BT709"
+ scalar_value: {
+ int32_t: 260
+ }
+ enumerator: "V0_BT709"
+ scalar_value: {
+ int32_t: 281083904
+ }
+ enumerator: "DCI_P3_LINEAR"
+ scalar_value: {
+ int32_t: 139067392
+ }
+ enumerator: "DCI_P3"
+ scalar_value: {
+ int32_t: 155844608
+ }
+ enumerator: "DISPLAY_P3_LINEAR"
+ scalar_value: {
+ int32_t: 139067392
+ }
+ enumerator: "DISPLAY_P3"
+ scalar_value: {
+ int32_t: 143261696
+ }
+ enumerator: "ADOBE_RGB"
+ scalar_value: {
+ int32_t: 151715840
+ }
+ enumerator: "BT2020_LINEAR"
+ scalar_value: {
+ int32_t: 138805248
+ }
+ enumerator: "BT2020"
+ scalar_value: {
+ int32_t: 147193856
+ }
+ enumerator: "DEPTH"
+ scalar_value: {
+ int32_t: 4096
+ }
+ }
+ }
+
+ attribute: {
+ name: "::android::hardware::graphics::common::V1_0::ColorMode"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "NATIVE"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "STANDARD_BT601_625"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "STANDARD_BT601_625_UNADJUSTED"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "STANDARD_BT601_525"
+ scalar_value: {
+ int32_t: 3
+ }
+ enumerator: "STANDARD_BT601_525_UNADJUSTED"
+ scalar_value: {
+ int32_t: 4
+ }
+ enumerator: "STANDARD_BT709"
+ scalar_value: {
+ int32_t: 5
+ }
+ enumerator: "DCI_P3"
+ scalar_value: {
+ int32_t: 6
+ }
+ enumerator: "SRGB"
+ scalar_value: {
+ int32_t: 7
+ }
+ enumerator: "ADOBE_RGB"
+ scalar_value: {
+ int32_t: 8
+ }
+ }
+ }
+
+ attribute: {
+ name: "::android::hardware::graphics::common::V1_0::ColorTransform"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "IDENTITY"
+ scalar_value: {
+ int32_t: 0
+ }
+ enumerator: "ARBITRARY_MATRIX"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "VALUE_INVERSE"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "GRAYSCALE"
+ scalar_value: {
+ int32_t: 3
+ }
+ enumerator: "CORRECT_PROTANOPIA"
+ scalar_value: {
+ int32_t: 4
+ }
+ enumerator: "CORRECT_DEUTERANOPIA"
+ scalar_value: {
+ int32_t: 5
+ }
+ enumerator: "CORRECT_TRITANOPIA"
+ scalar_value: {
+ int32_t: 6
+ }
+ }
+ }
+
+ attribute: {
+ name: "::android::hardware::graphics::common::V1_0::Hdr"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "int32_t"
+
+ enumerator: "DOLBY_VISION"
+ scalar_value: {
+ int32_t: 1
+ }
+ enumerator: "HDR10"
+ scalar_value: {
+ int32_t: 2
+ }
+ enumerator: "HLG"
+ scalar_value: {
+ int32_t: 3
+ }
+ }
+ }
+
+ attribute: {
name: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
type: TYPE_STRUCT
struct_value: {
diff --git a/graphics/allocator/2.0/vts/types.vts b/graphics/allocator/2.0/vts/types.vts
index ac1bf3f..2b7e47a 100644
--- a/graphics/allocator/2.0/vts/types.vts
+++ b/graphics/allocator/2.0/vts/types.vts
@@ -132,100 +132,3 @@
}
}
-attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::PixelFormat"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "RGBA_8888"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "RGBX_8888"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "RGB_888"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "RGB_565"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "BGRA_8888"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "YV12"
- scalar_value: {
- int32_t: 842094169
- }
- enumerator: "Y8"
- scalar_value: {
- int32_t: 538982489
- }
- enumerator: "Y16"
- scalar_value: {
- int32_t: 540422489
- }
- enumerator: "RAW16"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "RAW10"
- scalar_value: {
- int32_t: 37
- }
- enumerator: "RAW12"
- scalar_value: {
- int32_t: 38
- }
- enumerator: "RAW_OPAQUE"
- scalar_value: {
- int32_t: 36
- }
- enumerator: "BLOB"
- scalar_value: {
- int32_t: 33
- }
- enumerator: "IMPLEMENTATION_DEFINED"
- scalar_value: {
- int32_t: 34
- }
- enumerator: "YCbCr_420_888"
- scalar_value: {
- int32_t: 35
- }
- enumerator: "YCbCr_422_888"
- scalar_value: {
- int32_t: 39
- }
- enumerator: "YCbCr_444_888"
- scalar_value: {
- int32_t: 40
- }
- enumerator: "FLEX_RGB_888"
- scalar_value: {
- int32_t: 41
- }
- enumerator: "FLEX_RGBA_8888"
- scalar_value: {
- int32_t: 42
- }
- enumerator: "YCbCr_422_SP"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "YCrCb_420_SP"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "YCbCr_422_I"
- scalar_value: {
- int32_t: 20
- }
- }
-}
-
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index b67afd1..721c632 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -44,3 +44,55 @@
"libutils",
],
}
+
+genrule {
+ name: "android.hardware.graphics.common.vts.driver@1.0_genc++",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+ srcs: [
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.0/types.vts.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.graphics.common.vts.driver@1.0_genc++_headers",
+ tools: ["hidl-gen", "vtsc"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.graphics.common@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/graphics/common/1.0/ $(genDir)/android/hardware/graphics/common/1.0/",
+ srcs: [
+ "types.hal",
+ ],
+ out: [
+ "android/hardware/graphics/common/1.0/types.vts.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.graphics.common.vts.driver@1.0",
+ generated_sources: ["android.hardware.graphics.common.vts.driver@1.0_genc++"],
+ generated_headers: ["android.hardware.graphics.common.vts.driver@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.graphics.common.vts.driver@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "libvts_common",
+ "libvts_datatype",
+ "libvts_measurement",
+ "libvts_multidevice_proto",
+ "libcamera_metadata",
+ "libprotobuf-cpp-full",
+ "android.hardware.graphics.common@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ ],
+}
\ No newline at end of file
diff --git a/graphics/composer/2.1/default/IComposerCommandBuffer.h b/graphics/composer/2.1/default/IComposerCommandBuffer.h
index 7e14f19..65e7799 100644
--- a/graphics/composer/2.1/default/IComposerCommandBuffer.h
+++ b/graphics/composer/2.1/default/IComposerCommandBuffer.h
@@ -686,8 +686,7 @@
uint16_t* outLength)
{
if (mCommandEnd) {
- LOG_FATAL("endCommand was not called before command 0x%x",
- command);
+ LOG_FATAL("endCommand was not called for last command");
}
constexpr uint32_t opcode_mask =
diff --git a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml
index b800fba..455802d 100644
--- a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml
+++ b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml
@@ -24,7 +24,6 @@
_32bit::DATA/nativetest/light_hidl_hal_test/light_hidl_hal_test,
_64bit::DATA/nativetest64/light_hidl_hal_test/light_hidl_hal_test,
"/>
- <option name="test-config-path" value="vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config" />
<option name="binary-test-type" value="gtest" />
<option name="test-timeout" value="1m" />
<option name="enable-profiling" value="true" />
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
index 70eca84..db210d9 100644
--- a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host/SensorsHidlTest.py
@@ -43,9 +43,6 @@
self.dut.shell.one.Execute(
"setprop vts.hal.vts.hidl.get_stub true")
- if self.enable_profiling:
- profiling_utils.EnableVTSProfiling(self.dut.shell.one)
-
self.dut.hal.InitHidlHal(
target_type="sensors",
target_basepaths=self.dut.libPaths,
@@ -60,9 +57,17 @@
and disable profiling after the test is done.
"""
if self.enable_profiling:
+ self.ProcessAndUploadTraceData()
+
+ def setUpTest(self):
+ if self.enable_profiling:
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ def tearDownTest(self):
+ if self.enable_profiling:
profiling_trace_path = getattr(
self, self.VTS_PROFILING_TRACING_PATH, "")
- self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
def testSensorsBasic(self):
diff --git a/thermal/1.0/IThermal.hal b/thermal/1.0/IThermal.hal
index e5f70cb..076b697 100644
--- a/thermal/1.0/IThermal.hal
+++ b/thermal/1.0/IThermal.hal
@@ -75,4 +75,19 @@
getCoolingDevices()
generates (ThermalStatus status, vec<CoolingDevice> devices);
+ /* Retrieves an undefined temperature value.
+ *
+ * @return status Status of the operation. If status code is FAILURE,
+ * the status.debugMessage must be populated with the human-readable
+ * error message.
+ * @return undefinedTemperature returns an undefined temperature value if
+ * status code is SUCCESS. Undefined temperature value is an
+ * unreachable constant device temperature value for HAL.
+ *
+ */
+ @callflow(next={"*"})
+ @entry
+ @exit
+ getUndefinedTemperature()
+ generates (ThermalStatus status, float undefinedTemperature);
};
diff --git a/thermal/1.0/default/Thermal.cpp b/thermal/1.0/default/Thermal.cpp
index 8a8ad0a..5bc313d 100644
--- a/thermal/1.0/default/Thermal.cpp
+++ b/thermal/1.0/default/Thermal.cpp
@@ -169,6 +169,13 @@
return Void();
}
+Return<void> Thermal::getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) {
+ ThermalStatus status;
+ status.code = ThermalStatusCode::SUCCESS;
+ _hidl_cb(status, UNKNOWN_TEMPERATURE);
+ return Void();
+}
+
IThermal* HIDL_FETCH_IThermal(const char* /* name */) {
thermal_module_t* module;
status_t err = hw_get_module(THERMAL_HARDWARE_MODULE_ID,
diff --git a/thermal/1.0/default/Thermal.h b/thermal/1.0/default/Thermal.h
index 2e06289..eec0ff5 100644
--- a/thermal/1.0/default/Thermal.h
+++ b/thermal/1.0/default/Thermal.h
@@ -45,6 +45,7 @@
Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override;
Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override;
Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override;
+ Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override;
private:
thermal_module_t* mModule;
};
diff --git a/thermal/1.0/types.hal b/thermal/1.0/types.hal
index 8864f43..30cfdd9 100644
--- a/thermal/1.0/types.hal
+++ b/thermal/1.0/types.hal
@@ -46,27 +46,27 @@
/**
* Current temperature in Celsius. If not available set by HAL to
- * UNKNOWN_TEMPERATURE.
+ * undefined temperature value.
* Current temperature can be in any units if type=UNKNOWN.
*/
float currentValue;
/**
* Throttling temperature constant for this temperature.
- * If not available, set by HAL to UNKNOWN_TEMPERATURE.
+ * If not available, set by HAL to undefined temperature value.
*/
float throttlingThreshold;
/**
* Shutdown temperature constant for this temperature.
- * If not available, set by HAL to UNKNOWN_TEMPERATURE.
+ * If not available, set by HAL to undefined temperature value.
*/
float shutdownThreshold;
/**
* Threshold temperature above which the VR mode clockrate minimums cannot
* be maintained for this device.
- * If not available, set by HAL to UNKNOWN_TEMPERATURE.
+ * If not available, set by HAL to undefined temperature value.
*/
float vrThrottlingThreshold;
@@ -135,7 +135,3 @@
*/
string debugMessage;
};
-
-/**
- * TODO(pbond): add float constant UNDEFINED_TEMPERATURE.
- */
diff --git a/thermal/1.0/vts/Thermal.vts b/thermal/1.0/vts/Thermal.vts
index e76d943..d8cc670 100644
--- a/thermal/1.0/vts/Thermal.vts
+++ b/thermal/1.0/vts/Thermal.vts
@@ -79,4 +79,25 @@
}
}
+ api: {
+ name: "getUndefinedTemperature"
+ return_type_hidl: {
+ type: TYPE_STRUCT
+ predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
+ }
+ return_type_hidl: {
+ type: TYPE_SCALAR
+ scalar_type: "float_t"
+ }
+ callflow: {
+ next: "*"
+ }
+ callflow: {
+ entry: true
+ }
+ callflow: {
+ exit: true
+ }
+ }
+
}
diff --git a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp b/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
index 8a5ea2c..6eb6269 100644
--- a/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
+++ b/thermal/1.0/vts/functional/thermal_hidl_hal_test.cpp
@@ -43,8 +43,6 @@
#define THERMAL_SERVICE_NAME "thermal"
#define MONITORING_OPERATION_NUMBER 10
-#define UNDEFINED_TEMPERATURE (-FLT_MAX)
-
#define MAX_DEVICE_TEMPERATURE 200
#define MAX_FAN_SPEED 20000
@@ -56,6 +54,17 @@
ASSERT_NE(thermal_, nullptr);
baseSize_ = 0;
names_.clear();
+
+ {
+ float undefined_temperature;
+ thermal_->getUndefinedTemperature(
+ [&undefined_temperature](ThermalStatus status, float temperature) {
+ EXPECT_EQ(ThermalStatusCode::SUCCESS, status.code);
+ EXPECT_LT(MAX_DEVICE_TEMPERATURE, std::abs(undefined_temperature));
+ undefined_temperature = temperature;
+ });
+ undefined_temperature_ = undefined_temperature;
+ }
}
virtual void TearDown() override {}
@@ -127,21 +136,20 @@
// .currentValue of known type is in Celsius and must be reasonable.
EXPECT_TRUE(temperature.type == TemperatureType::UNKNOWN ||
std::abs(temperature.currentValue) < MAX_DEVICE_TEMPERATURE ||
- temperature.currentValue == UNDEFINED_TEMPERATURE);
+ temperature.currentValue == undefined_temperature_);
// .name must not be empty.
EXPECT_LT(0u, temperature.name.size());
// .currentValue must not exceed .shutdwonThreshold if defined.
EXPECT_TRUE(temperature.currentValue < temperature.shutdownThreshold ||
- temperature.currentValue == UNDEFINED_TEMPERATURE ||
- temperature.shutdownThreshold == UNDEFINED_TEMPERATURE);
+ temperature.currentValue == undefined_temperature_ ||
+ temperature.shutdownThreshold == undefined_temperature_);
// .throttlingThreshold must not exceed .shutdownThreshold if defined.
- EXPECT_TRUE(temperature.throttlingThreshold <
- temperature.shutdownThreshold ||
- temperature.throttlingThreshold == UNDEFINED_TEMPERATURE ||
- temperature.shutdownThreshold == UNDEFINED_TEMPERATURE);
+ EXPECT_TRUE(temperature.throttlingThreshold < temperature.shutdownThreshold ||
+ temperature.throttlingThreshold == undefined_temperature_ ||
+ temperature.shutdownThreshold == undefined_temperature_);
}
// Check validity of CPU usage returned by Thermal HAL.
@@ -164,6 +172,7 @@
size_t baseSize_;
std::vector<hidl_string> names_;
+ float undefined_temperature_;
};
// Sanity test for Thermal::getTemperatures().
diff --git a/tv/cec/1.0/vts/Android.mk b/tv/cec/1.0/vts/Android.mk
index 60cc723..fc636f7 100644
--- a/tv/cec/1.0/vts/Android.mk
+++ b/tv/cec/1.0/vts/Android.mk
@@ -16,4 +16,4 @@
LOCAL_PATH := $(call my-dir)
-include $(call all-subdir-makefiles)
+include $(LOCAL_PATH)/functional/vts/testcases/hal/tv_cec/hidl/Android.mk
diff --git a/tv/cec/1.0/vts/functional/Android.mk b/tv/cec/1.0/vts/functional/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/cec/1.0/vts/functional/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/cec/1.0/vts/functional/vts/Android.mk b/tv/cec/1.0/vts/functional/vts/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/cec/1.0/vts/functional/vts/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/cec/1.0/vts/functional/vts/testcases/Android.mk b/tv/cec/1.0/vts/functional/vts/testcases/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/cec/1.0/vts/functional/vts/testcases/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/cec/1.0/vts/functional/vts/testcases/hal/Android.mk b/tv/cec/1.0/vts/functional/vts/testcases/hal/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/cec/1.0/vts/functional/vts/testcases/hal/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/Android.mk b/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/tv/cec/1.0/vts/functional/vts/testcases/hal/tv_cec/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/tv/input/1.0/vts/Android.mk b/tv/input/1.0/vts/Android.mk
index 040cfce..e0ad01e 100644
--- a/tv/input/1.0/vts/Android.mk
+++ b/tv/input/1.0/vts/Android.mk
@@ -16,4 +16,4 @@
LOCAL_PATH := $(call my-dir)
-include $(LOCAL_PATH)/functional/vts/testcases/hal/tv_input/hidl/host/Android.mk
+include $(LOCAL_PATH)/functional/vts/testcases/hal/tv_input/hidl/Android.mk
diff --git a/vehicle/2.0/default/impl/DefaultConfig.h b/vehicle/2.0/default/impl/DefaultConfig.h
index 77ee9d4..12c1c1b 100644
--- a/vehicle/2.0/default/impl/DefaultConfig.h
+++ b/vehicle/2.0/default/impl/DefaultConfig.h
@@ -159,6 +159,18 @@
.prop = VehicleProperty::IGNITION_STATE,
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
+ .prop = VehicleProperty::OBD2_LIVE_FRAME,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+
+ {
+ .prop = VehicleProperty::OBD2_FREEZE_FRAME,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
}
};
diff --git a/vehicle/2.0/default/impl/DefaultVehicleHal.cpp b/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
index 6cbcfe3..4541168 100644
--- a/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
+++ b/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
@@ -90,6 +90,14 @@
case VehicleProperty::IGNITION_STATE:
v = pool.obtainInt32(toInt(VehicleIgnitionState::ACC));
break;
+ case VehicleProperty::OBD2_LIVE_FRAME:
+ v = pool.obtainComplex();
+ *outStatus = fillObd2LiveFrame(&v);
+ break;
+ case VehicleProperty::OBD2_FREEZE_FRAME:
+ v = pool.obtainComplex();
+ *outStatus = fillObd2FreezeFrame(&v);
+ break;
default:
*outStatus = StatusCode::INVALID_ARG;
}
@@ -197,6 +205,78 @@
return StatusCode::OK;
}
+static std::vector<int32_t> fillObd2IntValues() {
+ std::vector<int32_t> intValues(toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX));
+#define SENSOR(name) toInt(Obd2IntegerSensorIndex:: name)
+ intValues[SENSOR(FUEL_SYSTEM_STATUS)] = toInt(FuelSystemStatus::CLOSED_LOOP);
+ intValues[SENSOR(MALFUNCTION_INDICATOR_LIGHT_ON)] = 0;
+ intValues[SENSOR(IGNITION_MONITORS_SUPPORTED)] = toInt(IgnitionMonitorKind::SPARK);
+ intValues[SENSOR(IGNITION_SPECIFIC_MONITORS)] =
+ CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
+ CommonIgnitionMonitors::MISFIRE_AVAILABLE |
+ SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
+ SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE;
+ intValues[SENSOR(INTAKE_AIR_TEMPERATURE)] = 35;
+ intValues[SENSOR(COMMANDED_SECONDARY_AIR_STATUS)] =
+ toInt(SecondaryAirStatus::FROM_OUTSIDE_OR_OFF);
+ intValues[SENSOR(NUM_OXYGEN_SENSORS_PRESENT)] = 1;
+ intValues[SENSOR(RUNTIME_SINCE_ENGINE_START)] = 500;
+ intValues[SENSOR(DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON)] = 0;
+ intValues[SENSOR(WARMUPS_SINCE_CODES_CLEARED)] = 51;
+ intValues[SENSOR(DISTANCE_TRAVELED_SINCE_CODES_CLEARED)] = 365;
+ intValues[SENSOR(ABSOLUTE_BAROMETRIC_PRESSURE)] = 30;
+ intValues[SENSOR(CONTROL_MODULE_VOLTAGE)] = 12;
+ intValues[SENSOR(AMBIENT_AIR_TEMPERATURE)] = 18;
+ intValues[SENSOR(MAX_FUEL_AIR_EQUIVALENCE_RATIO)] = 1;
+ intValues[SENSOR(FUEL_TYPE)] = toInt(FuelType::GASOLINE);
+#undef SENSOR
+ return intValues;
+}
+
+static std::vector<float> fillObd2FloatValues() {
+ std::vector<float> floatValues(toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX));
+#define SENSOR(name) toInt(Obd2FloatSensorIndex:: name)
+ floatValues[SENSOR(CALCULATED_ENGINE_LOAD)] = 0.153;
+ floatValues[SENSOR(SHORT_TERM_FUEL_TRIM_BANK1)] = -0.16;
+ floatValues[SENSOR(LONG_TERM_FUEL_TRIM_BANK1)] = -0.16;
+ floatValues[SENSOR(SHORT_TERM_FUEL_TRIM_BANK2)] = -0.16;
+ floatValues[SENSOR(LONG_TERM_FUEL_TRIM_BANK2)] = -0.16;
+ floatValues[SENSOR(INTAKE_MANIFOLD_ABSOLUTE_PRESSURE)] = 7.5;
+ floatValues[SENSOR(ENGINE_RPM)] = 1250.;
+ floatValues[SENSOR(VEHICLE_SPEED)] = 40.;
+ floatValues[SENSOR(TIMING_ADVANCE)] = 2.5;
+ floatValues[SENSOR(THROTTLE_POSITION)] = 19.75;
+ floatValues[SENSOR(OXYGEN_SENSOR1_VOLTAGE)] = 0.265;
+ floatValues[SENSOR(FUEL_TANK_LEVEL_INPUT)] = 0.824;
+ floatValues[SENSOR(EVAPORATION_SYSTEM_VAPOR_PRESSURE)] = -0.373;
+ floatValues[SENSOR(CATALYST_TEMPERATURE_BANK1_SENSOR1)] = 190.;
+ floatValues[SENSOR(RELATIVE_THROTTLE_POSITION)] = 3.;
+ floatValues[SENSOR(ABSOLUTE_THROTTLE_POSITION_B)] = 0.306;
+ floatValues[SENSOR(ACCELERATOR_PEDAL_POSITION_D)] = 0.188;
+ floatValues[SENSOR(ACCELERATOR_PEDAL_POSITION_E)] = 0.094;
+ floatValues[SENSOR(COMMANDED_THROTTLE_ACTUATOR)] = 0.024;
+#undef SENSOR
+ return floatValues;
+}
+
+StatusCode DefaultVehicleHal::fillObd2LiveFrame(VehiclePropValuePtr* v) {
+ static std::vector<int32_t> intValues(fillObd2IntValues());
+ static std::vector<float> floatValues(fillObd2FloatValues());
+ (*v)->value.int32Values = intValues;
+ (*v)->value.floatValues = floatValues;
+ return StatusCode::OK;
+}
+
+StatusCode DefaultVehicleHal::fillObd2FreezeFrame(VehiclePropValuePtr* v) {
+ static std::vector<int32_t> intValues(fillObd2IntValues());
+ static std::vector<float> floatValues(fillObd2FloatValues());
+ (*v)->value.int32Values = intValues;
+ (*v)->value.floatValues = floatValues;
+ (*v)->value.stringValue = "P0010";
+ return StatusCode::OK;
+}
+
+
} // impl
} // namespace V2_0
diff --git a/vehicle/2.0/default/impl/DefaultVehicleHal.h b/vehicle/2.0/default/impl/DefaultVehicleHal.h
index 231f2b2..15a4789 100644
--- a/vehicle/2.0/default/impl/DefaultVehicleHal.h
+++ b/vehicle/2.0/default/impl/DefaultVehicleHal.h
@@ -57,6 +57,8 @@
StatusCode setHvacTemperature(int32_t areaId, float value);
StatusCode getHvacDefroster(int32_t areaId, bool* outValue);
StatusCode setHvacDefroster(int32_t areaId, bool value);
+ StatusCode fillObd2LiveFrame (VehiclePropValuePtr* v);
+ StatusCode fillObd2FreezeFrame (VehiclePropValuePtr* v);
private:
int32_t mFanSpeed = 3;
int32_t mBrightness = 7;
diff --git a/vehicle/2.0/vts/Android.mk b/vehicle/2.0/vts/Android.mk
index df5dac8..31fa999 100644
--- a/vehicle/2.0/vts/Android.mk
+++ b/vehicle/2.0/vts/Android.mk
@@ -16,4 +16,4 @@
LOCAL_PATH := $(call my-dir)
-include $(call all-subdir-makefiles)
\ No newline at end of file
+include $(LOCAL_PATH)/functional/vts/testcases/hal/vehicle/hidl/Android.mk
\ No newline at end of file
diff --git a/vehicle/2.0/vts/functional/Android.mk b/vehicle/2.0/vts/functional/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/2.0/vts/functional/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vehicle/2.0/vts/functional/vts/Android.mk b/vehicle/2.0/vts/functional/vts/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/2.0/vts/functional/vts/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vehicle/2.0/vts/functional/vts/testcases/Android.mk b/vehicle/2.0/vts/functional/vts/testcases/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/2.0/vts/functional/vts/testcases/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vehicle/2.0/vts/functional/vts/testcases/hal/Android.mk b/vehicle/2.0/vts/functional/vts/testcases/hal/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/2.0/vts/functional/vts/testcases/hal/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/Android.mk b/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py b/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
index 715cba8..5faf78a 100644
--- a/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
+++ b/vehicle/2.0/vts/functional/vts/testcases/hal/vehicle/hidl/host/VehicleHidlTest.py
@@ -35,9 +35,6 @@
self.dut.shell.InvokeTerminal("one")
self.dut.shell.one.Execute("setenforce 0") # SELinux permissive mode
- if self.enable_profiling:
- profiling_utils.EnableVTSProfiling(self.dut.shell.one)
-
self.dut.hal.InitHidlHal(
target_type="vehicle",
target_basepaths=self.dut.libPaths,
@@ -58,9 +55,17 @@
and disable profiling after the test is done.
"""
if self.enable_profiling:
+ self.ProcessAndUploadTraceData()
+
+ def setUpTest(self):
+ if self.enable_profiling:
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ def tearDownTest(self):
+ if self.enable_profiling:
profiling_trace_path = getattr(
self, self.VTS_PROFILING_TRACING_PATH, "")
- self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
def testListProperties(self):
@@ -84,6 +89,40 @@
asserts.assertEqual(0, len(mandatoryProps))
+ def getSupportInfo(self):
+ """Check whether OBD2_{LIVE|FREEZE}_FRAME is supported."""
+ isLiveSupported, isFreezeSupported = False, False
+ allConfigs = self.vehicle.getAllPropConfigs()
+ for config in allConfigs:
+ if config['prop'] == self.vtypes.OBD2_LIVE_FRAME:
+ isLiveSupported = True
+ elif config['prop'] == self.vtypes.OBD2_FREEZE_FRAME:
+ isFreezeSupported = True
+ if isLiveSupported and isFreezeSupported:
+ break
+ return isLiveSupported, isFreezeSupported
+
+ def testObd2SensorProperties(self):
+ """Test reading the live and freeze OBD2 frame properties.
+
+ OBD2 (On-Board Diagnostics 2) is the industry standard protocol
+ for retrieving diagnostic sensor information from vehicles.
+ """
+ def checkLiveFrameRead():
+ """Validates reading the OBD2_LIVE_FRAME (if available)."""
+ logging.info("checkLiveFrameRead no-op pass")
+
+ def checkFreezeFrameRead():
+ """Validates reading the OBD2_FREEZE_FRAME (if available)."""
+ logging.info("checkLiveFrameRead no-op pass")
+
+ isLiveSupported, isFreezeSupported = self.getSupportInfo()
+ logging.info("isLiveSupported = %s, isFreezeSupported = %s",
+ isLiveSupported, isFreezeSupported)
+ if isLiveSupported:
+ checkLiveFrameRead()
+ if isFreezeSupported:
+ checkFreezeFrameRead()
if __name__ == "__main__":
test_runner.main()
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
index da70474..498ea06 100644
--- a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
@@ -39,9 +39,6 @@
self.dut.shell.one.Execute(
"setprop vts.hal.vts.hidl.get_stub true")
- if self.enable_profiling:
- profiling_utils.EnableVTSProfiling(self.dut.shell.one)
-
self.dut.hal.InitHidlHal(
target_type="vibrator",
target_basepaths=self.dut.libPaths,
@@ -56,9 +53,17 @@
and disable profiling after the test is done.
"""
if self.enable_profiling:
+ self.ProcessAndUploadTraceData()
+
+ def setUpTest(self):
+ if self.enable_profiling:
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ def tearDownTest(self):
+ if self.enable_profiling:
profiling_trace_path = getattr(
self, self.VTS_PROFILING_TRACING_PATH, "")
- self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
def testVibratorBasic(self):
diff --git a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
index 933fcde..d20e9ce 100644
--- a/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
+++ b/vr/1.0/vts/functional/vts/testcases/hal/vr/hidl/host/VrHidlTest.py
@@ -39,9 +39,6 @@
self.dut.shell.one.Execute(
"setprop vts.hal.vts.hidl.get_stub true")
- if self.enable_profiling:
- profiling_utils.EnableVTSProfiling(self.dut.shell.one)
-
self.dut.hal.InitHidlHal(
target_type="vr",
target_basepaths=["/system/lib64"],
@@ -56,9 +53,17 @@
and disable profiling after the test is done.
"""
if self.enable_profiling:
+ self.ProcessAndUploadTraceData()
+
+ def setUpTest(self):
+ if self.enable_profiling:
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ def tearDownTest(self):
+ if self.enable_profiling:
profiling_trace_path = getattr(
self, self.VTS_PROFILING_TRACING_PATH, "")
- self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ self.ProcessTraceDataForTestCase(self.dut, profiling_trace_path)
profiling_utils.DisableVTSProfiling(self.dut.shell.one)
def testVrBasic(self):
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 0d6b560..7dad8af 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -81,13 +81,17 @@
*/
TDLS_OFFCHANNEL = 1 << 11,
/**
+ * Support for neighbour discovery offload.
+ */
+ ND_OFFLOAD = 1 << 12,
+ /**
* Support for keep alive packet offload.
*/
- KEEP_ALIVE = 1 << 12,
+ KEEP_ALIVE = 1 << 13,
/**
* Support for tracking connection packets' fate.
*/
- DEBUG_PACKET_FATE = 1 << 13
+ DEBUG_PACKET_FATE = 1 << 14
};
/**
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 80cc56e..bbb9346 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -82,6 +82,8 @@
return HidlStaIfaceCaps::TDLS;
case WIFI_FEATURE_TDLS_OFFCHANNEL:
return HidlStaIfaceCaps::TDLS_OFFCHANNEL;
+ case WIFI_FEATURE_CONFIG_NDO:
+ return HidlStaIfaceCaps::ND_OFFLOAD;
case WIFI_FEATURE_MKEEP_ALIVE:
return HidlStaIfaceCaps::KEEP_ALIVE;
};
@@ -242,6 +244,7 @@
WIFI_FEATURE_PNO,
WIFI_FEATURE_TDLS,
WIFI_FEATURE_TDLS_OFFCHANNEL,
+ WIFI_FEATURE_CONFIG_NDO,
WIFI_FEATURE_MKEEP_ALIVE}) {
if (feature & legacy_feature_set) {
*hidl_caps |= convertLegacyFeatureToHidlStaIfaceCapability(feature);
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
index 35985fc..ddf05cc 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -537,4 +537,57 @@
*/
setMiracastMode(MiracastMode mode)
generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Push Button setup.
+ * The PBC operation requires that a button is also pressed at the
+ * AP/Registrar at about the same time (2 minute window).
+ *
+ * @param groupIfName Group interface name to use.
+ * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ startWpsPbc(string groupIfName, Bssid bssid)
+ generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Pin Keypad setup.
+ *
+ * @param groupIfName Group interface name to use.
+ * @param pin 8 digit pin to be used.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ startWpsPinKeypad(string groupIfName, string pin)
+ generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Pin Display setup.
+ *
+ * @param groupIfName Group interface name to use.
+ * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * @return generatedPin 8 digit pin generated.
+ */
+ startWpsPinDisplay(string groupIfName, Bssid bssid)
+ generates (SupplicantStatus status, string generatedPin);
+
+ /**
+ * Cancel any ongoing WPS operations.
+ *
+ * @param groupIfName Group interface name to use.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ cancelWps(string groupIfName) generates (SupplicantStatus status);
};
diff --git a/wifi/supplicant/1.0/ISupplicantStaIface.hal b/wifi/supplicant/1.0/ISupplicantStaIface.hal
index 2fc4d0f..0f0d41b 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIface.hal
@@ -319,4 +319,64 @@
*/
setCountryCode(int8_t[2] code)
generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS setup in registrar role to learn the current AP configuration.
+ *
+ * @param bssid BSSID of the AP.
+ * @param pin Pin of the AP.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ startWpsRegistrar(Bssid bssid, string pin)
+ generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Push Button setup.
+ * The PBC operation requires that a button is also pressed at the
+ * AP/Registrar at about the same time (2 minute window).
+ *
+ * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ startWpsPbc(Bssid bssid) generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Pin Keypad setup.
+ *
+ * @param pin 8 digit pin to be used.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ startWpsPinKeypad(string pin) generates (SupplicantStatus status);
+
+ /**
+ * Initiate WPS Pin Display setup.
+ *
+ * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ * @return generatedPin 8 digit pin generated.
+ */
+ startWpsPinDisplay(Bssid bssid)
+ generates (SupplicantStatus status, string generatedPin);
+
+ /**
+ * Cancel any ongoing WPS operations.
+ *
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|
+ */
+ cancelWps() generates (SupplicantStatus status);
};
diff --git a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 8a894a0..55ff9a8 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -139,6 +139,43 @@
};
/**
+ * WPS Configuration Error.
+ */
+ enum WpsConfigError : uint16_t {
+ NO_ERROR = 0,
+ OOB_IFACE_READ_ERROR = 1,
+ DECRYPTION_CRC_FAILURE = 2,
+ CHAN_24_NOT_SUPPORTED = 3,
+ CHAN_50_NOT_SUPPORTED = 4,
+ SIGNAL_TOO_WEAK = 5,
+ NETWORK_AUTH_FAILURE = 6,
+ NETWORK_ASSOC_FAILURE = 7,
+ NO_DHCP_RESPONSE = 8,
+ FAILED_DHCP_CONFIG = 9,
+ IP_ADDR_CONFLICT = 10,
+ NO_CONN_TO_REGISTRAR = 11,
+ MULTIPLE_PBC_DETECTED = 12,
+ ROGUE_SUSPECTED = 13,
+ DEVICE_BUSY = 14,
+ SETUP_LOCKED = 15,
+ MSG_TIMEOUT = 16,
+ REG_SESS_TIMEOUT = 17,
+ DEV_PASSWORD_AUTH_FAILURE = 18,
+ CHAN_60G_NOT_SUPPORTED = 19,
+ PUBLIC_KEY_HASH_MISMATCH = 20
+ };
+
+ /**
+ * Vendor specific Error Indication for WPS event messages.
+ */
+ enum WpsErrorIndication : uint16_t {
+ NO_ERROR = 0,
+ SECURITY_TKIP_ONLY_PROHIBITED = 1,
+ SECURITY_WEP_PROHIBITED = 2,
+ AUTH_FAILURE = 3
+ };
+
+ /**
* Used to indicate that a new network has been added.
*
* @param id Network ID allocated to the corresponding network.
@@ -242,4 +279,25 @@
* Refer to section 8.4.1.9 of IEEE 802.11 spec.
*/
oneway onAssociationRejected(Bssid bssid, uint32_t statusCode);
+
+ /**
+ * Used to indicate the success of a WPS connection attempt.
+ */
+ oneway onWpsEventSuccess();
+
+ /**
+ * Used to indicate the failure of a WPS connection attempt.
+ *
+ * @param bssid BSSID of the AP to which we initiated WPS
+ * connection.
+ * @param configError Configuration error code.
+ * @param errorInd Error indication code.
+ */
+ oneway onWpsEventFail(
+ Bssid bssid, WpsConfigError configError, WpsErrorIndication errorInd);
+
+ /**
+ * Used to indicate the overlap of a WPS PBC connection attempt.
+ */
+ oneway onWpsEventPbcOverlap();
};