Merge "Camera: cleanup external camera HAL fence FD logic"
diff --git a/audio/common/5.0/types.hal b/audio/common/5.0/types.hal
index 8f8a888..0a8d75b 100644
--- a/audio/common/5.0/types.hal
+++ b/audio/common/5.0/types.hal
@@ -416,9 +416,9 @@
OUT_2POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT |
OUT_LOW_FREQUENCY),
- OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT |
+ OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER |
OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
- OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT |
+ OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER |
OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT |
OUT_LOW_FREQUENCY),
OUT_QUAD = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
@@ -517,7 +517,23 @@
INDEX_MASK_5 = INDEX_HDR | ((1 << 5) - 1),
INDEX_MASK_6 = INDEX_HDR | ((1 << 6) - 1),
INDEX_MASK_7 = INDEX_HDR | ((1 << 7) - 1),
- INDEX_MASK_8 = INDEX_HDR | ((1 << 8) - 1)
+ INDEX_MASK_8 = INDEX_HDR | ((1 << 8) - 1),
+ INDEX_MASK_9 = INDEX_HDR | ((1 << 9) - 1),
+ INDEX_MASK_10 = INDEX_HDR | ((1 << 10) - 1),
+ INDEX_MASK_11 = INDEX_HDR | ((1 << 11) - 1),
+ INDEX_MASK_12 = INDEX_HDR | ((1 << 12) - 1),
+ INDEX_MASK_13 = INDEX_HDR | ((1 << 13) - 1),
+ INDEX_MASK_14 = INDEX_HDR | ((1 << 14) - 1),
+ INDEX_MASK_15 = INDEX_HDR | ((1 << 15) - 1),
+ INDEX_MASK_16 = INDEX_HDR | ((1 << 16) - 1),
+ INDEX_MASK_17 = INDEX_HDR | ((1 << 17) - 1),
+ INDEX_MASK_18 = INDEX_HDR | ((1 << 18) - 1),
+ INDEX_MASK_19 = INDEX_HDR | ((1 << 19) - 1),
+ INDEX_MASK_20 = INDEX_HDR | ((1 << 20) - 1),
+ INDEX_MASK_21 = INDEX_HDR | ((1 << 21) - 1),
+ INDEX_MASK_22 = INDEX_HDR | ((1 << 22) - 1),
+ INDEX_MASK_23 = INDEX_HDR | ((1 << 23) - 1),
+ INDEX_MASK_24 = INDEX_HDR | ((1 << 24) - 1),
};
/**
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 3444d34..435e19c 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -2434,7 +2434,7 @@
ERROR = 4,
};
-enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ {
+enum VehicleApPowerStateConfigFlag : int32_t {
/**
* AP can enter deep sleep state. If not set, AP will always shutdown from
* VehicleApPowerState#SHUTDOWN_PREPARE power state.
diff --git a/biometrics/face/1.0/IBiometricsFace.hal b/biometrics/face/1.0/IBiometricsFace.hal
index cd368fa..180d829 100644
--- a/biometrics/face/1.0/IBiometricsFace.hal
+++ b/biometrics/face/1.0/IBiometricsFace.hal
@@ -59,7 +59,9 @@
*
* @param userId A non-negative user identifier that must be unique and
* persistent for a given user.
- * @param storePath filesystem path to the template storage directory.
+ * @param storePath absolute filesystem path to the template storage
+ * directory. This must be the /data/vendor_de/<user>/facedata
+ * directory specified by the SeLinux policy.
*/
@callflow(next={"authenticate", "generateChallenge", "enumerate", "remove"})
setActiveUser(int32_t userId, string storePath) generates (Status status);
@@ -159,8 +161,8 @@
* @param enabled True to enable the feature, false to disable.
* @param hat A valid Hardware Authentication Token, generated as a result
* of getChallenge().
- * @param faceId the ID of the enrollment returned by enroll() for the
- * feature to update.
+ * @param faceId the ID of the enrollment returned by onEnrollResult() for
+ * the feature to update.
* @return status The status of this method call.
*/
setFeature(Feature feature, bool enabled, vec<uint8_t> hat, uint32_t faceId)
diff --git a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
index 969bc68..d7c317d 100644
--- a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
+++ b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
@@ -95,13 +95,10 @@
*
* @param deviceId A unique id associated with the HAL implementation
* service that processed this removal.
- * @param faceId The id of the face template that was removed.
+ * @param removed A list of ids that were removed.
* @param userId The active user id for the removed face template.
- * @param remaining The number of face templates remaining after this
- * removal, or 0 if there are no more.
*/
- oneway onRemoved(uint64_t deviceId, uint32_t faceId, int32_t userId,
- uint32_t remaining);
+ oneway onRemoved(uint64_t deviceId, vec<uint32_t> removed, int32_t userId);
/**
* A callback invoked to enumerate all current face templates.
diff --git a/biometrics/face/1.0/types.hal b/biometrics/face/1.0/types.hal
index 8c4a4e9..de6b99e 100644
--- a/biometrics/face/1.0/types.hal
+++ b/biometrics/face/1.0/types.hal
@@ -340,9 +340,14 @@
START = 20,
/**
+ * The sensor is dirty. The user should be informed to clean the sensor.
+ */
+ SENSOR_DIRTY = 21,
+
+ /**
* Used to enable a vendor-specific acquisition message.
*/
- VENDOR = 21
+ VENDOR = 22
};
/**
@@ -375,4 +380,4 @@
* This value is only meaningful if status is OK.
*/
bool value;
-};
\ No newline at end of file
+};
diff --git a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
index 795a1ae..40961f7 100644
--- a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
+++ b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
@@ -104,7 +104,7 @@
return Return<void>();
}
- Return<void> onRemoved(uint64_t, uint32_t, int32_t, uint32_t) override {
+ Return<void> onRemoved(uint64_t, const hidl_vec<uint32_t>&, int32_t) override {
ALOGD("Removed callback called.");
return Return<void>();
}
@@ -155,12 +155,9 @@
public:
explicit RemoveCallback(int32_t userId) : removeUserId(userId) {}
- Return<void> onRemoved(uint64_t, uint32_t, int32_t userId, uint32_t remaining) override {
+ Return<void> onRemoved(uint64_t, const hidl_vec<uint32_t>&, int32_t userId) override {
EXPECT_EQ(removeUserId, userId);
promise.set_value();
- if (remaining == 0UL) {
- promise.set_value();
- }
return Return<void>();
}
diff --git a/camera/common/1.0/default/OWNERS b/camera/common/1.0/default/OWNERS
index 369b204..f112576 100644
--- a/camera/common/1.0/default/OWNERS
+++ b/camera/common/1.0/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av/camera:/OWNERS
diff --git a/camera/device/1.0/default/OWNERS b/camera/device/1.0/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/device/1.0/default/OWNERS
+++ b/camera/device/1.0/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/device/3.2/default/OWNERS b/camera/device/3.2/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/device/3.2/default/OWNERS
+++ b/camera/device/3.2/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/device/3.3/default/OWNERS b/camera/device/3.3/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/device/3.3/default/OWNERS
+++ b/camera/device/3.3/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/device/3.4/default/OWNERS b/camera/device/3.4/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/device/3.4/default/OWNERS
+++ b/camera/device/3.4/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/device/3.5/default/OWNERS b/camera/device/3.5/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/device/3.5/default/OWNERS
+++ b/camera/device/3.5/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/metadata/3.3/types.hal b/camera/metadata/3.3/types.hal
index 1ed8ed8..ca0c9d6 100644
--- a/camera/metadata/3.3/types.hal
+++ b/camera/metadata/3.3/types.hal
@@ -22,7 +22,6 @@
package android.hardware.camera.metadata@3.3;
-/* Include definitions from all prior minor HAL metadata revisions */
import android.hardware.camera.metadata@3.2;
/**
diff --git a/camera/provider/2.4/default/OWNERS b/camera/provider/2.4/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/provider/2.4/default/OWNERS
+++ b/camera/provider/2.4/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/camera/provider/2.4/vts/OWNERS b/camera/provider/2.4/vts/OWNERS
index 003fe71..b8f6b04 100644
--- a/camera/provider/2.4/vts/OWNERS
+++ b/camera/provider/2.4/vts/OWNERS
@@ -1,10 +1,5 @@
# Camera team
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
# VTS team
yim@google.com
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 3949346..d77bb0e 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -782,6 +782,8 @@
void verifySessionReconfigurationQuery(sp<device::V3_5::ICameraDeviceSession> session3_5,
camera_metadata* oldSessionParams, camera_metadata* newSessionParams);
+ bool isDepthOnly(camera_metadata_t* staticMeta);
+
static Status getAvailableOutputStreams(camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
const AvailableStream *threshold = nullptr);
@@ -793,6 +795,10 @@
std::unordered_set<std::string> *physicalIds/*out*/);
static Status getSupportedKeys(camera_metadata_t *staticMeta,
uint32_t tagId, std::unordered_set<int32_t> *requestIDs/*out*/);
+ static void fillOutputStreams(camera_metadata_ro_entry_t* entry,
+ std::vector<AvailableStream>& outputStreams,
+ const AvailableStream *threshold = nullptr,
+ const int32_t availableConfigOutputTag = 0u);
static void constructFilteredSettings(const sp<ICameraDeviceSession>& session,
const std::unordered_set<int32_t>& availableKeys, RequestTemplate reqTemplate,
android::hardware::camera::common::V1_0::helper::CameraMetadata* defaultSettings/*out*/,
@@ -2845,14 +2851,24 @@
uint32_t streamConfigCounter = 0;
for (auto& it : outputStreams) {
V3_2::Stream stream3_2;
- bool isJpeg = static_cast<PixelFormat>(it.format) == PixelFormat::BLOB;
+ V3_2::DataspaceFlags dataspaceFlag = 0;
+ switch (static_cast<PixelFormat>(it.format)) {
+ case PixelFormat::BLOB:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF);
+ break;
+ case PixelFormat::Y16:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+ break;
+ default:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+ }
stream3_2 = {streamId,
StreamType::OUTPUT,
static_cast<uint32_t>(it.width),
static_cast<uint32_t>(it.height),
static_cast<PixelFormat>(it.format),
GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
- (isJpeg) ? static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF) : 0,
+ dataspaceFlag,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
::android::hardware::camera::device::V3_5::StreamConfiguration config3_5;
@@ -3415,6 +3431,14 @@
castSession(session, deviceVersion, &session3_3, &session3_4, &session3_5);
castDevice(cameraDevice, deviceVersion, &cameraDevice3_5);
+ // Check if camera support depth only
+ if (isDepthOnly(staticMeta)) {
+ free_camera_metadata(staticMeta);
+ ret = session->close();
+ ASSERT_TRUE(ret.isOk());
+ continue;
+ }
+
outputBlobStreams.clear();
ASSERT_EQ(Status::OK,
getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -3735,6 +3759,14 @@
castSession(session, deviceVersion, &session3_3, &session3_4, &session3_5);
castDevice(cameraDevice, deviceVersion, &cameraDevice3_5);
+ // Check if camera support depth only
+ if (isDepthOnly(staticMeta)) {
+ free_camera_metadata(staticMeta);
+ ret = session->close();
+ ASSERT_TRUE(ret.isOk());
+ continue;
+ }
+
outputBlobStreams.clear();
ASSERT_EQ(Status::OK,
getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -4723,38 +4755,56 @@
Status CameraHidlTest::getAvailableOutputStreams(camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
const AvailableStream *threshold) {
+ AvailableStream depthPreviewThreshold = {kMaxPreviewWidth, kMaxPreviewHeight,
+ static_cast<int32_t>(PixelFormat::Y16)};
if (nullptr == staticMeta) {
return Status::ILLEGAL_ARGUMENT;
}
- camera_metadata_ro_entry entry;
- int rc = find_camera_metadata_ro_entry(staticMeta,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &entry);
- if ((0 != rc) || (0 != (entry.count % 4))) {
+ camera_metadata_ro_entry scalarEntry;
+ camera_metadata_ro_entry depthEntry;
+ int foundScalar = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &scalarEntry);
+ int foundDepth = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+ if ((0 != foundScalar || (0 != (scalarEntry.count % 4))) &&
+ (0 != foundDepth || (0 != (depthEntry.count % 4)))) {
return Status::ILLEGAL_ARGUMENT;
}
- for (size_t i = 0; i < entry.count; i+=4) {
- if (ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT ==
- entry.data.i32[i + 3]) {
+ if(foundScalar == 0 && (0 == (scalarEntry.count % 4))) {
+ fillOutputStreams(&scalarEntry, outputStreams, threshold,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+ }
+
+ if(foundDepth == 0 && (0 == (depthEntry.count % 4))) {
+ fillOutputStreams(&depthEntry, outputStreams, &depthPreviewThreshold,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT);
+ }
+
+ return Status::OK;
+}
+
+void CameraHidlTest::fillOutputStreams(camera_metadata_ro_entry_t* entry,
+ std::vector<AvailableStream>& outputStreams, const AvailableStream* threshold,
+ const int32_t availableConfigOutputTag) {
+ for (size_t i = 0; i < entry->count; i+=4) {
+ if (availableConfigOutputTag == entry->data.i32[i + 3]) {
if(nullptr == threshold) {
- AvailableStream s = {entry.data.i32[i+1],
- entry.data.i32[i+2], entry.data.i32[i]};
+ AvailableStream s = {entry->data.i32[i+1],
+ entry->data.i32[i+2], entry->data.i32[i]};
outputStreams.push_back(s);
} else {
- if ((threshold->format == entry.data.i32[i]) &&
- (threshold->width >= entry.data.i32[i+1]) &&
- (threshold->height >= entry.data.i32[i+2])) {
- AvailableStream s = {entry.data.i32[i+1],
- entry.data.i32[i+2], threshold->format};
+ if ((threshold->format == entry->data.i32[i]) &&
+ (threshold->width >= entry->data.i32[i+1]) &&
+ (threshold->height >= entry->data.i32[i+2])) {
+ AvailableStream s = {entry->data.i32[i+1],
+ entry->data.i32[i+2], threshold->format};
outputStreams.push_back(s);
}
}
}
-
}
-
- return Status::OK;
}
// Get max jpeg buffer size in android.jpeg.maxSize
@@ -5226,6 +5276,37 @@
ASSERT_TRUE(ret.isOk());
}
+bool CameraHidlTest::isDepthOnly(camera_metadata_t* staticMeta) {
+ camera_metadata_ro_entry scalarEntry;
+ camera_metadata_ro_entry depthEntry;
+
+ int rc = find_camera_metadata_ro_entry(
+ staticMeta, ANDROID_REQUEST_AVAILABLE_CAPABILITIES, &scalarEntry);
+ if (rc == 0) {
+ for (uint32_t i = 0; i < scalarEntry.count; i++) {
+ if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE) {
+ return false;
+ }
+ }
+ }
+
+ for (uint32_t i = 0; i < scalarEntry.count; i++) {
+ if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT) {
+
+ rc = find_camera_metadata_ro_entry(
+ staticMeta, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+ size_t i = 0;
+ if (rc == 0 && depthEntry.data.i32[i] == static_cast<int32_t>(PixelFormat::Y16)) {
+ // only Depth16 format is supported now
+ return true;
+ }
+ break;
+ }
+ }
+
+ return false;
+}
+
// Open a device session and configure a preview stream.
void CameraHidlTest::configurePreviewStream(const std::string &name, int32_t deviceVersion,
sp<ICameraProvider> provider,
@@ -5316,11 +5397,20 @@
ASSERT_EQ(Status::OK, rc);
ASSERT_FALSE(outputPreviewStreams.empty());
+ V3_2::DataspaceFlags dataspaceFlag = 0;
+ switch (static_cast<PixelFormat>(outputPreviewStreams[0].format)) {
+ case PixelFormat::Y16:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+ break;
+ default:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+ }
+
V3_2::Stream stream3_2 = {0, StreamType::OUTPUT,
static_cast<uint32_t> (outputPreviewStreams[0].width),
static_cast<uint32_t> (outputPreviewStreams[0].height),
static_cast<PixelFormat> (outputPreviewStreams[0].format),
- GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, dataspaceFlag, StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
diff --git a/camera/provider/2.5/default/OWNERS b/camera/provider/2.5/default/OWNERS
index 369b204..f48a95c 100644
--- a/camera/provider/2.5/default/OWNERS
+++ b/camera/provider/2.5/default/OWNERS
@@ -1,7 +1 @@
-cychen@google.com
-epeev@google.com
-etalvala@google.com
-jchowdhary@google.com
-shuzhenwang@google.com
-yinchiayeh@google.com
-zhijunhe@google.com
+include platform/frameworks/av:/camera/OWNERS
diff --git a/current.txt b/current.txt
index 4ad47e1..62f04d0 100644
--- a/current.txt
+++ b/current.txt
@@ -390,15 +390,16 @@
684702a60deef03a1e8093961dc0a18c555c857ad5a77ba7340b0635ae01eb70 android.hardware.camera.device@3.4::ICameraDeviceSession
f8a19622cb0cc890913b1ef3e32b675ffb26089a09e02fef4056ebad324d2b5d android.hardware.camera.device@3.4::types
291638a1b6d4e63283e9e722ab5049d9351717ffa2b66162124f84d1aa7c2835 android.hardware.camera.metadata@3.2::types
-a31142da4cc87ad50e4e981d12291d4decbb432fcb00f175f0ca904d0fcdbe5b android.hardware.camera.metadata@3.3::types
+23780340c686ee86986aa5a9755c2d8566224fed177bbb22a5ebf06be574b60c android.hardware.camera.metadata@3.3::types
da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardware.configstore@1.0::ISurfaceFlingerConfigs
21165b8e30c4b2d52980e4728f661420adc16e38bbe73476c06b2085be908f4c android.hardware.gnss@1.0::IGnssCallback
d702fb01dc2a0733aa820b7eb65435ee3334f75632ef880bafd2fb8803a20a58 android.hardware.gnss@1.0::IGnssMeasurementCallback
+7c7721c0f773fcf422b71a4f558545e9e36acc973e58ca51e5bd53905cf46bc0 android.hardware.graphics.bufferqueue@1.0::IGraphicBufferProducer
d4fea995378bb4f421b4e24ccf68cad2734ab07fe4f874a126ba558b99df5766 android.hardware.graphics.composer@2.1::IComposerClient
b7ecf29927055ec422ec44bf776223f07d79ad9f92ccf9becf167e62c2607e7a android.hardware.keymaster@4.0::IKeymasterDevice
574e8f1499436fb4075894dcae0b36682427956ecb114f17f1fe22d116a83c6b android.hardware.neuralnetworks@1.0::IPreparedModel
417ab60fe1ef786778047e4486f3d868ebce570d91addd8fe4251515213072de android.hardware.neuralnetworks@1.0::types
-e22e8135d061d0e9c4c1a70c25c19fdba10f4d3cda9795ef25b6392fc520317c android.hardware.neuralnetworks@1.1::types
+ec8aa14fe9b03f2b3fb9845346a4005b6d098ebe2277b2564f73a548a0fd14a7 android.hardware.neuralnetworks@1.1::types
1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse
ed9da80ec0c96991fd03f0a46107815d0e50f764656e49dba4980fa5c31d5bc3 android.hardware.radio@1.0::types
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
@@ -419,7 +420,7 @@
9471b12b1c255bb530695720bc4174bd74987b75b1f820854af8944bc8c215c9 android.hardware.audio@5.0::IStreamOut
1b0500367ed2b32a841667ac3200edf3d3a164e8004aca445ff1b085ac831e93 android.hardware.audio@5.0::IStreamOutCallback
83e365479cc77d8717c155e1787ee668cd2ae4c557b467cf75b8e7cd53697ad8 android.hardware.audio@5.0::types
-894af04bebfe7da5b6791eefeb6eb3627da63d5efea735f16876d11d8ca4f61d android.hardware.audio.common@5.0::types
+c25ae57a9197fdf83aa6f7b31ab1ac4922dea4f19f92cdb1f9013ad49fa56594 android.hardware.audio.common@5.0::types
f269297866765b95ddd1825676cc8a772f0c7c9863286df596fc302781a42ff5 android.hardware.audio.effect@5.0::IAcousticEchoCancelerEffect
fa187b602d8939644ef708ed7627f2e3deac97899a4bda1de07f2ff126abe243 android.hardware.audio.effect@5.0::IAutomaticGainControlEffect
e1bf864ccb8458c0da1dcc74a2e748b1dca8ac360df590591cf82d98292d7981 android.hardware.audio.effect@5.0::IBassBoostEffect
@@ -435,9 +436,9 @@
443659bb9e27221e5da0d16c7a0ecb2dc3a9a03acc8a0b2196b47c50735e2d2e android.hardware.audio.effect@5.0::IVirtualizerEffect
78fed26a781cdca1b3bcb37520bff705d7764ee81db9cfd37014953c7ad2596e android.hardware.audio.effect@5.0::IVisualizerEffect
6385b6accab8a544e2ee54ba7bf5aa55dff6153bcedd80fdaae16fe9e0be7050 android.hardware.audio.effect@5.0::types
-baf5a0cbf357035394be02d87334890228338fae715f7ab06e2f0e7d05abe656 android.hardware.biometrics.face@1.0::IBiometricsFace
-6cbf288d6e6a9f6f0c09d1cde66318aa5b6a8c525778a61ccaedddb090f5e9cb android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
-ef5d339413d0c94a5b58baafbe3e4bccfd9ed2e7328fbbb5c25471c79923ed2f android.hardware.biometrics.face@1.0::types
+e18ff318f3fc43db37f554696dc4e551abb9b119bde53950f73e28ce33a97a40 android.hardware.biometrics.face@1.0::IBiometricsFace
+b6e55d7795bbafd011fb95a3b6d3954bf66c349e14cf107f3b72032ce3ceb448 android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
+95aa2f59e29e2f84d8e84320ace9b6682b426a16e897b4bd241375cbee0e07f3 android.hardware.biometrics.face@1.0::types
ecedc58dbcdb13503c19c0ab160ac1dd0530bb1471164149282dd1463c684185 android.hardware.bluetooth.audio@2.0::IBluetoothAudioPort
fb9c40e4deab40be5476477078fe3d8a4a4495fd9deef4321878d169d675c633 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvider
f7431f3e3e4e3387fc6f27a6cf423eddcd824a395dc4349d302c995ab44a9895 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory
@@ -467,7 +468,7 @@
d815623a6d1ba4abf21248b84eca70a2bfab03058a88b68a29c063ce8aee6b5c android.hardware.gnss@2.0::IGnssCallback
ecc966c68bddbd95c8dae782b84204cf01c75734675e8769963f3b5106ec128b android.hardware.gnss@2.0::IGnssConfiguration
c67759f5d6387d273b66729180d03690e827f0b6b8d4e13ce2ff42d31b224065 android.hardware.gnss@2.0::IGnssMeasurement
-089338944c45f66f25ba4ee958c161c42fefeb73ec60e4451f3535a1b3fd10c7 android.hardware.gnss@2.0::IGnssMeasurementCallback
+3dd30a3ca77ef5ab109a55ba603ff816ae5019436886093dccf8fd6a068f85f1 android.hardware.gnss@2.0::IGnssMeasurementCallback
9e66234e65bcde75733d75d8b5d5cc094c2a5e14b074a25cd3f9ad141dc56f60 android.hardware.gnss@2.0::types
50623a69a88b1c8a05738e4af7d5f78e905f415ccb0e84c99d0a71ea182e9393 android.hardware.gnss.measurement_corrections@1.0::IMeasurementCorrections
6ef12cd95df73f8f80c25eb035d98ca4594f9cee571fdabea838a0b6016dd908 android.hardware.gnss.measurement_corrections@1.0::types
@@ -479,7 +480,7 @@
01c6398c90fc6be0640810e2c5d8a4863b457280132bb3f97dd5682e19632b62 android.hardware.graphics.bufferqueue@2.0::types
7a2d64095252f85781b2d521f4f11d04ce774544feececcec2088c568656e93c android.hardware.graphics.common@1.2::types
3dff04a36b86660b5807414587e530bb0c294ed56fdff06f8915ba0a9b73f974 android.hardware.graphics.composer@2.3::IComposer
-daa44e83d7709bf1c9e0bd9a6b552feff496fd14574a9461ee93c21980fc5b15 android.hardware.graphics.composer@2.3::IComposerClient
+54bc1dc874f8bc0781767786075dafd33a0796c1eea7d2317231b8929280e946 android.hardware.graphics.composer@2.3::IComposerClient
5c8bf8e1af9efe225a4661db8c08ff1b7e13fdc8ed49f35291bd0b6c9436b8f2 android.hardware.graphics.mapper@3.0::IMapper
7183d9d9acfa41a61a64bdfed548e98299265a7bb1821a3ed204173b5c2cfd4a android.hardware.graphics.mapper@3.0::types
c3f831a66d5815baf74f5b82fe79cf099542ddae4dfab3f388e1d41828e794fc android.hardware.health.storage@1.0::IGarbageCollectCallback
@@ -507,7 +508,7 @@
92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
83885d366f22ada42c00d8854f0b7e7ba4cf73ddf80bb0d8e168ce132cec57ea android.hardware.neuralnetworks@1.2::IPreparedModel
e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-896d1827541d620996720a79c6476edb902a58d515bf908f67a5bdef4d2c318c android.hardware.neuralnetworks@1.2::types
+114056b3b9303e0e858f28e718ba45722de5678d1d54eec0dcd10788604bf2bb 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/vts/functional/drm_hal_test.cpp b/drm/1.2/vts/functional/drm_hal_test.cpp
index 067b5e4..252ebb9 100644
--- a/drm/1.2/vts/functional/drm_hal_test.cpp
+++ b/drm/1.2/vts/functional/drm_hal_test.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define LOG_TAG "drm_hal_clearkey_test@1.2"
+#define LOG_TAG "drm_hal_test@1.2"
#include <gtest/gtest.h>
#include <hidl/HidlSupport.h>
@@ -41,8 +41,8 @@
static const char* const kVideoMp4 = "video/mp4";
static const char* const kBadMime = "video/unknown";
static const char* const kDrmErrorTestKey = "drmErrorTest";
-static const char* const kDrmErrorGeneric = "";
-static const char* const kResourceContentionValue = "resourceContention";
+static const char* const kDrmErrorInvalidState = "invalidState";
+static const char* const kDrmErrorResourceContention = "resourceContention";
static const SecurityLevel kSwSecureCrypto = SecurityLevel::SW_SECURE_CRYPTO;
/**
@@ -180,19 +180,36 @@
}
/**
- * Test clearkey plugin offline key support
+ * Test drm plugin offline key support
*/
TEST_P(DrmHalTest, OfflineLicenseTest) {
auto sessionId = openSession();
hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
- auto res = drmPlugin->getOfflineLicenseKeySetIds(checkKeySetIds<Status::OK, 1u>);
+ auto res = drmPlugin->getOfflineLicenseKeySetIds(
+ [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+ bool found = false;
+ EXPECT_EQ(Status::OK, status);
+ for (KeySetId keySetId2: keySetIds) {
+ if (keySetId == keySetId2) {
+ found = true;
+ break;
+ }
+ }
+ EXPECT_TRUE(found) << "keySetId not found";
+ });
EXPECT_OK(res);
Status err = drmPlugin->removeOfflineLicense(keySetId);
EXPECT_EQ(Status::OK, err);
- res = drmPlugin->getOfflineLicenseKeySetIds(checkKeySetIds<Status::OK, 0u>);
+ res = drmPlugin->getOfflineLicenseKeySetIds(
+ [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+ EXPECT_EQ(Status::OK, status);
+ for (KeySetId keySetId2: keySetIds) {
+ EXPECT_NE(keySetId, keySetId2);
+ }
+ });
EXPECT_OK(res);
err = drmPlugin->removeOfflineLicense(keySetId);
@@ -202,7 +219,7 @@
}
/**
- * Test clearkey plugin offline key state
+ * Test drm plugin offline key state
*/
TEST_P(DrmHalTest, OfflineLicenseStateTest) {
auto sessionId = openSession();
@@ -380,7 +397,7 @@
* Test resource contention during attempt to generate key request
*/
TEST_P(DrmHalClearkeyTest, GetKeyRequestResourceContention) {
- Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kResourceContentionValue);
+ Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorResourceContention);
EXPECT_EQ(Status::OK, status);
auto sessionId = openSession();
hidl_vec<uint8_t> initData;
@@ -403,7 +420,7 @@
TEST_P(DrmHalClearkeyTest, OfflineLicenseInvalidState) {
auto sessionId = openSession();
hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
- Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorGeneric);
+ Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorInvalidState);
EXPECT_EQ(Status::OK, status);
// everything should start failing
@@ -426,7 +443,7 @@
auto res = drmPlugin->setListener(listener);
EXPECT_OK(res);
- Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorGeneric);
+ Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorInvalidState);
EXPECT_EQ(Status::OK, status);
auto sessionId = openSession();
diff --git a/gnss/2.0/IGnssMeasurementCallback.hal b/gnss/2.0/IGnssMeasurementCallback.hal
index d5dc038..d9751d3 100644
--- a/gnss/2.0/IGnssMeasurementCallback.hal
+++ b/gnss/2.0/IGnssMeasurementCallback.hal
@@ -22,77 +22,6 @@
/** The callback interface to report measurements from the HAL. */
interface IGnssMeasurementCallback extends @1.1::IGnssMeasurementCallback {
- /**
- * Enumeration of available values for the GNSS Measurement's code type. Similar to the
- * Attribute field described in RINEX 3.03, e.g., in Tables 4-10, and Table A2 at the RINEX 3.03
- * Update 1 Document.
- */
- enum GnssMeasurementCodeType : uint8_t {
- /** GALILEO E1A, GALILEO E6A, IRNSS L5A, IRNSS SA. */
- A = 0,
-
- /** GALILEO E1B, GALILEO E6B, IRNSS L5B, IRNSS SB. */
- B = 1,
-
- /**
- * GPS L1 C/A, GPS L2 C/A, GLONASS G1 C/A, GLONASS G2 C/A, GALILEO E1C, GALILEO E6C, SBAS
- * L1 C/A, QZSS L1 C/A, IRNSS L5C.
- */
- C = 2,
-
- /**
- * GPS L5 I, GLONASS G3 I, GALILEO E5a I, GALILEO E5b I, GALILEO E5a+b I, SBAS L5 I, QZSS L5
- * I, BDS B1 I, BDS B2 I, BDS B3 I.
- */
- I = 3,
-
- /** GPS L1C (P), GPS L2C (L), QZSS L1C (P), QZSS L2C (L), LEX(6) L. */
- L = 4,
-
- /** GPS L1M, GPS L2M. */
- M = 5,
-
- /** GPS L1P, GPS L2P, GLONASS G1P, GLONASS G2P. */
- P = 6,
-
- /**
- * GPS L5 Q, GLONASS G3 Q, GALILEO E5a Q, GALILEO E5b Q, GALILEO E5a+b Q, SBAS L5 Q, QZSS L5
- * Q, BDS B1 Q, BDS B2 Q, BDS B3 Q.
- */
- Q = 7,
-
- /** GPS L1C (D), GPS L2C (M), QZSS L1C (D), QZSS L2C (M), LEX(6) S. */
- S = 8,
-
- /** GPS L1 Z-tracking, GPS L2 Z-tracking. */
- W = 9,
-
- /**
- * GPS L1C (D+P), GPS L2C (M+L), GPS L5 (I+Q), GLONASS G3 (I+Q), GALILEO E1 (B+C), GALILEO
- * E5a (I+Q), GALILEO E5b (I+Q), GALILEO E5a+b(I+Q), GALILEO E6 (B+C), SBAS L5 (I+Q), QZSS
- * L1C (D+P), QZSS L2C (M+L), QZSS L5 (I+Q), LEX(6) (S+L), BDS B1 (I+Q), BDS B2 (I+Q), BDS
- * B3 (I+Q), IRNSS L5 (B+C).
- */
- X = 10,
-
- /** GPS L1Y, GPS L2Y. */
- Y = 11,
-
- /** GALILEO E1 (A+B+C), GALILEO E6 (A+B+C), QZSS L1-SAIF. */
- Z = 12,
-
- /** GPS L1 codeless, GPS L2 codeless. */
- N = 13,
-
- /**
- * Other code type that does not belong to any of the above code types.
- *
- * This code type is used in the case that the above code types do not cover all the code
- * types introduced in a new version of RINEX standard. When this code type is set, the
- * field GnssMeasurement.otherCodeTypeName must specify the new code type.
- */
- OTHER = 255
- };
/**
* Flags indicating the GNSS measurement state.
@@ -458,12 +387,43 @@
* The type of code that is currently being tracked in the GNSS measurement.
*
* For high precision applications the type of code being tracked needs to be considered
- * in-order to properly apply code specific corrections to the psuedorange measurements.
- */
- GnssMeasurementCodeType codeType;
-
- /**
- * The name of the code type when codeType is OTHER.
+ * in-order to properly apply code specific corrections to the pseudorange measurements.
+ *
+ * Value "A" represents GALILEO E1A, GALILEO E6A, IRNSS L5A, IRNSS SA.
+ *
+ * Value "B" represents GALILEO E1B, GALILEO E6B, IRNSS L5B, IRNSS SB.
+ *
+ * Value "C" represents GPS L1 C/A, GPS L2 C/A, GLONASS G1 C/A, GLONASS G2 C/A, GALILEO E1C,
+ * GALILEO E6C, SBAS L1 C/A, QZSS L1 C/A, IRNSS L5C.
+ *
+ * Value "I" represents GPS L5 I, GLONASS G3 I, GALILEO E5a I, GALILEO E5b I, GALILEO E5a+b I,
+ * SBAS L5 I, QZSS L5 I, BDS B1 I, BDS B2 I, BDS B3 I.
+ *
+ * Value "L" represents GPS L1C (P), GPS L2C (L), QZSS L1C (P), QZSS L2C (L), LEX(6) L.
+ *
+ * Value "M" represents GPS L1M, GPS L2M.
+ *
+ * Value "N" represents GPS L1 codeless, GPS L2 codeless.
+ *
+ * Value "P" represents GPS L1P, GPS L2P, GLONASS G1P, GLONASS G2P.
+ *
+ * Value "Q" represents GPS L5 Q, GLONASS G3 Q, GALILEO E5a Q, GALILEO E5b Q, GALILEO E5a+b Q,
+ * SBAS L5 Q, QZSS L5 Q, BDS B1 Q, BDS B2 Q, BDS B3 Q.
+ *
+ * Value "S" represents GPS L1C (D), GPS L2C (M), QZSS L1C (D), QZSS L2C (M), LEX(6) S.
+ *
+ * Value "W" represents GPS L1 Z-tracking, GPS L2 Z-tracking.
+ *
+ * Value "X" represents GPS L1C (D+P), GPS L2C (M+L), GPS L5 (I+Q), GLONASS G3 (I+Q),
+ * GALILEO E1 (B+C), GALILEO E5a (I+Q), GALILEO E5b (I+Q), GALILEO E5a+b(I+Q),
+ * GALILEO E6 (B+C), SBAS L5 (I+Q), QZSS L1C (D+P), QZSS L2C (M+L), QZSS L5 (I+Q),
+ * LEX(6) (S+L), BDS B1 (I+Q), BDS B2 (I+Q), BDS B3 (I+Q), IRNSS L5 (B+C).
+ *
+ * Value "Y" represents GPS L1Y, GPS L2Y.
+ *
+ * Value "Z" represents GALILEO E1 (A+B+C), GALILEO E6 (A+B+C), QZSS L1-SAIF.
+ *
+ * Value "UNKNOWN" represents the GNSS Measurement's code type is unknown.
*
* This is used to specify the observation descriptor defined in GNSS Observation Data File
* Header Section Description in the RINEX standard (Version 3.XX). In RINEX Version 3.03,
@@ -471,7 +431,7 @@
* "A channel"). In the future, if for instance a code "G" was added in the official RINEX
* standard, "G" could be specified here.
*/
- string otherCodeTypeName;
+ string codeType;
/**
* Per satellite sync state. It represents the current sync state for the associated
diff --git a/gnss/2.0/default/GnssMeasurement.cpp b/gnss/2.0/default/GnssMeasurement.cpp
index 702c9e2..a62c2dd 100644
--- a/gnss/2.0/default/GnssMeasurement.cpp
+++ b/gnss/2.0/default/GnssMeasurement.cpp
@@ -114,8 +114,7 @@
V1_1::IGnssMeasurementCallback::GnssMeasurement measurement_1_1 = {.v1_0 = measurement_1_0};
V2_0::IGnssMeasurementCallback::GnssMeasurement measurement_2_0 = {
.v1_1 = measurement_1_1,
- .codeType = IGnssMeasurementCallback::GnssMeasurementCodeType::C,
- .otherCodeTypeName = "",
+ .codeType = "C",
.state = GnssMeasurementState::STATE_CODE_LOCK | GnssMeasurementState::STATE_BIT_SYNC |
GnssMeasurementState::STATE_SUBFRAME_SYNC |
GnssMeasurementState::STATE_TOW_DECODED |
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 3703eba..67fda89 100644
--- a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
+++ b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
@@ -190,17 +190,7 @@
EXPECT_EQ(measurement_called_count_, 1);
ASSERT_TRUE(last_measurement_.measurements.size() > 0);
for (auto measurement : last_measurement_.measurements) {
- ASSERT_TRUE(
- ((int)measurement.codeType >=
- (int)IGnssMeasurementCallback_2_0::GnssMeasurementCodeType::A &&
- (int)measurement.codeType <=
- (int)IGnssMeasurementCallback_2_0::GnssMeasurementCodeType::N) ||
- (int)measurement.codeType ==
- (int)IGnssMeasurementCallback_2_0::GnssMeasurementCodeType::OTHER);
- if ((int)measurement.codeType ==
- (int)IGnssMeasurementCallback_2_0::GnssMeasurementCodeType::OTHER) {
- ASSERT_NE(measurement.otherCodeTypeName, "");
- }
+ ASSERT_NE(measurement.codeType, "");
}
iGnssMeasurement->close();
diff --git a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
index c59a16c..21cbc2e 100644
--- a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
+++ b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
@@ -546,7 +546,7 @@
*/
disconnect(
int32_t api,
- DisconnectMode mode /* = DisconnectMode::API */
+ DisconnectMode mode
) generates (
Status status
);
diff --git a/graphics/composer/2.3/IComposerClient.hal b/graphics/composer/2.3/IComposerClient.hal
index 5fcc0e6..1eea306 100644
--- a/graphics/composer/2.3/IComposerClient.hal
+++ b/graphics/composer/2.3/IComposerClient.hal
@@ -61,6 +61,11 @@
* PowerMode::DOZE_SUSPEND.
*/
DOZE = 2,
+
+ /**
+ * Indicates that the display supports brightness operations.
+ */
+ BRIGHTNESS = 3,
};
/**
@@ -495,4 +500,38 @@
float maxLuminance,
float maxAverageLuminance,
float minLuminance);
+
+ /**
+ * Gets whether brightness operations are supported on a display.
+ *
+ * @param display
+ * The display.
+ *
+ * @return error is NONE upon success. Otherwise,
+ * BAD_DISPLAY when the display is invalid, or
+ * BAD_PARAMETER when the output parameter is invalid.
+ * @return support
+ * Whether brightness operations are supported on the display.
+ */
+ getDisplayBrightnessSupport(Display display) generates (Error error, bool support);
+
+ /**
+ * Sets the brightness of a display.
+ *
+ * Ideally, the brightness change should take effect in the next frame post (so that it can be
+ * aligned with color transforms).
+ *
+ * @param display
+ * The display whose brightness is set.
+ * @param brightness
+ * A number between 0.0f (minimum brightness) and 1.0f (maximum brightness), or -1.0 to
+ * turn the backlight off.
+ *
+ * @return error is NONE upon success. Otherwise,
+ * BAD_DISPLAY when the display is invalid, or
+ * UNSUPPORTED when brightness operations are not supported, or
+ * BAD_PARAMETER when the brightness is invalid, or
+ * NO_RESOURCES when the brightness cannot be applied.
+ */
+ setDisplayBrightness(Display display, float brightness) generates (Error error);
};
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
index a272e72..1b40795 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
@@ -172,7 +172,19 @@
return Void();
}
- protected:
+ Return<void> getDisplayBrightnessSupport(
+ Display display, IComposerClient::getDisplayBrightnessSupport_cb hidl_cb) override {
+ bool support = false;
+ Error error = mHal->getDisplayBrightnessSupport(display, &support);
+ hidl_cb(error, support);
+ return Void();
+ }
+
+ Return<Error> setDisplayBrightness(Display display, float brightness) override {
+ return mHal->setDisplayBrightness(display, brightness);
+ }
+
+ protected:
std::unique_ptr<V2_1::hal::ComposerCommandEngine> createCommandEngine() override {
return std::make_unique<ComposerCommandEngine>(
mHal, static_cast<V2_2::hal::ComposerResources*>(mResources.get()));
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
index a0812ad..186b004 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
@@ -119,6 +119,8 @@
virtual Error setLayerPerFrameMetadataBlobs(
Display display, Layer layer,
std::vector<IComposerClient::PerFrameMetadataBlob>& blobs) = 0;
+ virtual Error getDisplayBrightnessSupport(Display display, bool* outSupport) = 0;
+ virtual Error setDisplayBrightness(Display display, float brightness) = 0;
};
} // namespace hal
diff --git a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
index 41e333a..070cf80 100644
--- a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
+++ b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
@@ -245,7 +245,29 @@
return static_cast<Error>(err);
}
- protected:
+ Error getDisplayBrightnessSupport(Display display, bool* outSupport) {
+ if (!mDispatch.getDisplayBrightnessSupport) {
+ return Error::UNSUPPORTED;
+ }
+ bool support = false;
+ int32_t error = mDispatch.getDisplayBrightnessSupport(mDevice, display, &support);
+ *outSupport = support;
+ return static_cast<Error>(error);
+ }
+
+ Error setDisplayBrightness(Display display, float brightness) {
+ if (std::isnan(brightness) || brightness > 1.0f ||
+ (brightness < 0.0f && brightness != -1.0f)) {
+ return Error::BAD_PARAMETER;
+ }
+ if (!mDispatch.setDisplayBrightness) {
+ return Error::UNSUPPORTED;
+ }
+ int32_t error = mDispatch.setDisplayBrightness(mDevice, display, brightness);
+ return static_cast<Error>(error);
+ }
+
+ protected:
bool initDispatch() override {
if (!BaseType2_2::initDispatch()) {
return false;
@@ -265,6 +287,10 @@
&mDispatch.getDisplayCapabilities);
this->initOptionalDispatch(HWC2_FUNCTION_SET_LAYER_PER_FRAME_METADATA_BLOBS,
&mDispatch.setLayerPerFrameMetadataBlobs);
+ this->initOptionalDispatch(HWC2_FUNCTION_GET_DISPLAY_BRIGHTNESS_SUPPORT,
+ &mDispatch.getDisplayBrightnessSupport);
+ this->initOptionalDispatch(HWC2_FUNCTION_SET_DISPLAY_BRIGHTNESS,
+ &mDispatch.setDisplayBrightness);
return true;
}
@@ -277,6 +303,8 @@
HWC2_PFN_GET_DISPLAYED_CONTENT_SAMPLE getDisplayedContentSample;
HWC2_PFN_GET_DISPLAY_CAPABILITIES getDisplayCapabilities;
HWC2_PFN_SET_LAYER_PER_FRAME_METADATA_BLOBS setLayerPerFrameMetadataBlobs;
+ HWC2_PFN_GET_DISPLAY_BRIGHTNESS_SUPPORT getDisplayBrightnessSupport;
+ HWC2_PFN_SET_DISPLAY_BRIGHTNESS setDisplayBrightness;
} mDispatch = {};
using BaseType2_2 = V2_2::passthrough::detail::HwcHalImpl<Hal>;
diff --git a/graphics/composer/2.3/utils/vts/ComposerVts.cpp b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
index 0e541ed..4de85d6 100644
--- a/graphics/composer/2.3/utils/vts/ComposerVts.cpp
+++ b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
@@ -186,6 +186,19 @@
return capabilities;
}
+bool ComposerClient::getDisplayBrightnessSupport(Display display) {
+ bool support = false;
+ mClient->getDisplayBrightnessSupport(display, [&](const auto& error, const auto& tmpSupport) {
+ ASSERT_EQ(Error::NONE, error) << "failed to get brightness support";
+ support = tmpSupport;
+ });
+ return support;
+}
+
+Error ComposerClient::setDisplayBrightness(Display display, float brightness) {
+ return mClient->setDisplayBrightness(display, brightness);
+}
+
} // namespace vts
} // namespace V2_3
} // namespace composer
diff --git a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
index ad4ef0b..a0e764d 100644
--- a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
+++ b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
@@ -52,7 +52,7 @@
std::unique_ptr<ComposerClient> createClient();
- protected:
+ protected:
explicit Composer(const sp<IComposer>& composer);
private:
@@ -99,7 +99,11 @@
std::vector<IComposerClient::PerFrameMetadataKey> getPerFrameMetadataKeys_2_3(Display display);
- private:
+ bool getDisplayBrightnessSupport(Display display);
+
+ Error setDisplayBrightness(Display display, float brightness);
+
+ private:
const sp<IComposerClient> mClient;
};
diff --git a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
index de74e28..b983e42 100644
--- a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
+++ b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
@@ -600,6 +600,36 @@
}
}
+/*
+ * Test that getDisplayBrightnessSupport works as expected.
+ */
+TEST_F(GraphicsComposerHidlTest, getDisplayBrightnessSupport) {
+ auto capabilities = mComposerClient->getDisplayCapabilities(mPrimaryDisplay);
+ bool brightnessSupport =
+ std::find(capabilities.begin(), capabilities.end(),
+ IComposerClient::DisplayCapability::BRIGHTNESS) != capabilities.end();
+ EXPECT_EQ(mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay), brightnessSupport);
+}
+
+/*
+ * Test that if brightness operations are supported, setDisplayBrightness works as expected.
+ */
+TEST_F(GraphicsComposerHidlTest, setDisplayBrightness) {
+ if (!mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay)) {
+ EXPECT_EQ(mComposerClient->getRaw()->setDisplayBrightness(mPrimaryDisplay, 0.5f),
+ Error::UNSUPPORTED);
+ GTEST_SUCCEED() << "Brightness operations are not supported";
+ }
+
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.0f), Error::NONE);
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.5f), Error::NONE);
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 1.0f), Error::NONE);
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, -1.0f), Error::NONE);
+
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, +2.0f), Error::BAD_PARAMETER);
+ EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, -2.0f), Error::BAD_PARAMETER);
+}
+
} // namespace
} // namespace vts
} // namespace V2_3
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
index 7eea7fc..f5cb0d7 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
@@ -77,6 +77,13 @@
"Number of types in MixedTyped changed, but copy_back function wasn't updated");
}
+static bool isZeroSized(const MixedTyped& example, uint32_t index) {
+ for (auto i : example.operandDimensions.at(index)) {
+ if (i == 0) return true;
+ }
+ return false;
+}
+
// Top level driver for models and examples generated by test_generator.py
// Test driver for those generated from ml/nn/runtime/test/spec
static Return<ErrorStatus> ExecutePreparedModel(sp<V1_0::IPreparedModel>& preparedModel,
@@ -178,17 +185,18 @@
// Go through all outputs, initialize RequestArgument descriptors
resize_accordingly(golden, test);
bool sizeLargerThanOne = true;
- for_all(golden, [&outputs_info, &outputSize, &outputType, &sizeLargerThanOne](
+ for_all(golden, [&golden, &outputs_info, &outputSize, &outputType, &sizeLargerThanOne](
int index, auto, auto s) {
if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
if (index == 0) {
// On OutputType::INSUFFICIENT, set the output operand with index 0 with
// buffer size one byte less than needed.
if (outputType == OutputType::INSUFFICIENT) {
- if (s > 1)
+ if (s > 1 && !isZeroSized(golden, index)) {
s -= 1;
- else
+ } else {
sizeLargerThanOne = false;
+ }
}
}
RequestArgument arg = {
diff --git a/neuralnetworks/1.1/types.hal b/neuralnetworks/1.1/types.hal
index c9de76b..99f873a 100644
--- a/neuralnetworks/1.1/types.hal
+++ b/neuralnetworks/1.1/types.hal
@@ -186,7 +186,8 @@
* must be >= 1.
* * 2: A 2-D Tensor of {@link OperandType::TENSOR_INT32}, the paddings
* for each spatial dimension of the input tensor. All values must be
- * >= 0. The shape of the tensor must be {rank(input0), 2}.
+ * >= 0. The shape of the tensor must be {M, 2}, where M is the number
+ * of spatial dimensions.
* padding[i, 0] specifies the number of element to be padded in the
* front of dimension i.
* padding[i, 1] specifies the number of element to be padded after the
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index bb14dec..f2e02b8 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -1979,7 +1979,8 @@
* must be >= 1.
* * 2: A 2-D Tensor of {@link OperandType::TENSOR_INT32}, the paddings
* for each spatial dimension of the input tensor. All values must be
- * >= 0. The shape of the tensor must be {rank(input0), 2}.
+ * >= 0. The shape of the tensor must be {M, 2}, where M is the number
+ * of spatial dimensions.
* padding[i, 0] specifies the number of element to be padded in the
* front of dimension i.
* padding[i, 1] specifies the number of element to be padded after the
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index 3b8e3dd..c2330b5 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -388,8 +388,9 @@
case OperationType::GROUPED_CONV_2D:
case OperationType::DEPTHWISE_CONV_2D:
case OperationType::CONV_2D: {
- if (operand == 1 && (type == OperandType::TENSOR_QUANT8_ASYMM ||
- type == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL)) {
+ if (operand == operation.inputs[1] &&
+ (type == OperandType::TENSOR_QUANT8_ASYMM ||
+ type == OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL)) {
return true;
}
} break;
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
index da78f41..1d79ff6 100644
--- a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
+++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
@@ -26,6 +26,10 @@
sap->connectReq(token, maxMsgSize);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(sapCb->sapResponseToken, token);
+
+ // Modem side need time for connect to finish. Adding a waiting time to prevent
+ // disconnect being requested right after connect request.
+ sleep(1);
}
/*
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index 727aac5..3697d50 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -114,7 +114,7 @@
std::unique_ptr<DIR, decltype(&closedir)> dir_dump(
opendir(kTombstoneFolderPath), closedir);
if (!dir_dump) {
- LOG(ERROR) << "Failed to open directory: " << strerror(errno);
+ PLOG(ERROR) << "Failed to open directory";
return false;
}
struct dirent* dp;
@@ -128,8 +128,7 @@
struct stat cur_file_stat;
std::string cur_file_path = kTombstoneFolderPath + cur_file_name;
if (stat(cur_file_path.c_str(), &cur_file_stat) == -1) {
- LOG(ERROR) << "Failed to get file stat for " << cur_file_path
- << ": " << strerror(errno);
+ PLOG(ERROR) << "Failed to get file stat for " << cur_file_path;
success = false;
continue;
}
@@ -144,7 +143,7 @@
if (cur_file_count > kMaxRingBufferFileNum ||
cur_file.first < delete_files_before) {
if (unlink(cur_file.second.c_str()) != 0) {
- LOG(ERROR) << "Error deleting file " << strerror(errno);
+ PLOG(ERROR) << "Error deleting file";
success = false;
}
cur_file_count--;
@@ -168,13 +167,11 @@
major(st.st_dev), minor(st.st_dev), major(st.st_rdev),
minor(st.st_rdev), static_cast<uint32_t>(file_name_len), 0);
if (write(out_fd, read_buf.data(), llen) == -1) {
- LOG(ERROR) << "Error writing cpio header to file " << file_name << " "
- << strerror(errno);
+ PLOG(ERROR) << "Error writing cpio header to file " << file_name;
return false;
}
if (write(out_fd, file_name, file_name_len) == -1) {
- LOG(ERROR) << "Error writing filename to file " << file_name << " "
- << strerror(errno);
+ PLOG(ERROR) << "Error writing filename to file " << file_name;
return false;
}
@@ -183,8 +180,7 @@
if (llen != 0) {
const uint32_t zero = 0;
if (write(out_fd, &zero, 4 - llen) == -1) {
- LOG(ERROR) << "Error padding 0s to file " << file_name << " "
- << strerror(errno);
+ PLOG(ERROR) << "Error padding 0s to file " << file_name;
return false;
}
}
@@ -200,17 +196,17 @@
while (llen > 0) {
ssize_t bytes_read = read(fd_read, read_buf.data(), read_buf.size());
if (bytes_read == -1) {
- LOG(ERROR) << "Error reading file " << strerror(errno);
+ PLOG(ERROR) << "Error reading file";
return ++n_error;
}
llen -= bytes_read;
if (write(out_fd, read_buf.data(), bytes_read) == -1) {
- LOG(ERROR) << "Error writing data to file " << strerror(errno);
+ PLOG(ERROR) << "Error writing data to file";
return ++n_error;
}
if (bytes_read == 0) { // this should never happen, but just in case
// to unstuck from while loop
- LOG(ERROR) << "Unexpected read result for " << strerror(errno);
+ PLOG(ERROR) << "Unexpected read result";
n_error++;
break;
}
@@ -219,7 +215,7 @@
if (llen != 0) {
const uint32_t zero = 0;
if (write(out_fd, &zero, 4 - llen) == -1) {
- LOG(ERROR) << "Error padding 0s to file " << strerror(errno);
+ PLOG(ERROR) << "Error padding 0s to file";
return ++n_error;
}
}
@@ -234,7 +230,7 @@
sprintf(read_buf.data(), "070701%040X%056X%08XTRAILER!!!", 1,
0x0b, 0) +
4) == -1) {
- LOG(ERROR) << "Error writing trailing bytes " << strerror(errno);
+ PLOG(ERROR) << "Error writing trailing bytes";
return false;
}
return true;
@@ -249,7 +245,7 @@
std::unique_ptr<DIR, decltype(&closedir)> dir_dump(opendir(input_dir),
closedir);
if (!dir_dump) {
- LOG(ERROR) << "Failed to open directory: " << strerror(errno);
+ PLOG(ERROR) << "Failed to open directory";
return ++n_error;
}
while ((dp = readdir(dir_dump.get()))) {
@@ -263,15 +259,13 @@
struct stat st;
const std::string cur_file_path = kTombstoneFolderPath + cur_file_name;
if (stat(cur_file_path.c_str(), &st) == -1) {
- LOG(ERROR) << "Failed to get file stat for " << cur_file_path
- << ": " << strerror(errno);
+ PLOG(ERROR) << "Failed to get file stat for " << cur_file_path;
n_error++;
continue;
}
const int fd_read = open(cur_file_path.c_str(), O_RDONLY);
if (fd_read == -1) {
- LOG(ERROR) << "Failed to open file " << cur_file_path << " "
- << strerror(errno);
+ PLOG(ERROR) << "Failed to open file " << cur_file_path;
n_error++;
continue;
}
@@ -1158,6 +1152,16 @@
// This probably is not a critical failure?
LOG(ERROR) << "Failed to register radio mode change callback";
}
+ // Extract and save the version information into property.
+ std::pair<WifiStatus, IWifiChip::ChipDebugInfo> version_info;
+ version_info = WifiChip::requestChipDebugInfoInternal();
+ if (WifiStatusCode::SUCCESS == version_info.first.code) {
+ property_set("vendor.wlan.firmware.version",
+ version_info.second.firmwareDescription.c_str());
+ property_set("vendor.wlan.driver.version",
+ version_info.second.driverDescription.c_str());
+ }
+
return createWifiStatus(WifiStatusCode::SUCCESS);
}
@@ -1373,14 +1377,14 @@
kTombstoneFolderPath + item.first + "XXXXXXXXXX";
const int dump_fd = mkstemp(makeCharVec(file_path_raw).data());
if (dump_fd == -1) {
- LOG(ERROR) << "create file failed: " << strerror(errno);
+ PLOG(ERROR) << "create file failed";
return false;
}
unique_fd file_auto_closer(dump_fd);
for (const auto& cur_block : cur_buffer.getData()) {
if (write(dump_fd, cur_block.data(),
sizeof(cur_block[0]) * cur_block.size()) == -1) {
- LOG(ERROR) << "Error writing to file " << strerror(errno);
+ PLOG(ERROR) << "Error writing to file";
}
}
}