Merge "Set the thread pool count to 4 for vts3 tests. Thread priority is from https://source.corp.google.com/android/frameworks/native/services/surfaceflinger/main_surfaceflinger.cpp;rcl=e9cdd276a89d512137f22650da0c45ee4b28bd66;l=97"
diff --git a/authsecret/aidl/default/service.cpp b/authsecret/aidl/default/service.cpp
index efecf10..a7d8678 100644
--- a/authsecret/aidl/default/service.cpp
+++ b/authsecret/aidl/default/service.cpp
@@ -28,7 +28,7 @@
const std::string instance = std::string() + AuthSecret::descriptor + "/default";
binder_status_t status = AServiceManager_addService(authsecret->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return -1; // Should never be reached
diff --git a/automotive/audiocontrol/aidl/default/main.cpp b/automotive/audiocontrol/aidl/default/main.cpp
index 9b259fc..cc15ccb 100644
--- a/automotive/audiocontrol/aidl/default/main.cpp
+++ b/automotive/audiocontrol/aidl/default/main.cpp
@@ -31,7 +31,7 @@
const std::string instance = std::string() + AudioControl::descriptor + "/default";
binder_status_t status =
AServiceManager_addService(audioControl->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
std::shared_ptr<PowerPolicyClient> powerPolicyClient =
::ndk::SharedRefBase::make<PowerPolicyClient>(audioControl);
diff --git a/biometrics/face/aidl/default/main.cpp b/biometrics/face/aidl/default/main.cpp
index 80b153e..b7274e3 100644
--- a/biometrics/face/aidl/default/main.cpp
+++ b/biometrics/face/aidl/default/main.cpp
@@ -29,7 +29,7 @@
const std::string instance = std::string(Face::descriptor) + "/default";
binder_status_t status = AServiceManager_addService(hal->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/biometrics/fingerprint/aidl/default/main.cpp b/biometrics/fingerprint/aidl/default/main.cpp
index 4690d73..c985201 100644
--- a/biometrics/fingerprint/aidl/default/main.cpp
+++ b/biometrics/fingerprint/aidl/default/main.cpp
@@ -29,7 +29,7 @@
const std::string instance = std::string(Fingerprint::descriptor) + "/default";
binder_status_t status = AServiceManager_addService(hal->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/camera/device/3.8/ICameraDevice.hal b/camera/device/3.8/ICameraDevice.hal
index 448f176..1101819 100644
--- a/camera/device/3.8/ICameraDevice.hal
+++ b/camera/device/3.8/ICameraDevice.hal
@@ -16,6 +16,7 @@
package android.hardware.camera.device@3.8;
+import android.hardware.camera.common@1.0::Status;
import @3.7::ICameraDevice;
/**
@@ -29,4 +30,81 @@
* @3.7::ICameraDeviceSession.
*/
interface ICameraDevice extends @3.7::ICameraDevice {
+ /**
+ * turnOnTorchWithStrengthLevel:
+ *
+ * Change the brightness level of the flash unit associated with this camera device
+ * and set it to value in torchStrength. This function also turns ON the torch
+ * with specified torchStrength if the torch is OFF.
+ *
+ * The torchStrength value must be within the valid range i.e. >=1 and
+ * <= FLASH_INFO_STRENGTH_MAXIMUM_LEVEL. Whenever the torch is turned OFF,
+ * the brightness level will reset to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
+ * When the client calls setTorchMode(ON) after turnOnTorchWithStrengthLevel(N),
+ * the flash unit will have brightness level equal to N. This level does not
+ * represent the real brightness units. It is linear in nature i.e. flashlight
+ * at level 10 is twice as bright as at level 5.
+ *
+ * @param torchStrength Brightness level to be set for the flashlight.
+ *
+ * @return status Status code for the operation, one of:
+ * OK:
+ * On a successful change to the torch strength level.
+ * INTERNAL_ERROR:
+ * The flash unit cannot be operated due to an unexpected internal
+ * error.
+ * CAMERA_IN_USE:
+ * This status code is returned when:
+ * - This camera device has been opened, so the torch cannot be
+ * controlled until it is closed.
+ * - Due to other camera devices being open, or due to other
+ * resource constraints, the torch cannot be controlled currently.
+ * ILLEGAL_ARGUMENT:
+ * If the torchStrength value is not within the range i.e. < 1 or
+ * > FLASH_INFO_STRENGTH_MAXIMUM_LEVEL.
+ * METHOD_NOT_SUPPORTED:
+ * This status code is returned when:
+ * - This camera device does not support direct operation of flashlight
+ * torch mode. The framework must open the camera device and turn
+ * the torch on through the device interface.
+ * - This camera device does not have a flash unit.
+ * - This camera device has flash unit but does not support torch
+ * strength control.
+ * CAMERA_DISCONNECTED:
+ * An external camera device has been disconnected, and is no longer
+ * available. This camera device interface is now stale, and a new
+ * instance must be acquired if the device is reconnected. All
+ * subsequent calls on this interface must return
+ * CAMERA_DISCONNECTED.
+ *
+ */
+ turnOnTorchWithStrengthLevel(int32_t torchStrength) generates (Status status);
+
+ /**
+ * getTorchStrengthLevel:
+ *
+ * Get current torch strength level.
+ * If the device supports torch strength control, when the torch is OFF the
+ * strength level will reset to default level, so the return
+ * value in this case will be equal to FLASH_INFO_STRENGTH_DEFAULT_LEVEL.
+ *
+ * @return status Status code for the operation, one of:
+ * OK:
+ * On success.
+ * INTERNAL_ERROR:
+ * An unexpected error occurred and the information is not
+ * available.
+ * METHOD_NOT_SUPPORTED:
+ * This status code is returned when:
+ * - This camera device does not support direct operation of flashlight
+ * torch mode. The framework must open the camera device and turn
+ * the torch on through the device interface.
+ * - This camera device does not have a flash unit.
+ * - This camera device has flash unit but does not support torch
+ * strength control.
+ *
+ * @return torchStrength Current torch strength level.
+ *
+ */
+ getTorchStrengthLevel() generates (Status status, int32_t torchStrength);
};
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 77974fc..01ec9cb 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -41,6 +41,7 @@
#include <android/hardware/camera/device/3.6/ICameraDevice.h>
#include <android/hardware/camera/device/3.6/ICameraDeviceSession.h>
#include <android/hardware/camera/device/3.7/ICameraDevice.h>
+#include <android/hardware/camera/device/3.8/ICameraDevice.h>
#include <android/hardware/camera/device/3.7/ICameraDeviceSession.h>
#include <android/hardware/camera/device/3.7/ICameraInjectionSession.h>
#include <android/hardware/camera/device/3.8/ICameraDeviceCallback.h>
@@ -911,6 +912,7 @@
uint32_t* outBufSize);
static Status isConstrainedModeAvailable(camera_metadata_t *staticMeta);
static Status isLogicalMultiCamera(const camera_metadata_t *staticMeta);
+ static bool isTorchStrengthControlSupported(const camera_metadata_t *staticMeta);
static Status isOfflineSessionSupported(const camera_metadata_t *staticMeta);
static Status getPhysicalCameraIds(const camera_metadata_t *staticMeta,
std::unordered_set<std::string> *physicalIds/*out*/);
@@ -2933,6 +2935,137 @@
}
}
+// Verify that the torch strength level can be set and retrieved successfully.
+TEST_P(CameraHidlTest, turnOnTorchWithStrengthLevel) {
+ hidl_vec<hidl_string> cameraDeviceNames = getCameraDeviceNames(mProvider);
+ bool torchControlSupported = false;
+ bool torchStrengthControlSupported = false;
+ Return<void> ret;
+
+ ret = mProvider->isSetTorchModeSupported([&](auto status, bool support) {
+ ALOGI("isSetTorchModeSupported returns status:%d supported:%d", (int)status, support);
+ ASSERT_EQ(Status::OK, status);
+ torchControlSupported = support;
+ });
+
+ sp<TorchProviderCb> cb = new TorchProviderCb(this);
+ Return<Status> returnStatus = mProvider->setCallback(cb);
+ ASSERT_TRUE(returnStatus.isOk());
+ ASSERT_EQ(Status::OK, returnStatus);
+
+ for (const auto& name : cameraDeviceNames) {
+ int deviceVersion = getCameraDeviceVersion(name, mProviderType);
+ int32_t defaultLevel;
+ switch (deviceVersion) {
+ case CAMERA_DEVICE_API_VERSION_3_8: {
+ ::android::sp<::android::hardware::camera::device::V3_8::ICameraDevice> device3_8;
+ ALOGI("%s: Testing camera device %s", __FUNCTION__, name.c_str());
+ ret = mProvider->getCameraDeviceInterface_V3_x(
+ name, [&](auto status, const auto& device) {
+ ASSERT_EQ(Status::OK, status);
+ ASSERT_NE(device, nullptr);
+ auto castResult = device::V3_8::ICameraDevice::castFrom(device);
+ ASSERT_TRUE(castResult.isOk());
+ device3_8 = castResult;
+ });
+ ASSERT_TRUE(ret.isOk());
+
+ ret = device3_8->getCameraCharacteristics([&] (auto s, const auto& chars) {
+ ASSERT_EQ(Status::OK, s);
+ const camera_metadata_t* staticMeta =
+ reinterpret_cast<const camera_metadata_t*>(chars.data());
+ ASSERT_NE(nullptr, staticMeta);
+ torchStrengthControlSupported = isTorchStrengthControlSupported(staticMeta);
+ camera_metadata_ro_entry entry;
+ int rc = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL, &entry);
+ if (torchStrengthControlSupported) {
+ ASSERT_EQ(rc, 0);
+ ASSERT_GT(entry.count, 0);
+ defaultLevel = *entry.data.i32;
+ ALOGI("Default level is:%d", defaultLevel);
+ }
+ });
+ ASSERT_TRUE(ret.isOk());
+ // If torchStrengthControl is supported, torchControlSupported should be true.
+ if (torchStrengthControlSupported) {
+ ASSERT_TRUE(torchControlSupported);
+ }
+ mTorchStatus = TorchModeStatus::NOT_AVAILABLE;
+ returnStatus = device3_8->turnOnTorchWithStrengthLevel(2);
+ ASSERT_TRUE(returnStatus.isOk());
+ // Method_not_supported check
+ if (!torchStrengthControlSupported) {
+ ALOGI("Torch strength control not supported.");
+ ASSERT_EQ(Status::METHOD_NOT_SUPPORTED, returnStatus);
+ } else {
+ ASSERT_EQ(Status::OK, returnStatus);
+ if (returnStatus == Status::OK) {
+ {
+ std::unique_lock<std::mutex> l(mTorchLock);
+ while (TorchModeStatus::NOT_AVAILABLE == mTorchStatus) {
+ auto timeout = std::chrono::system_clock::now() +
+ std::chrono::seconds(kTorchTimeoutSec);
+ ASSERT_NE(std::cv_status::timeout, mTorchCond.wait_until(l,
+ timeout));
+ }
+ ASSERT_EQ(TorchModeStatus::AVAILABLE_ON, mTorchStatus);
+ mTorchStatus = TorchModeStatus::NOT_AVAILABLE;
+ }
+ ALOGI("getTorchStrengthLevel: Testing");
+ ret = device3_8->getTorchStrengthLevel([&]
+ (auto status, const auto& strengthLevel) {
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(Status::OK, status);
+ ALOGI("Torch strength level is : %d", strengthLevel);
+ ASSERT_EQ(strengthLevel, 2);
+ });
+ // Turn OFF the torch and verify torch strength level is reset to default level.
+ ALOGI("Testing torch strength level reset after turning the torch OFF.");
+ returnStatus = device3_8->setTorchMode(TorchMode::OFF);
+ ASSERT_TRUE(returnStatus.isOk());
+ ASSERT_EQ(Status::OK, returnStatus);
+ {
+ std::unique_lock<std::mutex> l(mTorchLock);
+ while (TorchModeStatus::NOT_AVAILABLE == mTorchStatus) {
+ auto timeout = std::chrono::system_clock::now() +
+ std::chrono::seconds(kTorchTimeoutSec);
+ ASSERT_NE(std::cv_status::timeout, mTorchCond.wait_until(l,
+ timeout));
+ }
+ ASSERT_EQ(TorchModeStatus::AVAILABLE_OFF, mTorchStatus);
+ }
+ ret = device3_8->getTorchStrengthLevel([&]
+ (auto status, const auto& strengthLevel) {
+ ASSERT_TRUE(ret.isOk());
+ ASSERT_EQ(Status::OK, status);
+ ALOGI("Torch strength level after turning OFF torch is : %d",
+ strengthLevel);
+ ASSERT_EQ(strengthLevel, defaultLevel);
+ });
+ }
+ }
+ }
+ break;
+ case CAMERA_DEVICE_API_VERSION_3_7:
+ case CAMERA_DEVICE_API_VERSION_3_6:
+ case CAMERA_DEVICE_API_VERSION_3_5:
+ case CAMERA_DEVICE_API_VERSION_3_4:
+ case CAMERA_DEVICE_API_VERSION_3_3:
+ case CAMERA_DEVICE_API_VERSION_3_2:
+ case CAMERA_DEVICE_API_VERSION_1_0: {
+ ALOGI("Torch strength control feature not supported.");
+ }
+ break;
+ default: {
+ ALOGI("Invalid device version.");
+ ADD_FAILURE();
+ }
+ break;
+ }
+ }
+}
+
//In case it is supported verify that torch can be enabled.
//Check for corresponding toch callbacks as well.
TEST_P(CameraHidlTest, setTorchMode) {
@@ -6600,6 +6733,22 @@
return ret;
}
+bool CameraHidlTest::isTorchStrengthControlSupported(const camera_metadata_t *staticMetadata) {
+ int32_t maxLevel = 0;
+ camera_metadata_ro_entry maxEntry;
+ int rc = find_camera_metadata_ro_entry(staticMetadata,
+ ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL, &maxEntry);
+ if (rc != 0) {
+ return false;
+ }
+ maxLevel = *maxEntry.data.i32;
+ if (maxLevel > 1) {
+ ALOGI("Torch strength control supported.");
+ return true;
+ }
+ return false;
+}
+
// Check if the camera device has logical multi-camera capability.
Status CameraHidlTest::isOfflineSessionSupported(const camera_metadata_t *staticMeta) {
Status ret = Status::METHOD_NOT_SUPPORTED;
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 9dc6fae..34fbaaf 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -298,16 +298,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl" optional="false">
- <name>android.hardware.health</name>
- <version>2.1</version>
- <interface>
- <name>IHealth</name>
- <instance>default</instance>
- </interface>
- </hal>
- <!-- TODO(b/177269435): require health AIDL HAL and deprecate HIDL HAL -->
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="false">
<name>android.hardware.health</name>
<version>1</version>
<interface>
@@ -381,7 +372,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.security.keymint</name>
- <version>1</version>
+ <version>1-2</version>
<interface>
<name>IKeyMintDevice</name>
<instance>default</instance>
@@ -390,6 +381,7 @@
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.security.keymint</name>
+ <version>1-2</version>
<interface>
<name>IRemotelyProvisionedComponent</name>
<instance>default</instance>
@@ -466,7 +458,7 @@
</hal>
<hal format="aidl" optional="false">
<name>android.hardware.power</name>
- <version>1-2</version>
+ <version>1-3</version>
<interface>
<name>IPower</name>
<instance>default</instance>
diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp
index 720a767..2aa4bb2 100644
--- a/compatibility_matrices/exclude/fcm_exclude.cpp
+++ b/compatibility_matrices/exclude/fcm_exclude.cpp
@@ -56,7 +56,6 @@
"android.hardware.common",
"android.hardware.common.fmq",
"android.hardware.graphics.common",
- "android.hardware.graphics.composer3.command",
"android.hardware.keymaster",
"android.hardware.radio",
"android.hardware.uwb.fira_android",
diff --git a/dumpstate/aidl/default/main.cpp b/dumpstate/aidl/default/main.cpp
index 2451752..5bc85b4 100644
--- a/dumpstate/aidl/default/main.cpp
+++ b/dumpstate/aidl/default/main.cpp
@@ -29,7 +29,7 @@
const std::string instance = std::string() + Dumpstate::descriptor + "/default";
binder_status_t status =
AServiceManager_registerLazyService(dumpstate->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // Unreachable
diff --git a/gnss/aidl/default/service.cpp b/gnss/aidl/default/service.cpp
index 09f1ad2..bbe34f1 100644
--- a/gnss/aidl/default/service.cpp
+++ b/gnss/aidl/default/service.cpp
@@ -42,7 +42,7 @@
const std::string instance = std::string() + Gnss::descriptor + "/default";
binder_status_t status =
AServiceManager_addService(gnssAidl->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
sp<IGnss> gnss = new GnssHidlHal(gnssAidl);
configureRpcThreadpool(1, true /* will join */);
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
index 9034138..5f5b54e 100644
--- a/graphics/composer/aidl/Android.bp
+++ b/graphics/composer/aidl/Android.bp
@@ -33,7 +33,6 @@
},
srcs: [
"android/hardware/graphics/composer3/*.aidl",
- "android/hardware/graphics/composer3/command/*.aidl",
],
stability: "vintf",
imports: [
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Buffer.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Buffer.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Buffer.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Buffer.aidl
index cead848..a33ad23 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Buffer.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Buffer.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable Buffer {
int slot;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
similarity index 94%
copy from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
copy to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
index 40637a9..7e47ba8 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
@@ -31,8 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
-parcelable ParcelableComposition {
+parcelable ChangedCompositionLayer {
+ long layer;
android.hardware.graphics.composer3.Composition composition;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
similarity index 91%
copy from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl
copy to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
index 906f20c..9a5ca97 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
@@ -31,9 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
-parcelable PresentFence {
+parcelable ChangedCompositionTypes {
long display;
- ParcelFileDescriptor fence;
+ android.hardware.graphics.composer3.ChangedCompositionLayer[] layers;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTarget.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTarget.aidl
similarity index 93%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTarget.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTarget.aidl
index c3f4700..7632707 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTarget.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTarget.aidl
@@ -31,10 +31,10 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ClientTarget {
- android.hardware.graphics.composer3.command.Buffer buffer;
+ android.hardware.graphics.composer3.Buffer buffer;
android.hardware.graphics.common.Dataspace dataspace;
android.hardware.graphics.common.Rect[] damage;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
similarity index 97%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
index b690a57..f0fb22e 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ClientTargetPropertyWithNits {
long display;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorTransformPayload.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorTransformPayload.aidl
index 0b3071c..df07c9c 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorTransformPayload.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ColorTransformPayload {
float[] matrix;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Error.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandError.aidl
similarity index 95%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Error.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandError.aidl
index 1726ea5..103bfdc 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/Error.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandError.aidl
@@ -31,9 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
-parcelable Error {
+parcelable CommandError {
int commandIndex;
int errorCode;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandResultPayload.aidl
similarity index 74%
copy from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
copy to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandResultPayload.aidl
index 5e6d212..ebbb31e 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/CommandResultPayload.aidl
@@ -31,8 +31,14 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
-parcelable ParcelableBlendMode {
- android.hardware.graphics.common.BlendMode blendMode;
+union CommandResultPayload {
+ android.hardware.graphics.composer3.CommandError error;
+ android.hardware.graphics.composer3.ChangedCompositionTypes changedCompositionTypes;
+ android.hardware.graphics.composer3.DisplayRequest displayRequest;
+ android.hardware.graphics.composer3.PresentFence presentFence;
+ android.hardware.graphics.composer3.ReleaseFences releaseFences;
+ android.hardware.graphics.composer3.PresentOrValidate presentOrValidateResult;
+ android.hardware.graphics.composer3.ClientTargetPropertyWithNits clientTargetProperty;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl
index e327e87..d2d8f04 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl
@@ -40,4 +40,5 @@
SOLID_COLOR = 3,
CURSOR = 4,
SIDEBAND = 5,
+ DISPLAY_DECORATION = 6,
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
index 0bcd870..9f5342e 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -40,4 +40,5 @@
BRIGHTNESS = 3,
PROTECTED_CONTENTS = 4,
AUTO_LOW_LATENCY_MODE = 5,
+ SUSPEND = 6,
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayCommand.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
similarity index 84%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayCommand.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
index 7446db0..2f5d00f 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayCommand.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -31,13 +31,14 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable DisplayCommand {
long display;
- @nullable android.hardware.graphics.composer3.command.ColorTransformPayload colorTransform;
- @nullable android.hardware.graphics.composer3.command.ClientTarget clientTarget;
- @nullable android.hardware.graphics.composer3.command.Buffer virtualDisplayOutputBuffer;
+ android.hardware.graphics.composer3.LayerCommand[] layers;
+ @nullable android.hardware.graphics.composer3.ColorTransformPayload colorTransform;
+ @nullable android.hardware.graphics.composer3.ClientTarget clientTarget;
+ @nullable android.hardware.graphics.composer3.Buffer virtualDisplayOutputBuffer;
boolean validateDisplay;
boolean acceptDisplayChanges;
boolean presentDisplay;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayRequest.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl
similarity index 93%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayRequest.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl
index 7f413a9..13462ce 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/DisplayRequest.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl
@@ -31,12 +31,12 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable DisplayRequest {
long display;
int mask;
- android.hardware.graphics.composer3.command.DisplayRequest.LayerRequest[] layerRequests;
+ android.hardware.graphics.composer3.DisplayRequest.LayerRequest[] layerRequests;
const int FLIP_CLIENT_TARGET = 1;
const int WRITE_CLIENT_TARGET_TO_OUTPUT = 2;
@VintfStability
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/GenericMetadata.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/GenericMetadata.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/GenericMetadata.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/GenericMetadata.aidl
index be889d8..c18529b 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/GenericMetadata.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/GenericMetadata.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable GenericMetadata {
android.hardware.graphics.composer3.LayerGenericMetadataKey key;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index 65cf86c..2bdbc9f 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -38,12 +38,11 @@
android.hardware.graphics.composer3.VirtualDisplay createVirtualDisplay(int width, int height, android.hardware.graphics.common.PixelFormat formatHint, int outputBufferSlotCount);
void destroyLayer(long display, long layer);
void destroyVirtualDisplay(long display);
- android.hardware.graphics.composer3.command.CommandResultPayload[] executeCommands(in android.hardware.graphics.composer3.command.CommandPayload[] commands);
+ android.hardware.graphics.composer3.CommandResultPayload[] executeCommands(in android.hardware.graphics.composer3.DisplayCommand[] commands);
int getActiveConfig(long display);
android.hardware.graphics.composer3.ColorMode[] getColorModes(long display);
float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
int getDisplayAttribute(long display, int config, android.hardware.graphics.composer3.DisplayAttribute attribute);
- boolean getDisplayBrightnessSupport(long display);
android.hardware.graphics.composer3.DisplayCapability[] getDisplayCapabilities(long display);
int[] getDisplayConfigs(long display);
android.hardware.graphics.composer3.DisplayConnectionType getDisplayConnectionType(long display);
@@ -52,7 +51,6 @@
int getDisplayVsyncPeriod(long display);
android.hardware.graphics.composer3.DisplayContentSample getDisplayedContentSample(long display, long maxFrames, long timestamp);
android.hardware.graphics.composer3.DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display);
- boolean getDozeSupport(long display);
android.hardware.graphics.composer3.HdrCapabilities getHdrCapabilities(long display);
android.hardware.graphics.composer3.LayerGenericMetadataKey[] getLayerGenericMetadataKeys();
int getMaxVirtualDisplayCount();
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/LayerCommand.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
similarity index 75%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/LayerCommand.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
index b5adbc3..bad72fc 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/LayerCommand.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
@@ -31,29 +31,28 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable LayerCommand {
- long display;
long layer;
@nullable android.hardware.graphics.common.Point cursorPosition;
- @nullable android.hardware.graphics.composer3.command.Buffer buffer;
+ @nullable android.hardware.graphics.composer3.Buffer buffer;
@nullable android.hardware.graphics.common.Rect[] damage;
- @nullable android.hardware.graphics.composer3.command.ParcelableBlendMode blendMode;
+ @nullable android.hardware.graphics.composer3.ParcelableBlendMode blendMode;
@nullable android.hardware.graphics.composer3.Color color;
@nullable android.hardware.graphics.composer3.FloatColor floatColor;
- @nullable android.hardware.graphics.composer3.command.ParcelableComposition composition;
- @nullable android.hardware.graphics.composer3.command.ParcelableDataspace dataspace;
+ @nullable android.hardware.graphics.composer3.ParcelableComposition composition;
+ @nullable android.hardware.graphics.composer3.ParcelableDataspace dataspace;
@nullable android.hardware.graphics.common.Rect displayFrame;
- @nullable android.hardware.graphics.composer3.command.PlaneAlpha planeAlpha;
+ @nullable android.hardware.graphics.composer3.PlaneAlpha planeAlpha;
@nullable android.hardware.common.NativeHandle sidebandStream;
@nullable android.hardware.graphics.common.FRect sourceCrop;
- @nullable android.hardware.graphics.composer3.command.ParcelableTransform transform;
+ @nullable android.hardware.graphics.composer3.ParcelableTransform transform;
@nullable android.hardware.graphics.common.Rect[] visibleRegion;
- @nullable android.hardware.graphics.composer3.command.ZOrder z;
+ @nullable android.hardware.graphics.composer3.ZOrder z;
@nullable float[] colorTransform;
- @nullable android.hardware.graphics.composer3.command.WhitePointNits whitePointNits;
- @nullable android.hardware.graphics.composer3.command.GenericMetadata genericMetadata;
+ @nullable android.hardware.graphics.composer3.WhitePointNits whitePointNits;
+ @nullable android.hardware.graphics.composer3.GenericMetadata genericMetadata;
@nullable android.hardware.graphics.composer3.PerFrameMetadata[] perFrameMetadata;
@nullable android.hardware.graphics.composer3.PerFrameMetadataBlob[] perFrameMetadataBlob;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
index 5e6d212..f1fee5f 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ParcelableBlendMode {
android.hardware.graphics.common.BlendMode blendMode;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableComposition.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableComposition.aidl
index 40637a9..98fbb66 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableComposition.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ParcelableComposition {
android.hardware.graphics.composer3.Composition composition;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableDataspace.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableDataspace.aidl
index 8f06079..76ecf85 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableDataspace.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ParcelableDataspace {
android.hardware.graphics.common.Dataspace dataspace;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableTransform.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableTransform.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableTransform.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableTransform.aidl
index 6d6fe5b..b673656 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableTransform.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ParcelableTransform.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ParcelableTransform {
android.hardware.graphics.common.Transform transform;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PlaneAlpha.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PlaneAlpha.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PlaneAlpha.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PlaneAlpha.aidl
index 97f5329..c48c2a8 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PlaneAlpha.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PlaneAlpha.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PlaneAlpha {
float alpha;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentFence.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentFence.aidl
index 906f20c..3bb09cd 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentFence.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentFence.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PresentFence {
long display;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentOrValidate.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentOrValidate.aidl
similarity index 93%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentOrValidate.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentOrValidate.aidl
index 66f1c03..3514e53 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/PresentOrValidate.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PresentOrValidate.aidl
@@ -31,11 +31,11 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PresentOrValidate {
long display;
- android.hardware.graphics.composer3.command.PresentOrValidate.Result result;
+ android.hardware.graphics.composer3.PresentOrValidate.Result result;
@VintfStability
enum Result {
Presented = 0,
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ReleaseFences.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReleaseFences.aidl
similarity index 93%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ReleaseFences.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReleaseFences.aidl
index b7d2586..d623661 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ReleaseFences.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReleaseFences.aidl
@@ -31,11 +31,11 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ReleaseFences {
long display;
- android.hardware.graphics.composer3.command.ReleaseFences.Layer[] layers;
+ android.hardware.graphics.composer3.ReleaseFences.Layer[] layers;
@VintfStability
parcelable Layer {
long layer;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/WhitePointNits.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/WhitePointNits.aidl
index 2b25167..c3925d2 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/WhitePointNits.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable WhitePointNits {
float nits;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ZOrder.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ZOrder.aidl
similarity index 96%
rename from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ZOrder.aidl
rename to graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ZOrder.aidl
index 69b68c4..ea96ea3 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ZOrder.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ZOrder.aidl
@@ -31,7 +31,7 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ZOrder {
int z;
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl
deleted file mode 100644
index 1377c6c..0000000
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2021, 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.graphics.composer3.command;
-@VintfStability
-parcelable ChangedCompositionTypes {
- long display;
- android.hardware.graphics.composer3.command.ChangedCompositionTypes.Layer[] layers;
- @VintfStability
- parcelable Layer {
- long layer;
- android.hardware.graphics.composer3.Composition composition;
- }
-}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandPayload.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandPayload.aidl
deleted file mode 100644
index 9848306..0000000
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandPayload.aidl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2021, 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.graphics.composer3.command;
-@VintfStability
-union CommandPayload {
- android.hardware.graphics.composer3.command.DisplayCommand displayCommand;
- android.hardware.graphics.composer3.command.LayerCommand layerCommand;
-}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandResultPayload.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandResultPayload.aidl
deleted file mode 100644
index 1b3cae8..0000000
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/CommandResultPayload.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2021, 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.graphics.composer3.command;
-@VintfStability
-union CommandResultPayload {
- android.hardware.graphics.composer3.command.Error error;
- android.hardware.graphics.composer3.command.ChangedCompositionTypes changedCompositionType;
- android.hardware.graphics.composer3.command.DisplayRequest displayRequest;
- android.hardware.graphics.composer3.command.PresentFence presentFence;
- android.hardware.graphics.composer3.command.ReleaseFences releaseFences;
- android.hardware.graphics.composer3.command.PresentOrValidate presentOrValidateResult;
- android.hardware.graphics.composer3.command.ClientTargetPropertyWithNits clientTargetProperty;
-}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/Buffer.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Buffer.aidl
similarity index 96%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/Buffer.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/Buffer.aidl
index 3a08d3b..415a9b6 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/Buffer.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Buffer.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.common.NativeHandle;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
similarity index 74%
copy from graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
copy to graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
index 91979d8..fb25163 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionLayer.aidl
@@ -14,11 +14,20 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.composer3.Composition;
@VintfStability
-parcelable ParcelableComposition {
+parcelable ChangedCompositionLayer {
+ /**
+ * The layer which this commands refers to.
+ * @see IComposer.createLayer
+ */
+ long layer;
+
+ /**
+ * The new composition type.
+ */
Composition composition;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
similarity index 72%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
index 3800eff..ddd45b7 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ChangedCompositionTypes.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ChangedCompositionTypes.aidl
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
+import android.hardware.graphics.composer3.ChangedCompositionLayer;
import android.hardware.graphics.composer3.Composition;
@VintfStability
@@ -26,22 +27,8 @@
*/
long display;
- @VintfStability
- parcelable Layer {
- /**
- * The layer which this commands refers to.
- * @see IComposer.createLayer
- */
- long layer;
-
- /**
- * The new composition type.
- */
- Composition composition;
- }
-
/**
* Indicates which layers has composition changes
*/
- Layer[] layers;
+ ChangedCompositionLayer[] layers;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTarget.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTarget.aidl
similarity index 89%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTarget.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ClientTarget.aidl
index d8d45a1..56488d5 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTarget.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTarget.aidl
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.common.Dataspace;
import android.hardware.graphics.common.Rect;
-import android.hardware.graphics.composer3.command.Buffer;
+import android.hardware.graphics.composer3.Buffer;
@VintfStability
parcelable ClientTarget {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
similarity index 95%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
index c80e4ce..5037651 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ClientTargetPropertyWithNits.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetPropertyWithNits.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.composer3.ClientTargetProperty;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ColorTransformPayload.aidl
similarity index 91%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ColorTransformPayload.aidl
index 9cc8fa7..fc37dac 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ColorTransformPayload.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ColorTransformPayload.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.common.ColorTransform;
@@ -27,7 +27,7 @@
/**
* Hint value which may be used instead of the given matrix unless it
- * is ColorTransform::ARBITRARY.
+ * is ColorTransform.ARBITRARY.
*/
ColorTransform hint;
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/Error.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/CommandError.aidl
similarity index 91%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/Error.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/CommandError.aidl
index 19843b9..ea48600 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/Error.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/CommandError.aidl
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
-parcelable Error {
+parcelable CommandError {
/**
* The index in the command payload array.
*/
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandResultPayload.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/CommandResultPayload.aidl
similarity index 85%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandResultPayload.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/CommandResultPayload.aidl
index b6086ca..f2de68e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandResultPayload.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/CommandResultPayload.aidl
@@ -14,22 +14,22 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
-import android.hardware.graphics.composer3.command.ChangedCompositionTypes;
-import android.hardware.graphics.composer3.command.ClientTargetPropertyWithNits;
-import android.hardware.graphics.composer3.command.DisplayRequest;
-import android.hardware.graphics.composer3.command.Error;
-import android.hardware.graphics.composer3.command.PresentFence;
-import android.hardware.graphics.composer3.command.PresentOrValidate;
-import android.hardware.graphics.composer3.command.ReleaseFences;
+import android.hardware.graphics.composer3.ChangedCompositionTypes;
+import android.hardware.graphics.composer3.ClientTargetPropertyWithNits;
+import android.hardware.graphics.composer3.CommandError;
+import android.hardware.graphics.composer3.DisplayRequest;
+import android.hardware.graphics.composer3.PresentFence;
+import android.hardware.graphics.composer3.PresentOrValidate;
+import android.hardware.graphics.composer3.ReleaseFences;
@VintfStability
union CommandResultPayload {
/**
* Indicates an error generated by a command.
*/
- Error error;
+ CommandError error;
/**
* Sets the layers for which the device requires a different composition
@@ -38,7 +38,7 @@
* ACCEPT_DISPLAY_CHANGES, or must set new types and attempt to validate
* the display again.
*/
- ChangedCompositionTypes changedCompositionType;
+ ChangedCompositionTypes changedCompositionTypes;
/**
* Sets the display requests and the layer requests required for the last
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl
index ea22af2..4947463 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl
@@ -66,11 +66,24 @@
/**
* The device must handle the composition of this layer, as well as
* its buffer updates and content synchronization. Only supported on
- * devices which provide Capability::SIDEBAND_STREAM.
+ * devices which provide Capability.SIDEBAND_STREAM.
*
* Upon validateDisplay, the device may request a change from this
* type to either DEVICE or CLIENT, but it is unlikely that content
* will display correctly in these cases.
*/
SIDEBAND = 5,
+ /**
+ * A display decoration layer contains a buffer which is an 8 bit
+ * alpha mask. Pixels in the mask with an alpha of 0 (transparent) will
+ * show the content underneath, and pixels with an alpha of 255 will be
+ * be rendered in black. An alpha in between will show the content
+ * blended with black. This is useful, for example, to provide
+ * anti-aliasing on the cutout region/rounded corners on the top and
+ * bottom of a display.
+ *
+ * Upon validateDisplay, the device may request a change from this type
+ * to CLIENT.
+ */
+ DISPLAY_DECORATION = 6,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
index 54f09c1..eacf106 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -41,14 +41,15 @@
*/
SKIP_CLIENT_COLOR_TRANSFORM = 1,
/**
- * Indicates that the display supports PowerMode::DOZE and
- * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit
+ * Indicates that the display supports PowerMode.DOZE and
+ * potentially PowerMode.DOZE_SUSPEND if DisplayCapability.SUSPEND is also
+ * supported. DOZE_SUSPEND may not provide any benefit
* over DOZE (see the definition of PowerMode for more information),
* but if both DOZE and DOZE_SUSPEND are no different from
- * PowerMode::ON, the device must not claim support.
+ * PowerMode.ON, the device must not claim support.
* Must be returned by getDisplayCapabilities when getDozeSupport
- * indicates the display supports PowerMode::DOZE and
- * PowerMode::DOZE_SUSPEND.
+ * indicates the display supports PowerMode.DOZE and
+ * PowerMode.DOZE_SUSPEND.
*/
DOZE = 2,
/**
@@ -66,4 +67,12 @@
* support a low latency mode, such as HDMI 2.1 Auto Low Latency Mode.
*/
AUTO_LOW_LATENCY_MODE = 5,
+ /**
+ * Indicates that the display supports PowerMode.ON_SUSPEND.
+ * If PowerMode.ON_SUSPEND is no different from PowerMode.ON, the device must not
+ * claim support.
+ * If the display supports DisplayCapability.DOZE and DisplayCapability.SUSPEND, then
+ * PowerMode.ON_SUSPEND and PowerMode.DOZE_SUSPEND must be supported.
+ */
+ SUSPEND = 6,
}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayCommand.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
similarity index 87%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayCommand.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
index 7295ada..21497c4 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayCommand.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -14,11 +14,12 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
-import android.hardware.graphics.composer3.command.Buffer;
-import android.hardware.graphics.composer3.command.ClientTarget;
-import android.hardware.graphics.composer3.command.ColorTransformPayload;
+import android.hardware.graphics.composer3.Buffer;
+import android.hardware.graphics.composer3.ClientTarget;
+import android.hardware.graphics.composer3.ColorTransformPayload;
+import android.hardware.graphics.composer3.LayerCommand;
@VintfStability
parcelable DisplayCommand {
@@ -29,9 +30,15 @@
long display;
/**
+ * Sets layer commands for this display.
+ * @see LayerCommand.
+ */
+ LayerCommand[] layers;
+
+ /**
* Sets a color transform which will be applied after composition.
*
- * If hint is not ColorTransform::ARBITRARY, then the device may use the
+ * If hint is not ColorTransform.ARBITRARY, then the device may use the
* hint to apply the desired color transform instead of using the color
* matrix directly.
*
@@ -39,7 +46,7 @@
* apply the desired color transform, it must force all layers to client
* composition during VALIDATE_DISPLAY.
*
- * If IComposer::Capability::SKIP_CLIENT_COLOR_TRANSFORM is present, then
+ * If Capability.SKIP_CLIENT_COLOR_TRANSFORM is present, then
* the client must never apply the color transform during client
* composition, even if all layers are being composed by the client.
*
@@ -67,9 +74,9 @@
/**
* Sets the buffer handle which will receive the output of client
- * composition. Layers marked as Composition::CLIENT must be composited
+ * composition. Layers marked as Composition.CLIENT must be composited
* into this buffer prior to the call to PRESENT_DISPLAY, and layers not
- * marked as Composition::CLIENT must be composited with this buffer by
+ * marked as Composition.CLIENT must be composited with this buffer by
* the device.
*
* The buffer handle provided may be empty if no layers are being
@@ -87,7 +94,7 @@
* the description of SET_LAYER_SURFACE_DAMAGE.
*
* Will be called before PRESENT_DISPLAY if any of the layers are marked
- * as Composition::CLIENT. If no layers are so marked, then it is not
+ * as Composition.CLIENT. If no layers are so marked, then it is not
* necessary to call this function. It is not necessary to call
* validateDisplay after changing the target through this function.
*/
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayRequest.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl
similarity index 94%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayRequest.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl
index 10bd10c..27fe1e6 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/DisplayRequest.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable DisplayRequest {
@@ -27,7 +27,7 @@
/**
* Instructs the client to write the result of client composition
* directly into the virtual display output buffer. If any of the
- * layers are not marked as Composition::CLIENT or the given display
+ * layers are not marked as Composition.CLIENT or the given display
* is not a virtual display, this request has no effect.
*/
const int WRITE_CLIENT_TARGET_TO_OUTPUT = 1 << 1;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/GenericMetadata.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/GenericMetadata.aidl
similarity index 94%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/GenericMetadata.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/GenericMetadata.aidl
index a4e1fe8..d0254dd 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/GenericMetadata.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/GenericMetadata.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.composer3.LayerGenericMetadataKey;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl
index a6a9f73..b8edd80 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl
@@ -27,7 +27,7 @@
const int EX_NO_RESOURCES = 6;
/**
- * Creates a v2.4 client of the composer. Supersedes @2.3::createClient.
+ * Creates a client of the composer.
*
* @return is the newly created client.
*
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
index 1709e6d..ac95b41 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
@@ -26,7 +26,7 @@
* must trigger at least one hotplug notification, even if it only occurs
* immediately after callback registration.
*
- * Displays which have been connected are assumed to be in PowerMode::OFF,
+ * Displays which have been connected are assumed to be in PowerMode.OFF,
* and the onVsync callback should not be called for a display until vsync
* has been enabled with setVsyncEnabled.
*
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index f661f8b..28bdb2c 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -18,9 +18,11 @@
import android.hardware.graphics.composer3.ClientTargetProperty;
import android.hardware.graphics.composer3.ColorMode;
+import android.hardware.graphics.composer3.CommandResultPayload;
import android.hardware.graphics.composer3.ContentType;
import android.hardware.graphics.composer3.DisplayAttribute;
import android.hardware.graphics.composer3.DisplayCapability;
+import android.hardware.graphics.composer3.DisplayCommand;
import android.hardware.graphics.composer3.DisplayConnectionType;
import android.hardware.graphics.composer3.DisplayContentSample;
import android.hardware.graphics.composer3.DisplayContentSamplingAttributes;
@@ -36,8 +38,6 @@
import android.hardware.graphics.composer3.VirtualDisplay;
import android.hardware.graphics.composer3.VsyncPeriodChangeConstraints;
import android.hardware.graphics.composer3.VsyncPeriodChangeTimeline;
-import android.hardware.graphics.composer3.command.CommandPayload;
-import android.hardware.graphics.composer3.command.CommandResultPayload;
@VintfStability
interface IComposerClient {
@@ -163,7 +163,7 @@
*
* @return are the command statuses.
*/
- CommandResultPayload[] executeCommands(in CommandPayload[] commands);
+ CommandResultPayload[] executeCommands(in DisplayCommand[] commands);
/**
* Retrieves which display configuration is currently active.
@@ -185,7 +185,7 @@
/**
* Returns the color modes supported on this display.
*
- * All devices must support at least ColorMode::NATIVE.
+ * All devices must support at least ColorMode.NATIVE.
*
* @param display is the display to query.
*
@@ -201,7 +201,7 @@
*
* When the layer dataspace is a legacy dataspace (see
* common@1.1::Dataspace) and the display render intent is
- * RenderIntent::ENHANCE, the pixel values can go through an
+ * RenderIntent.ENHANCE, the pixel values can go through an
* implementation-defined saturation transform before being mapped to the
* current color mode colorimetrically.
*
@@ -247,22 +247,6 @@
int getDisplayAttribute(long display, int config, DisplayAttribute attribute);
/**
- * Use getDisplayCapabilities instead. If brightness is supported, must return
- * DisplayCapability::BRIGHTNESS as one of the display capabilities via getDisplayCapabilities.
- * Only use getDisplayCapabilities as the source of truth to query brightness support.
- *
- * Gets whether brightness operations are supported on a display.
- *
- * @param display The display.
- *
- * @return Whether brightness operations are supported on the display.
- *
- * @exception EX_BAD_DISPLAY when the display is invalid, or
- * @exception EX_BAD_PARAMETER when the output parameter is invalid.
- */
- boolean getDisplayBrightnessSupport(long display);
-
- /**
* Provides a list of supported capabilities (as described in the
* definition of DisplayCapability above). This list must not change after
* initialization.
@@ -371,21 +355,6 @@
DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display);
/**
- * Returns whether the given display supports PowerMode::DOZE and
- * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit over
- * DOZE (see the definition of PowerMode for more information), but if
- * both DOZE and DOZE_SUSPEND are no different from PowerMode::ON, the
- * device must not claim support.
- *
- * @param display is the display to query.
- *
- * @return is true only when the display supports doze modes.
- *
- * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
- */
- boolean getDozeSupport(long display);
-
- /**
* Returns the high dynamic range (HDR) capabilities of the given display,
* which are invariant with regard to the active configuration.
*
@@ -440,8 +409,8 @@
*
* The width and height of this buffer must be those of the currently-active
* display configuration, and the usage flags must consist of the following:
- * BufferUsage::CPU_READ | BufferUsage::GPU_TEXTURE |
- * BufferUsage::COMPOSER_OUTPUT
+ * BufferUsage.CPU_READ | BufferUsage.GPU_TEXTURE |
+ * BufferUsage.COMPOSER_OUTPUT
*
* The format and dataspace provided must be sufficient such that if a
* correctly-configured buffer is passed into setReadbackBuffer, filled by
@@ -516,8 +485,8 @@
* Returns the render intents supported by the specified display and color
* mode.
*
- * For SDR color modes, RenderIntent::COLORIMETRIC must be supported. For
- * HDR color modes, RenderIntent::TONE_MAP_COLORIMETRIC must be supported.
+ * For SDR color modes, RenderIntent.COLORIMETRIC must be supported. For
+ * HDR color modes, RenderIntent.TONE_MAP_COLORIMETRIC must be supported.
*
* @param display is the display to query.
* @param mode is the color mode to query.
@@ -531,11 +500,11 @@
/**
* Provides a list of all the content types supported by this display (any of
- * ContentType::{GRAPHICS, PHOTO, CINEMA, GAME}). This list must not change after
+ * ContentType.{GRAPHICS, PHOTO, CINEMA, GAME}). This list must not change after
* initialization.
*
* Content types are introduced in HDMI 1.4 and supporting them is optional. The
- * ContentType::NONE is always supported and will not be returned by this method..
+ * ContentType.NONE is always supported and will not be returned by this method..
*
* @return out is a list of supported content types.
*
@@ -602,7 +571,7 @@
* be triggered.
*
* This function should only be called if the display reports support for
- * DisplayCapability::AUTO_LOW_LATENCY_MODE from getDisplayCapabilities_2_4.
+ * DisplayCapability.AUTO_LOW_LATENCY_MODE from getDisplayCapabilities_2_4.
*
* @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
* @exception EX_UNSUPPORTED when AUTO_LOW_LATENCY_MODE is not supported by the composer
@@ -626,8 +595,8 @@
* The color mode and render intent change must take effect on next
* presentDisplay.
*
- * All devices must support at least ColorMode::NATIVE and
- * RenderIntent::COLORIMETRIC, and displays are assumed to be in this mode
+ * All devices must support at least ColorMode.NATIVE and
+ * RenderIntent.COLORIMETRIC, and displays are assumed to be in this mode
* upon hotplug.
*
* @param display is the display to which the color mode is set.
@@ -713,8 +682,8 @@
* complete when this function returns. It is valid to call this function
* multiple times with the same power mode.
*
- * All displays must support PowerMode::ON and PowerMode::OFF. Whether a
- * display supports PowerMode::DOZE or PowerMode::DOZE_SUSPEND may be
+ * All displays must support PowerMode.ON and PowerMode.OFF. Whether a
+ * display supports PowerMode.DOZE or PowerMode.DOZE_SUSPEND may be
* queried using getDozeSupport.
*
* @param display is the display to which the power mode is set.
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/LayerCommand.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
similarity index 88%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/LayerCommand.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
index eac051b..761da9a 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/LayerCommand.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
@@ -14,35 +14,29 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.common.NativeHandle;
import android.hardware.graphics.common.FRect;
import android.hardware.graphics.common.Point;
import android.hardware.graphics.common.Rect;
+import android.hardware.graphics.composer3.Buffer;
import android.hardware.graphics.composer3.Color;
import android.hardware.graphics.composer3.FloatColor;
+import android.hardware.graphics.composer3.GenericMetadata;
+import android.hardware.graphics.composer3.ParcelableBlendMode;
+import android.hardware.graphics.composer3.ParcelableComposition;
+import android.hardware.graphics.composer3.ParcelableDataspace;
+import android.hardware.graphics.composer3.ParcelableTransform;
import android.hardware.graphics.composer3.PerFrameMetadata;
import android.hardware.graphics.composer3.PerFrameMetadataBlob;
-import android.hardware.graphics.composer3.command.Buffer;
-import android.hardware.graphics.composer3.command.GenericMetadata;
-import android.hardware.graphics.composer3.command.ParcelableBlendMode;
-import android.hardware.graphics.composer3.command.ParcelableComposition;
-import android.hardware.graphics.composer3.command.ParcelableDataspace;
-import android.hardware.graphics.composer3.command.ParcelableTransform;
-import android.hardware.graphics.composer3.command.PlaneAlpha;
-import android.hardware.graphics.composer3.command.WhitePointNits;
-import android.hardware.graphics.composer3.command.ZOrder;
+import android.hardware.graphics.composer3.PlaneAlpha;
+import android.hardware.graphics.composer3.WhitePointNits;
+import android.hardware.graphics.composer3.ZOrder;
@VintfStability
parcelable LayerCommand {
/**
- * The display which this commands refers to.
- * @see IComposer.createDisplay
- */
- long display;
-
- /**
* The layer which this commands refers to.
* @see IComposer.createLayer
*/
@@ -51,7 +45,7 @@
/**
* Asynchronously sets the position of a cursor layer.
*
- * Prior to validateDisplay, a layer may be marked as Composition::CURSOR.
+ * Prior to validateDisplay, a layer may be marked as Composition.CURSOR.
* If validation succeeds (i.e., the device does not request a composition
* change for that layer), then once a buffer has been set for the layer
* and it has been presented, its position may be set by this function at
@@ -79,8 +73,8 @@
* may be passed instead.
*
* This function must return NONE and have no other effect if called for a
- * layer with a composition type of Composition::SOLID_COLOR (because it
- * has no buffer) or Composition::SIDEBAND or Composition::CLIENT (because
+ * layer with a composition type of Composition.SOLID_COLOR (because it
+ * has no buffer) or Composition.SIDEBAND or Composition.CLIENT (because
* synchronization and buffer updates for these layers are handled
* elsewhere).
*/
@@ -115,14 +109,14 @@
/**
* Sets the color of the given layer. If the composition type of the layer
- * is not Composition::SOLID_COLOR, this call must succeed and have no
+ * is not Composition.SOLID_COLOR, this call must succeed and have no
* other effect.
*/
@nullable Color color;
/**
* Sets the color of the given layer. If the composition type of the layer
- * is not Composition::SOLID_COLOR, this call must succeed and have no
+ * is not Composition.SOLID_COLOR, this call must succeed and have no
* other effect.
*/
@nullable FloatColor floatColor;
@@ -155,20 +149,20 @@
* Sets an alpha value (a floating point value in the range [0.0, 1.0])
* which will be applied to the whole layer. It can be conceptualized as a
* preprocessing step which applies the following function:
- * if (blendMode == BlendMode::PREMULTIPLIED)
+ * if (blendMode == BlendMode.PREMULTIPLIED)
* out.rgb = in.rgb * planeAlpha
* out.a = in.a * planeAlpha
*
* If the device does not support this operation on a layer which is
- * marked Composition::DEVICE, it must request a composition type change
- * to Composition::CLIENT upon the next validateDisplay call.
+ * marked Composition.DEVICE, it must request a composition type change
+ * to Composition.CLIENT upon the next validateDisplay call.
*
*/
@nullable PlaneAlpha planeAlpha;
/**
* Sets the sideband stream for this layer. If the composition type of the
- * given layer is not Composition::SIDEBAND, this call must succeed and
+ * given layer is not Composition.SIDEBAND, this call must succeed and
* have no other effect.
*/
@nullable NativeHandle sidebandStream;
@@ -180,7 +174,7 @@
*
* If the device is not capable of supporting a true float source crop
* (i.e., it will truncate or round the floats to integers), it must set
- * this layer to Composition::CLIENT when crop is non-integral for the
+ * this layer to Composition.CLIENT when crop is non-integral for the
* most accurate rendering.
*
* If the device cannot support float source crops, but still wants to
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
index f912853..a6c016a 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableBlendMode.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.common.BlendMode;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableComposition.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableComposition.aidl
index 91979d8..0946ce7 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableComposition.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableComposition.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.composer3.Composition;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableDataspace.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableDataspace.aidl
index 6be750d..528cdf9 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableDataspace.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableDataspace.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.common.Dataspace;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableTransform.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableTransform.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableTransform.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableTransform.aidl
index 910d014..75f9f7e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ParcelableTransform.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ParcelableTransform.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
import android.hardware.graphics.common.Transform;
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PlaneAlpha.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PlaneAlpha.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/PlaneAlpha.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/PlaneAlpha.aidl
index fa1889b..347dc19 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PlaneAlpha.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PlaneAlpha.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PlaneAlpha {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentFence.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PresentFence.aidl
similarity index 94%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentFence.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/PresentFence.aidl
index 0c14406..244b4e5 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentFence.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PresentFence.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PresentFence {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentOrValidate.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PresentOrValidate.aidl
similarity index 94%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentOrValidate.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/PresentOrValidate.aidl
index 7fc60c4..f3153bd 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/PresentOrValidate.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PresentOrValidate.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable PresentOrValidate {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ReleaseFences.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ReleaseFences.aidl
similarity index 95%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ReleaseFences.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ReleaseFences.aidl
index 762f5eb..459a042 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ReleaseFences.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ReleaseFences.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ReleaseFences {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl
index 043b24d..debf32c 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl
@@ -25,8 +25,8 @@
* modes should not affect the mapping.
*
* RenderIntent overrides the render intents defined for individual color
- * modes. It is ignored when the color mode is ColorMode::NATIVE, because
- * ColorMode::NATIVE colors are already display colors.
+ * modes. It is ignored when the color mode is ColorMode.NATIVE, because
+ * ColorMode.NATIVE colors are already display colors.
*/
@VintfStability
@Backing(type="int")
@@ -36,7 +36,7 @@
* gamut are hard-clipped.
*
* This implies that the display must have been calibrated unless
- * ColorMode::NATIVE is the only supported color mode.
+ * ColorMode.NATIVE is the only supported color mode.
*/
COLORIMETRIC = 0,
/**
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/WhitePointNits.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/WhitePointNits.aidl
similarity index 94%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/WhitePointNits.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/WhitePointNits.aidl
index ec46cdf..2a1d1c6 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/WhitePointNits.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/WhitePointNits.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable WhitePointNits {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ZOrder.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ZOrder.aidl
similarity index 93%
rename from graphics/composer/aidl/android/hardware/graphics/composer3/command/ZOrder.aidl
rename to graphics/composer/aidl/android/hardware/graphics/composer3/ZOrder.aidl
index 68120b0..56cc200 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/ZOrder.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ZOrder.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.graphics.composer3.command;
+package android.hardware.graphics.composer3;
@VintfStability
parcelable ZOrder {
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandPayload.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandPayload.aidl
deleted file mode 100644
index c1555e6..0000000
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/command/CommandPayload.aidl
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2021, 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.
- */
-
-package android.hardware.graphics.composer3.command;
-
-import android.hardware.graphics.composer3.command.DisplayCommand;
-import android.hardware.graphics.composer3.command.LayerCommand;
-
-/**
- * Type of commands that can be used in IComposerClient.executeCommands.
- * Note that this is a union and each command can only have one type.
- */
-@VintfStability
-union CommandPayload {
- DisplayCommand displayCommand;
- LayerCommand layerCommand;
-}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp
index 5bda15a..a3c8176 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp
@@ -74,7 +74,7 @@
static_assert(aidl::android::hardware::graphics::composer3::Capability::SKIP_VALIDATE ==
static_cast<aidl::android::hardware::graphics::composer3::Capability>(4));
-static_assert(aidl::android::hardware::graphics::composer3::command::DisplayRequest::LayerRequest::
+static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::LayerRequest::
CLEAR_CLIENT_TARGET ==
static_cast<int>(::android::hardware::graphics::composer::V2_1::IComposerClient::
LayerRequest::CLEAR_CLIENT_TARGET));
@@ -121,11 +121,10 @@
::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
SIDEBAND));
-static_assert(
- aidl::android::hardware::graphics::composer3::command::DisplayRequest::FLIP_CLIENT_TARGET ==
- static_cast<int>(::android::hardware::graphics::composer::V2_1::IComposerClient::
- DisplayRequest::FLIP_CLIENT_TARGET));
-static_assert(aidl::android::hardware::graphics::composer3::command::DisplayRequest::
+static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::FLIP_CLIENT_TARGET ==
+ static_cast<int>(::android::hardware::graphics::composer::V2_1::IComposerClient::
+ DisplayRequest::FLIP_CLIENT_TARGET));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::
WRITE_CLIENT_TARGET_TO_OUTPUT ==
static_cast<int>(::android::hardware::graphics::composer::V2_1::IComposerClient::
DisplayRequest::WRITE_CLIENT_TARGET_TO_OUTPUT));
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_ReadbackTest.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_ReadbackTest.cpp
index 717b60c..8726043 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_ReadbackTest.cpp
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_ReadbackTest.cpp
@@ -140,7 +140,7 @@
return;
}
- std::vector<command::CommandResultPayload> results;
+ std::vector<CommandResultPayload> results;
const auto status = mComposerClient->executeCommands(commands, &results);
ASSERT_TRUE(status.isOk()) << "executeCommands failed " << status.getDescription();
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp
index 0d71b68..39825c4 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -566,25 +566,6 @@
}
}
-TEST_P(GraphicsComposerAidlTest, getDisplayCapabilitiesBasic) {
- std::vector<DisplayCapability> capabilities;
- const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
- ASSERT_TRUE(error.isOk());
- const bool hasDozeSupport = std::find(capabilities.begin(), capabilities.end(),
- DisplayCapability::DOZE) != capabilities.end();
- bool isDozeSupported = false;
- EXPECT_TRUE(mComposerClient->getDozeSupport(mPrimaryDisplay, &isDozeSupported).isOk());
- EXPECT_EQ(hasDozeSupport, isDozeSupported);
-
- bool hasBrightnessSupport = std::find(capabilities.begin(), capabilities.end(),
- DisplayCapability::BRIGHTNESS) != capabilities.end();
- bool isBrightnessSupported = false;
- EXPECT_TRUE(
- mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay, &isBrightnessSupported)
- .isOk());
- EXPECT_EQ(isBrightnessSupported, hasBrightnessSupport);
-}
-
/*
* Test that if brightness operations are supported, setDisplayBrightness works as expected.
*/
@@ -1009,16 +990,14 @@
}
}
-TEST_P(GraphicsComposerAidlTest, GetDozeSupportBadDisplay) {
- bool isDozeSupport;
- const auto error = mComposerClient->getDozeSupport(mInvalidDisplayId, &isDozeSupport);
- EXPECT_FALSE(error.isOk());
- ASSERT_EQ(IComposerClient::EX_BAD_DISPLAY, error.getServiceSpecificError());
-}
-
TEST_P(GraphicsComposerAidlTest, SetPowerModeUnsupported) {
- bool isDozeSupported;
- mComposerClient->getDozeSupport(mPrimaryDisplay, &isDozeSupported).isOk();
+ std::vector<DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
+ ASSERT_TRUE(error.isOk());
+ const bool isDozeSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::DOZE) != capabilities.end();
+ const bool isSuspendSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::SUSPEND) != capabilities.end();
if (!isDozeSupported) {
auto error = mComposerClient->setPowerMode(mPrimaryDisplay, PowerMode::DOZE);
EXPECT_FALSE(error.isOk());
@@ -1028,6 +1007,16 @@
EXPECT_FALSE(error.isOk());
EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, error.getServiceSpecificError());
}
+
+ if (!isSuspendSupported) {
+ auto error = mComposerClient->setPowerMode(mPrimaryDisplay, PowerMode::ON_SUSPEND);
+ EXPECT_FALSE(error.isOk());
+ EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, error.getServiceSpecificError());
+
+ error = mComposerClient->setPowerMode(mPrimaryDisplay, PowerMode::DOZE_SUSPEND);
+ EXPECT_FALSE(error.isOk());
+ EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, error.getServiceSpecificError());
+ }
}
TEST_P(GraphicsComposerAidlTest, SetVsyncEnabled) {
@@ -1041,15 +1030,27 @@
}
TEST_P(GraphicsComposerAidlTest, SetPowerMode) {
+ std::vector<DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
+ ASSERT_TRUE(error.isOk());
+ const bool isDozeSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::DOZE) != capabilities.end();
+ const bool isSuspendSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::SUSPEND) != capabilities.end();
+
std::vector<PowerMode> modes;
modes.push_back(PowerMode::OFF);
- modes.push_back(PowerMode::ON_SUSPEND);
modes.push_back(PowerMode::ON);
- bool isDozeSupported;
- EXPECT_TRUE(mComposerClient->getDozeSupport(mPrimaryDisplay, &isDozeSupported).isOk());
+ if (isSuspendSupported) {
+ modes.push_back(PowerMode::ON_SUSPEND);
+ }
+
if (isDozeSupported) {
modes.push_back(PowerMode::DOZE);
+ }
+
+ if (isSuspendSupported && isDozeSupported) {
modes.push_back(PowerMode::DOZE_SUSPEND);
}
@@ -1059,6 +1060,14 @@
}
TEST_P(GraphicsComposerAidlTest, SetPowerModeVariations) {
+ std::vector<DisplayCapability> capabilities;
+ const auto error = mComposerClient->getDisplayCapabilities(mPrimaryDisplay, &capabilities);
+ ASSERT_TRUE(error.isOk());
+ const bool isDozeSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::DOZE) != capabilities.end();
+ const bool isSuspendSupported = std::find(capabilities.begin(), capabilities.end(),
+ DisplayCapability::SUSPEND) != capabilities.end();
+
std::vector<PowerMode> modes;
modes.push_back(PowerMode::OFF);
@@ -1083,15 +1092,15 @@
}
modes.clear();
- modes.push_back(PowerMode::ON_SUSPEND);
- modes.push_back(PowerMode::ON_SUSPEND);
- for (auto mode : modes) {
- EXPECT_TRUE(mComposerClient->setPowerMode(mPrimaryDisplay, mode).isOk());
+ if (isSuspendSupported) {
+ modes.push_back(PowerMode::ON_SUSPEND);
+ modes.push_back(PowerMode::ON_SUSPEND);
+ for (auto mode : modes) {
+ EXPECT_TRUE(mComposerClient->setPowerMode(mPrimaryDisplay, mode).isOk());
+ }
+ modes.clear();
}
- modes.clear();
- bool isDozeSupported = false;
- ASSERT_TRUE(mComposerClient->getDozeSupport(mPrimaryDisplay, &isDozeSupported).isOk());
if (isDozeSupported) {
modes.push_back(PowerMode::DOZE);
modes.push_back(PowerMode::DOZE);
@@ -1099,12 +1108,15 @@
EXPECT_TRUE(mComposerClient->setPowerMode(mPrimaryDisplay, mode).isOk());
}
modes.clear();
+ }
+ if (isSuspendSupported && isDozeSupported) {
modes.push_back(PowerMode::DOZE_SUSPEND);
modes.push_back(PowerMode::DOZE_SUSPEND);
for (auto mode : modes) {
EXPECT_TRUE(mComposerClient->setPowerMode(mPrimaryDisplay, mode).isOk());
}
+ modes.clear();
}
}
@@ -1168,7 +1180,7 @@
return;
}
- std::vector<command::CommandResultPayload> results;
+ std::vector<CommandResultPayload> results;
const auto status = mComposerClient->executeCommands(commands, &results);
ASSERT_TRUE(status.isOk()) << "executeCommands failed " << status.getDescription();
@@ -1251,7 +1263,7 @@
int64_t layer = 0;
ASSERT_NO_FATAL_FAILURE(layer = createLayer(display));
{
- auto buffer = allocate();
+ const auto buffer = allocate();
ASSERT_NE(nullptr, buffer);
ASSERT_EQ(::android::OK, buffer->initCheck());
ASSERT_NE(nullptr, buffer->handle);
@@ -1280,7 +1292,7 @@
}
{
- auto buffer = allocate();
+ const auto buffer = allocate();
ASSERT_NE(nullptr, buffer->handle);
mWriter.setLayerBuffer(display.get(), layer, 0, buffer->handle, -1);
@@ -1442,7 +1454,8 @@
kBufferSlotCount, &display)
.isOk());
- auto handle = allocate()->handle;
+ const auto buffer = allocate();
+ const auto handle = buffer->handle;
mWriter.setOutputBuffer(display.display, 0, handle, -1);
execute();
}
@@ -1488,7 +1501,8 @@
for (auto intent : renderIntents) {
mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::NATIVE, intent);
- auto handle = allocate()->handle;
+ const auto buffer = allocate();
+ const auto handle = buffer->handle;
ASSERT_NE(nullptr, handle);
Rect displayFrame{0, 0, mDisplayWidth, mDisplayHeight};
@@ -1523,7 +1537,8 @@
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
- auto handle2 = allocate()->handle;
+ const auto buffer2 = allocate();
+ const auto handle2 = buffer2->handle;
ASSERT_NE(nullptr, handle2);
mWriter.setLayerBuffer(mPrimaryDisplay, layer, 0, handle2, -1);
mWriter.setLayerSurfaceDamage(mPrimaryDisplay, layer, std::vector<Rect>(1, {0, 0, 10, 10}));
@@ -1537,7 +1552,8 @@
int64_t layer;
EXPECT_TRUE(mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount, &layer).isOk());
- auto handle = allocate()->handle;
+ const auto buffer = allocate();
+ const auto handle = buffer->handle;
ASSERT_NE(nullptr, handle);
Rect displayFrame{0, 0, mDisplayWidth, mDisplayHeight};
@@ -1576,7 +1592,8 @@
}
TEST_P(GraphicsComposerAidlCommandTest, SET_LAYER_BUFFER) {
- auto handle = allocate()->handle;
+ const auto buffer = allocate();
+ const auto handle = buffer->handle;
ASSERT_NE(nullptr, handle);
int64_t layer;
@@ -1696,7 +1713,8 @@
return;
}
- auto handle = allocate()->handle;
+ const auto buffer = allocate();
+ const auto handle = buffer->handle;
ASSERT_NE(nullptr, handle);
int64_t layer;
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/command-buffer.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/command-buffer.h
index b586e7f..fcf2a34 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/command-buffer.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/command-buffer.h
@@ -37,8 +37,8 @@
#include <aidl/android/hardware/graphics/composer3/PerFrameMetadata.h>
#include <aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.h>
-#include <aidl/android/hardware/graphics/composer3/command/CommandPayload.h>
-#include <aidl/android/hardware/graphics/composer3/command/CommandResultPayload.h>
+#include <aidl/android/hardware/graphics/composer3/CommandResultPayload.h>
+#include <aidl/android/hardware/graphics/composer3/DisplayCommand.h>
#include <aidl/android/hardware/graphics/common/ColorTransform.h>
#include <aidl/android/hardware/graphics/common/FRect.h>
@@ -79,14 +79,14 @@
}
void setError(int32_t index, int32_t errorCode) {
- command::Error error;
+ CommandError error;
error.commandIndex = index;
error.errorCode = errorCode;
mCommandsResults.emplace_back(std::move(error));
}
- void setPresentOrValidateResult(int64_t display, command::PresentOrValidate::Result result) {
- command::PresentOrValidate presentOrValidate;
+ void setPresentOrValidateResult(int64_t display, PresentOrValidate::Result result) {
+ PresentOrValidate presentOrValidate;
presentOrValidate.display = display;
presentOrValidate.result = result;
mCommandsResults.emplace_back(std::move(presentOrValidate));
@@ -94,12 +94,11 @@
void setChangedCompositionTypes(int64_t display, const std::vector<int64_t>& layers,
const std::vector<Composition>& types) {
- command::ChangedCompositionTypes changedCompositionTypes;
+ ChangedCompositionTypes changedCompositionTypes;
changedCompositionTypes.display = display;
changedCompositionTypes.layers.reserve(layers.size());
for (int i = 0; i < layers.size(); i++) {
- auto layer = command::ChangedCompositionTypes::Layer{.layer = layers[i],
- .composition = types[i]};
+ auto layer = ChangedCompositionLayer{.layer = layers[i], .composition = types[i]};
changedCompositionTypes.layers.emplace_back(std::move(layer));
}
mCommandsResults.emplace_back(std::move(changedCompositionTypes));
@@ -108,13 +107,13 @@
void setDisplayRequests(int64_t display, int32_t displayRequestMask,
const std::vector<int64_t>& layers,
const std::vector<int32_t>& layerRequestMasks) {
- command::DisplayRequest displayRequest;
+ DisplayRequest displayRequest;
displayRequest.display = display;
displayRequest.mask = displayRequestMask;
displayRequest.layerRequests.reserve(layers.size());
for (int i = 0; i < layers.size(); i++) {
- auto layerRequest = command::DisplayRequest::LayerRequest{.layer = layers[i],
- .mask = layerRequestMasks[i]};
+ auto layerRequest =
+ DisplayRequest::LayerRequest{.layer = layers[i], .mask = layerRequestMasks[i]};
displayRequest.layerRequests.emplace_back(std::move(layerRequest));
}
mCommandsResults.emplace_back(std::move(displayRequest));
@@ -122,7 +121,7 @@
void setPresentFence(int64_t display, ::ndk::ScopedFileDescriptor presentFence) {
if (presentFence.get() >= 0) {
- command::PresentFence presentFenceCommand;
+ PresentFence presentFenceCommand;
presentFenceCommand.fence = std::move(presentFence);
presentFenceCommand.display = display;
mCommandsResults.emplace_back(std::move(presentFenceCommand));
@@ -133,11 +132,11 @@
void setReleaseFences(int64_t display, const std::vector<int64_t>& layers,
std::vector<::ndk::ScopedFileDescriptor> releaseFences) {
- command::ReleaseFences releaseFencesCommand;
+ ReleaseFences releaseFencesCommand;
releaseFencesCommand.display = display;
for (int i = 0; i < layers.size(); i++) {
if (releaseFences[i].get() >= 0) {
- command::ReleaseFences::Layer layer;
+ ReleaseFences::Layer layer;
layer.layer = layers[i];
layer.fence = std::move(releaseFences[i]);
releaseFencesCommand.layers.emplace_back(std::move(layer));
@@ -150,7 +149,7 @@
void setClientTargetProperty(int64_t display, const ClientTargetProperty& clientTargetProperty,
float whitePointNits) {
- command::ClientTargetPropertyWithNits clientTargetPropertyWithNits;
+ ClientTargetPropertyWithNits clientTargetPropertyWithNits;
clientTargetPropertyWithNits.display = display;
clientTargetPropertyWithNits.clientTargetProperty = clientTargetProperty;
clientTargetPropertyWithNits.whitePointNits = whitePointNits;
@@ -158,7 +157,7 @@
}
void setColorTransform(int64_t display, const float* matrix, ColorTransform hint) {
- command::ColorTransformPayload colorTransformPayload;
+ ColorTransformPayload colorTransformPayload;
colorTransformPayload.matrix.assign(matrix, matrix + 16);
colorTransformPayload.hint = hint;
getDisplayCommand(display).colorTransform.emplace(std::move(colorTransformPayload));
@@ -166,7 +165,7 @@
void setClientTarget(int64_t display, uint32_t slot, const native_handle_t* target,
int acquireFence, Dataspace dataspace, const std::vector<Rect>& damage) {
- command::ClientTarget clientTargetCommand;
+ ClientTarget clientTargetCommand;
clientTargetCommand.buffer = getBuffer(slot, target, acquireFence);
clientTargetCommand.dataspace = dataspace;
clientTargetCommand.damage.assign(damage.begin(), damage.end());
@@ -208,7 +207,7 @@
}
void setLayerBlendMode(int64_t display, int64_t layer, BlendMode mode) {
- command::ParcelableBlendMode parcelableBlendMode;
+ ParcelableBlendMode parcelableBlendMode;
parcelableBlendMode.blendMode = mode;
getLayerCommand(display, layer).blendMode.emplace(std::move(parcelableBlendMode));
}
@@ -218,13 +217,13 @@
}
void setLayerCompositionType(int64_t display, int64_t layer, Composition type) {
- command::ParcelableComposition compositionPayload;
+ ParcelableComposition compositionPayload;
compositionPayload.composition = type;
getLayerCommand(display, layer).composition.emplace(std::move(compositionPayload));
}
void setLayerDataspace(int64_t display, int64_t layer, Dataspace dataspace) {
- command::ParcelableDataspace dataspacePayload;
+ ParcelableDataspace dataspacePayload;
dataspacePayload.dataspace = dataspace;
getLayerCommand(display, layer).dataspace.emplace(std::move(dataspacePayload));
}
@@ -234,7 +233,7 @@
}
void setLayerPlaneAlpha(int64_t display, int64_t layer, float alpha) {
- command::PlaneAlpha planeAlpha;
+ PlaneAlpha planeAlpha;
planeAlpha.alpha = alpha;
getLayerCommand(display, layer).planeAlpha.emplace(std::move(planeAlpha));
}
@@ -250,7 +249,7 @@
}
void setLayerTransform(int64_t display, int64_t layer, Transform transform) {
- command::ParcelableTransform transformPayload;
+ ParcelableTransform transformPayload;
transformPayload.transform = transform;
getLayerCommand(display, layer).transform.emplace(std::move(transformPayload));
}
@@ -260,7 +259,7 @@
}
void setLayerZOrder(int64_t display, int64_t layer, uint32_t z) {
- command::ZOrder zorder;
+ ZOrder zorder;
zorder.z = z;
getLayerCommand(display, layer).z.emplace(std::move(zorder));
}
@@ -287,7 +286,7 @@
void setLayerGenericMetadata(int64_t display, int64_t layer, const std::string& key,
const bool mandatory, const std::vector<uint8_t>& value) {
- command::GenericMetadata metadata;
+ GenericMetadata metadata;
metadata.key.name = key;
metadata.key.mandatory = mandatory;
metadata.value.assign(value.begin(), value.end());
@@ -296,60 +295,64 @@
void setLayerWhitePointNits(int64_t display, int64_t layer, float whitePointNits) {
getLayerCommand(display, layer)
- .whitePointNits.emplace(command::WhitePointNits{.nits = whitePointNits});
+ .whitePointNits.emplace(WhitePointNits{.nits = whitePointNits});
}
- const std::vector<command::CommandPayload>& getPendingCommands() {
- if (mLayerCommand.has_value()) {
- mCommands.emplace_back(std::move(*mLayerCommand));
- mLayerCommand.reset();
- }
- if (mDisplayCommand.has_value()) {
- mCommands.emplace_back(std::move(*mDisplayCommand));
- mDisplayCommand.reset();
- }
+ const std::vector<DisplayCommand>& getPendingCommands() {
+ flushLayerCommand();
+ flushDisplayCommand();
return mCommands;
}
- std::vector<command::CommandResultPayload> getPendingCommandResults() {
+ std::vector<CommandResultPayload> getPendingCommandResults() {
return std::move(mCommandsResults);
}
protected:
- command::Buffer getBuffer(int slot, const native_handle_t* bufferHandle, int fence) {
- command::Buffer bufferCommand;
+ Buffer getBuffer(int slot, const native_handle_t* bufferHandle, int fence) {
+ Buffer bufferCommand;
bufferCommand.slot = slot;
if (bufferHandle) bufferCommand.handle.emplace(::android::dupToAidl(bufferHandle));
if (fence > 0) bufferCommand.fence = ::ndk::ScopedFileDescriptor(fence);
return bufferCommand;
}
- std::optional<command::DisplayCommand> mDisplayCommand;
- std::optional<command::LayerCommand> mLayerCommand;
- std::vector<command::CommandPayload> mCommands;
- std::vector<command::CommandResultPayload> mCommandsResults;
+ std::optional<DisplayCommand> mDisplayCommand;
+ std::optional<LayerCommand> mLayerCommand;
+ std::vector<DisplayCommand> mCommands;
+ std::vector<CommandResultPayload> mCommandsResults;
private:
- // std::vector<native_handle_t*> mTemporaryHandles;
+ void flushLayerCommand() {
+ if (mLayerCommand.has_value()) {
+ mDisplayCommand->layers.emplace_back(std::move(*mLayerCommand));
+ mLayerCommand.reset();
+ }
+ }
- command::DisplayCommand& getDisplayCommand(int64_t display) {
+ void flushDisplayCommand() {
+ if (mDisplayCommand.has_value()) {
+ mCommands.emplace_back(std::move(*mDisplayCommand));
+ mDisplayCommand.reset();
+ }
+ }
+
+ DisplayCommand& getDisplayCommand(int64_t display) {
if (!mDisplayCommand.has_value() || mDisplayCommand->display != display) {
- if (mDisplayCommand.has_value()) mCommands.emplace_back(std::move(*mDisplayCommand));
+ flushLayerCommand();
+ flushDisplayCommand();
mDisplayCommand.emplace();
mDisplayCommand->display = display;
- return *mDisplayCommand;
}
return *mDisplayCommand;
}
- command::LayerCommand& getLayerCommand(int64_t display, int64_t layer) {
- if (!mLayerCommand.has_value() || mLayerCommand->display != display ||
- mLayerCommand->layer != layer) {
- if (mLayerCommand.has_value()) mCommands.emplace_back(std::move(*mLayerCommand));
+ LayerCommand& getLayerCommand(int64_t display, int64_t layer) {
+ getDisplayCommand(display);
+ if (!mLayerCommand.has_value() || mLayerCommand->layer != layer) {
+ flushLayerCommand();
mLayerCommand.emplace();
- mLayerCommand->display = display;
mLayerCommand->layer = layer;
- return *mLayerCommand;
}
return *mLayerCommand;
}
@@ -361,45 +364,41 @@
// Parse and execute commands from the command queue. The commands are
// actually return values from the server and will be saved in ReturnData.
- void parse(const std::vector<command::CommandResultPayload>& results) {
+ void parse(const std::vector<CommandResultPayload>& results) {
resetData();
for (const auto& result : results) {
switch (result.getTag()) {
- case command::CommandResultPayload::Tag::error:
- parseSetError(result.get<command::CommandResultPayload::Tag::error>());
+ case CommandResultPayload::Tag::error:
+ parseSetError(result.get<CommandResultPayload::Tag::error>());
break;
- case command::CommandResultPayload::Tag::changedCompositionType:
+ case CommandResultPayload::Tag::changedCompositionTypes:
parseSetChangedCompositionTypes(
- result.get<
- command::CommandResultPayload::Tag::changedCompositionType>());
+ result.get<CommandResultPayload::Tag::changedCompositionTypes>());
break;
- case command::CommandResultPayload::Tag::displayRequest:
+ case CommandResultPayload::Tag::displayRequest:
parseSetDisplayRequests(
- result.get<command::CommandResultPayload::Tag::displayRequest>());
+ result.get<CommandResultPayload::Tag::displayRequest>());
break;
- case command::CommandResultPayload::Tag::presentFence:
- parseSetPresentFence(
- result.get<command::CommandResultPayload::Tag::presentFence>());
+ case CommandResultPayload::Tag::presentFence:
+ parseSetPresentFence(result.get<CommandResultPayload::Tag::presentFence>());
break;
- case command::CommandResultPayload::Tag::releaseFences:
- parseSetReleaseFences(
- result.get<command::CommandResultPayload::Tag::releaseFences>());
+ case CommandResultPayload::Tag::releaseFences:
+ parseSetReleaseFences(result.get<CommandResultPayload::Tag::releaseFences>());
break;
- case command::CommandResultPayload::Tag::presentOrValidateResult:
+ case CommandResultPayload::Tag::presentOrValidateResult:
parseSetPresentOrValidateDisplayResult(
- result.get<
- command::CommandResultPayload::Tag::presentOrValidateResult>());
+ result.get<CommandResultPayload::Tag::presentOrValidateResult>());
break;
- case command::CommandResultPayload::Tag::clientTargetProperty:
+ case CommandResultPayload::Tag::clientTargetProperty:
parseSetClientTargetProperty(
- result.get<command::CommandResultPayload::Tag::clientTargetProperty>());
+ result.get<CommandResultPayload::Tag::clientTargetProperty>());
break;
}
}
}
- std::vector<command::Error> takeErrors() { return std::move(mErrors); }
+ std::vector<CommandError> takeErrors() { return std::move(mErrors); }
bool hasChanges(int64_t display, uint32_t* outNumChangedCompositionTypes,
uint32_t* outNumLayerRequestMasks) const {
@@ -530,10 +529,9 @@
mReturnData.clear();
}
- void parseSetError(const command::Error& error) { mErrors.emplace_back(error); }
+ void parseSetError(const CommandError& error) { mErrors.emplace_back(error); }
- void parseSetChangedCompositionTypes(
- const command::ChangedCompositionTypes& changedCompositionTypes) {
+ void parseSetChangedCompositionTypes(const ChangedCompositionTypes& changedCompositionTypes) {
auto& data = mReturnData[changedCompositionTypes.display];
data.changedLayers.reserve(changedCompositionTypes.layers.size());
@@ -544,7 +542,7 @@
}
}
- void parseSetDisplayRequests(const command::DisplayRequest& displayRequest) {
+ void parseSetDisplayRequests(const DisplayRequest& displayRequest) {
auto& data = mReturnData[displayRequest.display];
data.displayRequests = displayRequest.mask;
@@ -556,7 +554,7 @@
}
}
- void parseSetPresentFence(const command::PresentFence& presentFence) {
+ void parseSetPresentFence(const PresentFence& presentFence) {
auto& data = mReturnData[presentFence.display];
if (data.presentFence >= 0) {
close(data.presentFence);
@@ -564,7 +562,7 @@
data.presentFence = dup(presentFence.fence.get());
}
- void parseSetReleaseFences(const command::ReleaseFences& releaseFences) {
+ void parseSetReleaseFences(const ReleaseFences& releaseFences) {
auto& data = mReturnData[releaseFences.display];
data.releasedLayers.reserve(releaseFences.layers.size());
data.releaseFences.reserve(releaseFences.layers.size());
@@ -574,15 +572,13 @@
}
}
- void parseSetPresentOrValidateDisplayResult(
- const command::PresentOrValidate& presentOrValidate) {
+ void parseSetPresentOrValidateDisplayResult(const PresentOrValidate& presentOrValidate) {
auto& data = mReturnData[presentOrValidate.display];
data.presentOrValidateState =
- presentOrValidate.result == command::PresentOrValidate::Result::Presented ? 1 : 0;
+ presentOrValidate.result == PresentOrValidate::Result::Presented ? 1 : 0;
}
- void parseSetClientTargetProperty(
- const command::ClientTargetPropertyWithNits& clientTargetProperty) {
+ void parseSetClientTargetProperty(const ClientTargetPropertyWithNits& clientTargetProperty) {
auto& data = mReturnData[clientTargetProperty.display];
data.clientTargetProperty.pixelFormat =
clientTargetProperty.clientTargetProperty.pixelFormat;
@@ -611,7 +607,7 @@
float clientTargetWhitePointNits = -1.f;
};
- std::vector<command::Error> mErrors;
+ std::vector<CommandError> mErrors;
std::unordered_map<int64_t, ReturnData> mReturnData;
};
diff --git a/identity/aidl/default/service.cpp b/identity/aidl/default/service.cpp
index c290c08..78f4fbc 100644
--- a/identity/aidl/default/service.cpp
+++ b/identity/aidl/default/service.cpp
@@ -43,7 +43,7 @@
const std::string instance = std::string() + IdentityCredentialStore::descriptor + "/default";
binder_status_t status = AServiceManager_addService(store->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/light/aidl/default/main.cpp b/light/aidl/default/main.cpp
index a860bf4..54e1316 100644
--- a/light/aidl/default/main.cpp
+++ b/light/aidl/default/main.cpp
@@ -28,7 +28,7 @@
const std::string instance = std::string() + Lights::descriptor + "/default";
binder_status_t status = AServiceManager_addService(lights->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reached
diff --git a/memtrack/aidl/default/main.cpp b/memtrack/aidl/default/main.cpp
index d063d2a..5cf5f94 100644
--- a/memtrack/aidl/default/main.cpp
+++ b/memtrack/aidl/default/main.cpp
@@ -29,7 +29,7 @@
const std::string instance = std::string() + Memtrack::descriptor + "/default";
binder_status_t status =
AServiceManager_addService(memtrack->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // Unreachable
diff --git a/oemlock/aidl/default/service.cpp b/oemlock/aidl/default/service.cpp
index af828a0..9fa7d63 100644
--- a/oemlock/aidl/default/service.cpp
+++ b/oemlock/aidl/default/service.cpp
@@ -28,7 +28,7 @@
const std::string instance = std::string() + OemLock::descriptor + "/default";
binder_status_t status = AServiceManager_addService(oemlock->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return -1; // Should never be reached
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
index 8920c01..ba444a7 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/Mode.aidl
@@ -49,4 +49,5 @@
CAMERA_STREAMING_LOW = 12,
CAMERA_STREAMING_MID = 13,
CAMERA_STREAMING_HIGH = 14,
+ GAME_LOADING = 15,
}
diff --git a/power/aidl/android/hardware/power/Mode.aidl b/power/aidl/android/hardware/power/Mode.aidl
index ae113e3..2ebace1 100644
--- a/power/aidl/android/hardware/power/Mode.aidl
+++ b/power/aidl/android/hardware/power/Mode.aidl
@@ -162,4 +162,9 @@
* This hint indicates that camera high resolution stream is being started.
*/
CAMERA_STREAMING_HIGH,
+
+ /**
+ * This mode indicates that the user is waiting for loading in a game.
+ */
+ GAME_LOADING,
}
diff --git a/power/aidl/default/Android.bp b/power/aidl/default/Android.bp
index 9acb9e0..223b9d5 100644
--- a/power/aidl/default/Android.bp
+++ b/power/aidl/default/Android.bp
@@ -30,7 +30,7 @@
shared_libs: [
"libbase",
"libbinder_ndk",
- "android.hardware.power-V2-ndk",
+ "android.hardware.power-V3-ndk",
],
srcs: [
"main.cpp",
diff --git a/power/aidl/default/main.cpp b/power/aidl/default/main.cpp
index 964bd96..306b91b 100644
--- a/power/aidl/default/main.cpp
+++ b/power/aidl/default/main.cpp
@@ -28,7 +28,7 @@
const std::string instance = std::string() + Power::descriptor + "/default";
binder_status_t status = AServiceManager_addService(vib->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/power/aidl/default/power-default.xml b/power/aidl/default/power-default.xml
index 9f56deb..927ba22 100644
--- a/power/aidl/default/power-default.xml
+++ b/power/aidl/default/power-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.power</name>
- <version>2</version>
+ <version>3</version>
<fqname>IPower/default</fqname>
</hal>
</manifest>
diff --git a/power/stats/aidl/default/main.cpp b/power/stats/aidl/default/main.cpp
index 2fe3d2e..9e78247 100644
--- a/power/stats/aidl/default/main.cpp
+++ b/power/stats/aidl/default/main.cpp
@@ -73,7 +73,7 @@
const std::string instance = std::string() + PowerStats::descriptor + "/default";
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index 16433be..c618791 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -68,4 +68,6 @@
oneway void startNetworkScan(in int serial, in android.hardware.radio.network.NetworkScanRequest request);
oneway void stopNetworkScan(in int serial);
oneway void supplyNetworkDepersonalization(in int serial, in String netPin);
+ oneway void setUsageSetting(in int serial, in android.hardware.radio.network.UsageSetting usageSetting);
+ oneway void getUsageSetting(in int serial);
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
index ff95396..8cf4c31 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -67,4 +67,6 @@
oneway void startNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void stopNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void supplyNetworkDepersonalizationResponse(in android.hardware.radio.RadioResponseInfo info, in int remainingRetries);
+ oneway void setUsageSettingResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void getUsageSettingResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.UsageSetting usageSetting);
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
similarity index 85%
copy from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
index 2b25167..7fdf831 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/WhitePointNits.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/UsageSetting.aidl
@@ -1,11 +1,11 @@
-/**
- * Copyright (c) 2021, The Android Open Source Project
+/*
+ * Copyright (C) 2021 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
+ * 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,
@@ -31,8 +31,9 @@
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
-package android.hardware.graphics.composer3.command;
-@VintfStability
-parcelable WhitePointNits {
- float nits;
+package android.hardware.radio.network;
+@Backing(type="int") @VintfStability
+enum UsageSetting {
+ VOICE_CENTRIC = 1,
+ DATA_CENTRIC = 2,
}
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 1081a75..aaf432a 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -27,6 +27,7 @@
import android.hardware.radio.network.RadioAccessSpecifier;
import android.hardware.radio.network.RadioBandMode;
import android.hardware.radio.network.SignalThresholdInfo;
+import android.hardware.radio.network.UsageSetting;
/**
* This interface is used by telephony and telecom to talk to cellular radio for network APIs.
@@ -416,4 +417,25 @@
* Response function is IRadioNetworkResponse.supplyNetworkDepersonalizationResponse()
*/
void supplyNetworkDepersonalization(in int serial, in String netPin);
+
+ /**
+ * Set the UE usage setting for data/voice centric usage.
+ *
+ * <p>Sets the usage setting in accordance with 3gpp 24.301 sec 4.3 and 3gpp 24.501 sec 4.3.
+ * <p>This value must be independently preserved for each SIM; (setting the value is not a
+ * "global" override).
+ *
+ * @param serial Serial number of request.
+ * @param usageSetting the usage setting for the current SIM.
+ */
+ oneway void setUsageSetting(in int serial, in UsageSetting usageSetting);
+
+ /**
+ * Get the UE usage setting for data/voice centric usage.
+ *
+ * <p>Gets the usage setting in accordance with 3gpp 24.301 sec 4.3 and 3gpp 24.501 sec 4.3.
+ *
+ * @param serial Serial number of request.
+ */
+ oneway void getUsageSetting(in int serial);
}
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 429b5a8..30f4221 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -31,6 +31,7 @@
import android.hardware.radio.network.RadioBandMode;
import android.hardware.radio.network.RegStateResult;
import android.hardware.radio.network.SignalStrength;
+import android.hardware.radio.network.UsageSetting;
/**
* Interface declaring response functions to solicited radio requests for network APIs.
@@ -549,4 +550,30 @@
* RadioError:SIM_ABSENT
*/
void supplyNetworkDepersonalizationResponse(in RadioResponseInfo info, in int remainingRetries);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_STATE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:INTERNAL_ERR
+ * RadioError:SIM_ABSENT
+ */
+ oneway void setUsageSettingResponse(in RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error.
+ * @param usageSetting the usage setting for the current SIM.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_STATE
+ * RadioError:INTERNAL_ERR
+ * RadioError:SIM_ABSENT
+ */
+ oneway void getUsageSettingResponse(in RadioResponseInfo info, in UsageSetting usageSetting);
}
diff --git a/radio/aidl/android/hardware/radio/network/UsageSetting.aidl b/radio/aidl/android/hardware/radio/network/UsageSetting.aidl
new file mode 100644
index 0000000..ba8fe93
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/network/UsageSetting.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+package android.hardware.radio.network;
+
+/**
+ * Cellular usage setting with values according to 3gpp 24.301 sec 4.3 and 3gpp 24.501 sec 4.3.
+ *
+ * <p>Also refer to "UE's usage setting" as defined in 3gpp 24.301 section 3.1 and 3gpp 23.221
+ * Annex A.
+ */
+@VintfStability
+@Backing(type="int")
+enum UsageSetting {
+ /**
+ * UE operates in voice-centric mode. Generally speaking, in this mode of operation, the UE
+ * will not remain camped on a cell or attached to a network unless that cell/network provides
+ * voice service.
+ */
+ VOICE_CENTRIC = 1,
+
+ /**
+ * UE operates in data-centric mode. Generally speaking, in this mode of operation, the UE
+ * will not reselect away from a cell/network that only provides data services.
+ */
+ DATA_CENTRIC = 2,
+}
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
index c776fd1..09ae240 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
@@ -88,6 +88,10 @@
::ndk::ScopedAStatus stopNetworkScan(int32_t serial) override;
::ndk::ScopedAStatus supplyNetworkDepersonalization(int32_t serial,
const std::string& netPin) override;
+ ::ndk::ScopedAStatus setUsageSetting(
+ int32_t serial,
+ ::aidl::android::hardware::radio::network::UsageSetting usageSetting) override;
+ ::ndk::ScopedAStatus getUsageSetting(int32_t serial) override;
public:
using RadioCompatBase::RadioCompatBase;
diff --git a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
index af0bc46..5fa1cf5 100644
--- a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
+++ b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
@@ -278,4 +278,19 @@
return ok();
}
+// TODO(b/210498497): is there a cleaner way to send a response back to Android, even though these
+// methods must never be called?
+ScopedAStatus RadioNetwork::setUsageSetting(
+ int32_t ser, ::aidl::android::hardware::radio::network::UsageSetting) {
+ LOG_CALL << ser;
+ LOG(ERROR) << "setUsageSetting is unsupported by HIDL HALs";
+ return ok();
+}
+
+ScopedAStatus RadioNetwork::getUsageSetting(int32_t ser) {
+ LOG_CALL << ser;
+ LOG(ERROR) << "getUsageSetting is unsupported by HIDL HALs";
+ return ok();
+}
+
} // namespace android::hardware::radio::compat
diff --git a/rebootescrow/aidl/default/service.cpp b/rebootescrow/aidl/default/service.cpp
index 8a8086b..dc06c71 100644
--- a/rebootescrow/aidl/default/service.cpp
+++ b/rebootescrow/aidl/default/service.cpp
@@ -34,7 +34,7 @@
auto re = ndk::SharedRefBase::make<RebootEscrow>(rebootEscrowDevicePath);
const std::string instance = std::string() + RebootEscrow::descriptor + "/default";
binder_status_t status = AServiceManager_addService(re->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE;
diff --git a/security/keymint/aidl/Android.bp b/security/keymint/aidl/Android.bp
index 3cf6ff2..dcbe9c1 100644
--- a/security/keymint/aidl/Android.bp
+++ b/security/keymint/aidl/Android.bp
@@ -45,14 +45,14 @@
cc_defaults {
name: "keymint_use_latest_hal_aidl_ndk_static",
static_libs: [
- "android.hardware.security.keymint-V1-ndk",
+ "android.hardware.security.keymint-V2-ndk",
],
}
cc_defaults {
name: "keymint_use_latest_hal_aidl_ndk_shared",
shared_libs: [
- "android.hardware.security.keymint-V1-ndk",
+ "android.hardware.security.keymint-V2-ndk",
],
}
@@ -62,6 +62,6 @@
rust_defaults {
name: "keymint_use_latest_hal_aidl_rust",
rustlibs: [
- "android.hardware.security.keymint-V1-rust",
+ "android.hardware.security.keymint-V2-rust",
],
}
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/EcCurve.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/EcCurve.aidl
index 6b4a9ae..ffc7efe 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/EcCurve.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/EcCurve.aidl
@@ -39,4 +39,5 @@
P_256 = 1,
P_384 = 2,
P_521 = 3,
+ CURVE_25519 = 4,
}
diff --git a/security/keymint/aidl/android/hardware/security/keymint/EcCurve.aidl b/security/keymint/aidl/android/hardware/security/keymint/EcCurve.aidl
index 5b1c10c..e9f81d8 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/EcCurve.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/EcCurve.aidl
@@ -27,4 +27,5 @@
P_256 = 1,
P_384 = 2,
P_521 = 3,
+ CURVE_25519 = 4,
}
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index cd8cfc5..9846ee9 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -93,6 +93,11 @@
* P-521. STRONGBOX IKeyMintDevices must support NIST curve P-256.
* - TRUSTED_ENVIRONMENT IKeyMintDevices must support SHA1, SHA-2 224, SHA-2 256, SHA-2
* 384 and SHA-2 512 digest modes. STRONGBOX IKeyMintDevices must support SHA-2 256.
+ * - TRUSTED_ENVRIONMENT IKeyMintDevices must support curve 25519 for Purpose::SIGN (Ed25519,
+ * as specified in RFC 8032), Purpose::ATTEST_KEY (Ed25519) or for KeyPurpose::AGREE_KEY
+ * (X25519, as specified in RFC 7748). However, a key must have exactly one of these
+ * purpose values; the same key cannot be used for multiple purposes.
+ * STRONGBOX IKeyMintDevices do not support curve 25519.
*
* o AES
*
@@ -287,7 +292,7 @@
* except AGREE_KEY must be supported for RSA keys.
*
* o Tag::DIGEST specifies digest algorithms that may be used with the new key. TEE
- * IKeyMintDevice implementations must support all Digest values (see digest.aidl) for RSA
+ * IKeyMintDevice implementations must support all Digest values (see Digest.aidl) for RSA
* keys. StrongBox IKeyMintDevice implementations must support SHA_2_256.
*
* o Tag::PADDING specifies the padding modes that may be used with the new
@@ -298,13 +303,24 @@
* == ECDSA Keys ==
*
* Tag::EC_CURVE must be provided to generate an ECDSA key. If it is not provided, generateKey
- * must return ErrorCode::UNSUPPORTED_KEY_SIZE. TEE IKeyMintDevice implementations must support
- * all curves. StrongBox implementations must support P_256.
-
+ * must return ErrorCode::UNSUPPORTED_KEY_SIZE or ErrorCode::UNSUPPORTED_EC_CURVE. TEE
+ * IKeyMintDevice implementations must support all required curves. StrongBox implementations
+ * must support P_256 and no other curves.
+ *
* Tag::CERTIFICATE_NOT_BEFORE and Tag::CERTIFICATE_NOT_AFTER must be provided to specify the
* valid date range for the returned X.509 certificate holding the public key. If omitted,
* generateKey must return ErrorCode::MISSING_NOT_BEFORE or ErrorCode::MISSING_NOT_AFTER.
*
+ * Keys with EC_CURVE of EcCurve::CURVE_25519 must have exactly one purpose in the set
+ * {KeyPurpose::SIGN, KeyPurpose::ATTEST_KEY, KeyPurpose::AGREE_KEY}. Key generation with more
+ * than one purpose should be rejected with ErrorCode::INCOMPATIBLE_PURPOSE.
+ * StrongBox implementation do not support CURVE_25519.
+ *
+ * Tag::DIGEST specifies digest algorithms that may be used with the new key. TEE
+ * IKeyMintDevice implementations must support all Digest values (see Digest.aidl) for ECDSA
+ * keys; Ed25519 keys only support Digest::NONE. StrongBox IKeyMintDevice implementations must
+ * support SHA_2_256.
+ *
* == AES Keys ==
*
* Only Tag::KEY_SIZE is required to generate an AES key. If omitted, generateKey must return
diff --git a/security/keymint/aidl/android/hardware/security/keymint/KeyFormat.aidl b/security/keymint/aidl/android/hardware/security/keymint/KeyFormat.aidl
index da3d521..3faef38 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/KeyFormat.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/KeyFormat.aidl
@@ -25,8 +25,10 @@
enum KeyFormat {
/** X.509 certificate format, for public key export. */
X509 = 0,
- /** PCKS#8 format, asymmetric key pair import. */
+ /** PKCS#8 format, asymmetric key pair import. */
PKCS8 = 1,
- /** Raw bytes, for symmetric key import. */
+ /**
+ * Raw bytes, for symmetric key import, and for import of raw asymmetric keys for curve 25519.
+ */
RAW = 3,
}
diff --git a/security/keymint/aidl/android/hardware/security/keymint/KeyPurpose.aidl b/security/keymint/aidl/android/hardware/security/keymint/KeyPurpose.aidl
index e141e55..fd103ef 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/KeyPurpose.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/KeyPurpose.aidl
@@ -44,6 +44,10 @@
AGREE_KEY = 6,
/* Usable as an attestation signing key. Keys with this purpose must not have any other
- * purpose. */
+ * purpose; if they do, key generation/import must be rejected with
+ * ErrorCode::INCOMPATIBLE_PURPOSE. (Rationale: If key also included KeyPurpose::SIGN, then
+ * it could be used to sign arbitrary data, including any tbsCertificate, and so an
+ * attestation produced by the key would have no security properties.)
+ */
ATTEST_KEY = 7,
}
diff --git a/security/keymint/aidl/default/service.cpp b/security/keymint/aidl/default/service.cpp
index 8092e34..dc0c618 100644
--- a/security/keymint/aidl/default/service.cpp
+++ b/security/keymint/aidl/default/service.cpp
@@ -39,7 +39,7 @@
LOG(INFO) << "adding keymint service instance: " << instanceName;
binder_status_t status =
AServiceManager_addService(ser->asBinder().get(), instanceName.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
return ser;
}
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index 73c3820..0fdf48d 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -175,6 +175,24 @@
}
/*
+ * AttestKeyTest.RsaAttestKeyMultiPurposeFail
+ *
+ * This test attempts to create an RSA attestation key that also allows signing.
+ */
+TEST_P(AttestKeyTest, RsaAttestKeyMultiPurposeFail) {
+ vector<uint8_t> attest_key_blob;
+ vector<KeyCharacteristics> attest_key_characteristics;
+ vector<Certificate> attest_key_cert_chain;
+ ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+ GenerateKey(AuthorizationSetBuilder()
+ .RsaSigningKey(2048, 65537)
+ .AttestKey()
+ .SetDefaultValidity(),
+ {} /* attestation signing key */, &attest_key_blob,
+ &attest_key_characteristics, &attest_key_cert_chain));
+}
+
+/*
* AttestKeyTest.RsaAttestedAttestKeys
*
* This test creates an RSA attestation key signed by factory keys, and varifies it can be
@@ -412,6 +430,24 @@
}
/*
+ * AttestKeyTest.EcAttestKeyMultiPurposeFail
+ *
+ * This test attempts to create an EC attestation key that also allows signing.
+ */
+TEST_P(AttestKeyTest, EcAttestKeyMultiPurposeFail) {
+ vector<uint8_t> attest_key_blob;
+ vector<KeyCharacteristics> attest_key_characteristics;
+ vector<Certificate> attest_key_cert_chain;
+ ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+ GenerateKey(AuthorizationSetBuilder()
+ .EcdsaSigningKey(EcCurve::P_256)
+ .AttestKey()
+ .SetDefaultValidity(),
+ {} /* attestation signing key */, &attest_key_blob,
+ &attest_key_characteristics, &attest_key_cert_chain));
+}
+
+/*
* AttestKeyTest.AlternateAttestKeyChaining
*
* This test creates a chain of multiple attest keys, in the order Ec - RSA - Ec - RSA ....
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index c99e1d0..3f33686 100644
--- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
@@ -3151,6 +3151,58 @@
CheckedDeleteKey(&verification_key);
}
+/*
+ * VerificationOperationsTest.HmacVerificationFailsForCorruptSignature
+ *
+ * Verifies HMAC signature verification should fails if message or signature is corrupted.
+ */
+TEST_P(VerificationOperationsTest, HmacVerificationFailsForCorruptSignature) {
+ string key_material = "HelloThisIsAKey";
+
+ vector<uint8_t> signing_key, verification_key;
+ vector<KeyCharacteristics> signing_key_chars, verification_key_chars;
+ EXPECT_EQ(ErrorCode::OK,
+ ImportKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .Authorization(TAG_ALGORITHM, Algorithm::HMAC)
+ .Authorization(TAG_PURPOSE, KeyPurpose::SIGN)
+ .Digest(Digest::SHA_2_256)
+ .Authorization(TAG_MIN_MAC_LENGTH, 160),
+ KeyFormat::RAW, key_material, &signing_key, &signing_key_chars));
+ EXPECT_EQ(ErrorCode::OK,
+ ImportKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .Authorization(TAG_ALGORITHM, Algorithm::HMAC)
+ .Authorization(TAG_PURPOSE, KeyPurpose::VERIFY)
+ .Digest(Digest::SHA_2_256)
+ .Authorization(TAG_MIN_MAC_LENGTH, 160),
+ KeyFormat::RAW, key_material, &verification_key, &verification_key_chars));
+
+ string message = "This is a message.";
+ string signature = SignMessage(
+ signing_key, message,
+ AuthorizationSetBuilder().Digest(Digest::SHA_2_256).Authorization(TAG_MAC_LENGTH, 160));
+
+ AuthorizationSet begin_out_params;
+ ASSERT_EQ(ErrorCode::OK,
+ Begin(KeyPurpose::VERIFY, verification_key,
+ AuthorizationSetBuilder().Digest(Digest::SHA_2_256), &begin_out_params));
+
+ string corruptMessage = "This is b message."; // Corrupted message
+ string output;
+ EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(corruptMessage, signature, &output));
+
+ ASSERT_EQ(ErrorCode::OK,
+ Begin(KeyPurpose::VERIFY, verification_key,
+ AuthorizationSetBuilder().Digest(Digest::SHA_2_256), &begin_out_params));
+
+ signature[0] += 1; // Corrupt a signature
+ EXPECT_EQ(ErrorCode::VERIFICATION_FAILED, Finish(message, signature, &output));
+
+ CheckedDeleteKey(&signing_key);
+ CheckedDeleteKey(&verification_key);
+}
+
INSTANTIATE_KEYMINT_AIDL_TEST(VerificationOperationsTest);
typedef KeyMintAidlTestBase ExportKeyTest;
@@ -3300,6 +3352,26 @@
}
/*
+ * ImportKeyTest.RsaAttestMultiPurposeFail
+ *
+ * Verifies that importing an RSA key pair with purpose ATTEST_KEY+SIGN fails.
+ */
+TEST_P(ImportKeyTest, RsaAttestMultiPurposeFail) {
+ uint32_t key_size = 2048;
+ string key = rsa_2048_key;
+
+ ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+ ImportKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .RsaSigningKey(key_size, 65537)
+ .AttestKey()
+ .Digest(Digest::SHA_2_256)
+ .Padding(PaddingMode::RSA_PSS)
+ .SetDefaultValidity(),
+ KeyFormat::PKCS8, key));
+}
+
+/*
* ImportKeyTest.EcdsaSuccess
*
* Verifies that importing and using an ECDSA P-256 key pair works correctly.
@@ -3418,6 +3490,22 @@
}
/*
+ * ImportKeyTest.EcdsaAttestMultiPurposeFail
+ *
+ * Verifies that importing and using an ECDSA P-256 key pair with purpose ATTEST_KEY+SIGN fails.
+ */
+TEST_P(ImportKeyTest, EcdsaAttestMultiPurposeFail) {
+ ASSERT_EQ(ErrorCode::INCOMPATIBLE_PURPOSE,
+ ImportKey(AuthorizationSetBuilder()
+ .Authorization(TAG_NO_AUTH_REQUIRED)
+ .EcdsaSigningKey(EcCurve::P_256)
+ .AttestKey()
+ .Digest(Digest::SHA_2_256)
+ .SetDefaultValidity(),
+ KeyFormat::PKCS8, ec_256_key));
+}
+
+/*
* ImportKeyTest.AesSuccess
*
* Verifies that importing and using an AES key works.
@@ -6609,7 +6697,7 @@
typedef KeyMintAidlTestBase KeyAgreementTest;
-int CurveToOpenSslCurveName(EcCurve curve) {
+static int EcdhCurveToOpenSslCurveName(EcCurve curve) {
switch (curve) {
case EcCurve::P_224:
return NID_secp224r1;
@@ -6619,6 +6707,8 @@
return NID_secp384r1;
case EcCurve::P_521:
return NID_secp521r1;
+ case EcCurve::CURVE_25519:
+ return NID_X25519;
}
}
@@ -6640,7 +6730,7 @@
for (auto localCurve : ValidCurves()) {
// Generate EC key locally (with access to private key material)
auto ecKey = EC_KEY_Ptr(EC_KEY_new());
- int curveName = CurveToOpenSslCurveName(localCurve);
+ int curveName = EcdhCurveToOpenSslCurveName(localCurve);
auto group = EC_GROUP_Ptr(EC_GROUP_new_by_curve_name(curveName));
ASSERT_NE(group, nullptr);
ASSERT_EQ(EC_KEY_set_group(ecKey.get(), group.get()), 1);
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
index b51e633..8a05dbd 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
@@ -36,6 +36,7 @@
@VintfStability
parcelable DemuxFilterDownloadEvent {
int itemId;
+ int downloadId;
int mpuSequenceNumber;
int itemFragmentIndex;
int lastItemFragmentIndex;
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
index ff06888..86ce646 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
@@ -35,5 +35,6 @@
/* @hide */
@VintfStability
parcelable DemuxFilterDownloadSettings {
+ boolean useDownloadId;
int downloadId;
}
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
index a463d68..993c639 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
@@ -38,6 +38,8 @@
int streamId;
boolean isPtsPresent;
long pts;
+ boolean isDtsPresent;
+ long dts;
long dataLength;
long offset;
android.hardware.common.NativeHandle avMemory;
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
index 01b8a77..199a09c 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
@@ -38,5 +38,5 @@
int tableId;
int version;
int sectionNum;
- int dataLength;
+ long dataLength;
}
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatus.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatus.aidl
index 7677221..c79b751 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatus.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatus.aidl
@@ -74,4 +74,5 @@
boolean isShortFrames;
android.hardware.tv.tuner.FrontendIsdbtMode isdbtMode;
android.hardware.tv.tuner.FrontendIsdbtPartialReceptionFlag partialReceptionFlag;
+ int[] streamIdList;
}
diff --git a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatusType.aidl b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatusType.aidl
index 6342479..9ea3200 100644
--- a/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatusType.aidl
+++ b/tv/tuner/aidl/aidl_api/android.hardware.tv.tuner/current/android/hardware/tv/tuner/FrontendStatusType.aidl
@@ -74,4 +74,5 @@
IS_SHORT_FRAMES = 36,
ISDBT_MODE = 37,
ISDBT_PARTIAL_RECEPTION_FLAG = 38,
+ STREAM_ID_LIST = 39,
}
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
index cf88928..b9df5a0 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadEvent.aidl
@@ -28,6 +28,11 @@
int itemId;
/**
+ * Uniquely identify data content within the same Package ID (PID).
+ */
+ int downloadId;
+
+ /**
* MPU sequence number of filtered data (only for MMTP)
*/
int mpuSequenceNumber;
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
index bd79bd5..1188b03 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterDownloadSettings.aidl
@@ -23,6 +23,11 @@
@VintfStability
parcelable DemuxFilterDownloadSettings {
/**
+ * Whether download ID should be used.
+ */
+ boolean useDownloadId;
+
+ /**
* Download ID (also known as the carousel ID) is carried in the PMT in
* ISO/IEC 13818-1 for the service containing the object carousel.
*/
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
index ec7bbf1..e92b711 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterMediaEvent.aidl
@@ -40,6 +40,16 @@
long pts;
/**
+ * true if DTS is present in the PES header.
+ */
+ boolean isDtsPresent;
+
+ /**
+ * Decode TimeStamp for audio or video frame.
+ */
+ long dts;
+
+ /**
* Data size in bytes of audio or video frame
*/
long dataLength;
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
index d666316..a5f9ca7 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/DemuxFilterSectionEvent.aidl
@@ -40,5 +40,5 @@
/**
* Data size in bytes of filtered data
*/
- int dataLength;
+ long dataLength;
}
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatus.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatus.aidl
index 9302b76..234e183 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatus.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatus.aidl
@@ -202,4 +202,10 @@
* ISDB-T Partial Reception Flag.
*/
FrontendIsdbtPartialReceptionFlag partialReceptionFlag;
+
+ /**
+ * Stream ID list included in a transponder.
+ */
+ int[] streamIdList;
+
}
diff --git a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatusType.aidl b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatusType.aidl
index 103a4ab..7feb72d 100644
--- a/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatusType.aidl
+++ b/tv/tuner/aidl/android/hardware/tv/tuner/FrontendStatusType.aidl
@@ -218,4 +218,9 @@
* ISDB-T Partial Reception Flag.
*/
ISDBT_PARTIAL_RECEPTION_FLAG,
+
+ /**
+ * Stream ID list included in a transponder.
+ */
+ STREAM_ID_LIST,
}
diff --git a/tv/tuner/aidl/default/Demux.cpp b/tv/tuner/aidl/default/Demux.cpp
index 4385461..a94b4ad 100644
--- a/tv/tuner/aidl/default/Demux.cpp
+++ b/tv/tuner/aidl/default/Demux.cpp
@@ -410,6 +410,37 @@
return mIsRecording;
}
+binder_status_t Demux::dump(int fd, const char** args, uint32_t numArgs) {
+ dprintf(fd, " Demux %d:\n", mDemuxId);
+ dprintf(fd, " mIsRecording %d\n", mIsRecording);
+ {
+ dprintf(fd, " Filters:\n");
+ map<int64_t, std::shared_ptr<Filter>>::iterator it;
+ for (it = mFilters.begin(); it != mFilters.end(); it++) {
+ it->second->dump(fd, args, numArgs);
+ }
+ }
+ {
+ dprintf(fd, " TimeFilter:\n");
+ if (mTimeFilter != nullptr) {
+ mTimeFilter->dump(fd, args, numArgs);
+ }
+ }
+ {
+ dprintf(fd, " DvrPlayback:\n");
+ if (mDvrPlayback != nullptr) {
+ mDvrPlayback->dump(fd, args, numArgs);
+ }
+ }
+ {
+ dprintf(fd, " DvrRecord:\n");
+ if (mDvrRecord != nullptr) {
+ mDvrRecord->dump(fd, args, numArgs);
+ }
+ }
+ return STATUS_OK;
+}
+
bool Demux::attachRecordFilter(int64_t filterId) {
if (mFilters[filterId] == nullptr || mDvrRecord == nullptr ||
!mFilters[filterId]->isRecordFilter()) {
diff --git a/tv/tuner/aidl/default/Demux.h b/tv/tuner/aidl/default/Demux.h
index 1b789bd..7f0b0a7 100644
--- a/tv/tuner/aidl/default/Demux.h
+++ b/tv/tuner/aidl/default/Demux.h
@@ -71,6 +71,8 @@
::ndk::ScopedAStatus connectCiCam(int32_t in_ciCamId) override;
::ndk::ScopedAStatus disconnectCiCam() override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
// Functions interacts with Tuner Service
void stopFrontendInput();
::ndk::ScopedAStatus removeFilter(int64_t filterId);
diff --git a/tv/tuner/aidl/default/Dvr.cpp b/tv/tuner/aidl/default/Dvr.cpp
index 4f34b8e..c591d07 100644
--- a/tv/tuner/aidl/default/Dvr.cpp
+++ b/tv/tuner/aidl/default/Dvr.cpp
@@ -177,6 +177,13 @@
return mDvrEventFlag;
}
+binder_status_t Dvr::dump(int fd, const char** /* args */, uint32_t /* numArgs */) {
+ dprintf(fd, " Dvr:\n");
+ dprintf(fd, " mType: %hhd\n", mType);
+ dprintf(fd, " mDvrThreadRunning: %d\n", (bool)mDvrThreadRunning);
+ return STATUS_OK;
+}
+
void Dvr::playbackThreadLoop() {
ALOGD("[Dvr] playback threadLoop start.");
diff --git a/tv/tuner/aidl/default/Dvr.h b/tv/tuner/aidl/default/Dvr.h
index ad8728e..6ff71cd 100644
--- a/tv/tuner/aidl/default/Dvr.h
+++ b/tv/tuner/aidl/default/Dvr.h
@@ -71,6 +71,8 @@
::ndk::ScopedAStatus flush() override;
::ndk::ScopedAStatus close() override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
/**
* To create a DvrMQ and its Event Flag.
*
diff --git a/tv/tuner/aidl/default/Filter.cpp b/tv/tuner/aidl/default/Filter.cpp
index 54037be..769ebe2 100644
--- a/tv/tuner/aidl/default/Filter.cpp
+++ b/tv/tuner/aidl/default/Filter.cpp
@@ -22,6 +22,7 @@
#include <aidl/android/hardware/tv/tuner/DemuxQueueNotifyBits.h>
#include <aidl/android/hardware/tv/tuner/Result.h>
#include <aidlcommonsupport/NativeHandle.h>
+#include <inttypes.h>
#include <utils/Log.h>
#include "Filter.h"
@@ -655,6 +656,17 @@
mSharedAvMemHandle = nullptr;
}
+binder_status_t Filter::dump(int fd, const char** /* args */, uint32_t /* numArgs */) {
+ dprintf(fd, " Filter %" PRIu64 ":\n", mFilterId);
+ dprintf(fd, " Main type: %d\n", mType.mainType);
+ dprintf(fd, " mIsMediaFilter: %d\n", mIsMediaFilter);
+ dprintf(fd, " mIsPcrFilter: %d\n", mIsPcrFilter);
+ dprintf(fd, " mIsRecordFilter: %d\n", mIsRecordFilter);
+ dprintf(fd, " mIsUsingFMQ: %d\n", mIsUsingFMQ);
+ dprintf(fd, " mFilterThreadRunning: %d\n", (bool)mFilterThreadRunning);
+ return STATUS_OK;
+}
+
void Filter::maySendFilterStatusCallback() {
if (!mIsUsingFMQ) {
return;
@@ -1148,6 +1160,7 @@
DemuxFilterMediaEvent mediaEvent;
mediaEvent.streamId = 1;
mediaEvent.isPtsPresent = true;
+ mediaEvent.isDtsPresent = false;
mediaEvent.dataLength = 3;
mediaEvent.offset = 4;
mediaEvent.isSecureMemory = true;
@@ -1238,6 +1251,7 @@
void Filter::createDownloadEvent(vector<DemuxFilterEvent>& events) {
DemuxFilterDownloadEvent download;
download.itemId = 1;
+ download.downloadId = 1;
download.mpuSequenceNumber = 2;
download.itemFragmentIndex = 3;
download.lastItemFragmentIndex = 4;
diff --git a/tv/tuner/aidl/default/Filter.h b/tv/tuner/aidl/default/Filter.h
index 8388c98..e301249 100644
--- a/tv/tuner/aidl/default/Filter.h
+++ b/tv/tuner/aidl/default/Filter.h
@@ -126,6 +126,8 @@
::ndk::ScopedAStatus setDataSource(const std::shared_ptr<IFilter>& in_filter) override;
::ndk::ScopedAStatus setDelayHint(const FilterDelayHint& in_hint) override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
/**
* To create a FilterMQ and its Event Flag.
*
diff --git a/tv/tuner/aidl/default/Frontend.cpp b/tv/tuner/aidl/default/Frontend.cpp
index 77d20e2..a4dde2a 100644
--- a/tv/tuner/aidl/default/Frontend.cpp
+++ b/tv/tuner/aidl/default/Frontend.cpp
@@ -676,6 +676,11 @@
FrontendIsdbtPartialReceptionFlag::AUTO);
break;
}
+ case FrontendStatusType::STREAM_ID_LIST: {
+ vector<int32_t> streamIds = {0, 1};
+ status.set<FrontendStatus::streamIdList>(streamIds);
+ break;
+ }
default: {
continue;
}
@@ -718,6 +723,14 @@
return ::ndk::ScopedAStatus::ok();
}
+binder_status_t Frontend::dump(int fd, const char** /* args */, uint32_t /* numArgs */) {
+ dprintf(fd, " Frontend %d\n", mId);
+ dprintf(fd, " mType: %d\n", mType);
+ dprintf(fd, " mIsLocked: %d\n", mIsLocked);
+ dprintf(fd, " mCiCamId: %d\n", mCiCamId);
+ return STATUS_OK;
+}
+
FrontendType Frontend::getFrontendType() {
return mType;
}
diff --git a/tv/tuner/aidl/default/Frontend.h b/tv/tuner/aidl/default/Frontend.h
index 3c602cf..5e7b10c 100644
--- a/tv/tuner/aidl/default/Frontend.h
+++ b/tv/tuner/aidl/default/Frontend.h
@@ -50,6 +50,8 @@
::ndk::ScopedAStatus linkCiCam(int32_t in_ciCamId, int32_t* _aidl_return) override;
::ndk::ScopedAStatus unlinkCiCam(int32_t in_ciCamId) override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
FrontendType getFrontendType();
int32_t getFrontendId();
string getSourceFile();
diff --git a/tv/tuner/aidl/default/TimeFilter.cpp b/tv/tuner/aidl/default/TimeFilter.cpp
index dde7be3..9611ed9 100644
--- a/tv/tuner/aidl/default/TimeFilter.cpp
+++ b/tv/tuner/aidl/default/TimeFilter.cpp
@@ -83,6 +83,12 @@
return ::ndk::ScopedAStatus::ok();
}
+binder_status_t TimeFilter::dump(int fd, const char** /* args */, uint32_t /* numArgs */) {
+ dprintf(fd, " TimeFilter:\n");
+ dprintf(fd, " mTimeStamp: %" PRIu64 "\n", mTimeStamp);
+ return STATUS_OK;
+}
+
} // namespace tuner
} // namespace tv
} // namespace hardware
diff --git a/tv/tuner/aidl/default/TimeFilter.h b/tv/tuner/aidl/default/TimeFilter.h
index ff35c47..5f4c2d4 100644
--- a/tv/tuner/aidl/default/TimeFilter.h
+++ b/tv/tuner/aidl/default/TimeFilter.h
@@ -44,8 +44,10 @@
::ndk::ScopedAStatus getSourceTime(int64_t* _aidl_return) override;
::ndk::ScopedAStatus close() override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
private:
- std::shared_ptr<Demux> mDemux;
+ ::std::shared_ptr<Demux> mDemux;
uint64_t mTimeStamp = INVALID_TIME_STAMP;
time_t mBeginTime;
};
diff --git a/tv/tuner/aidl/default/Tuner.cpp b/tv/tuner/aidl/default/Tuner.cpp
index badb08f..96e83bb 100644
--- a/tv/tuner/aidl/default/Tuner.cpp
+++ b/tv/tuner/aidl/default/Tuner.cpp
@@ -55,9 +55,13 @@
capsIsdbs.set<FrontendCapabilities::Tag::isdbsCaps>(FrontendIsdbsCapabilities());
mFrontendCaps[0] = capsIsdbs;
statusCaps = {
- FrontendStatusType::DEMOD_LOCK, FrontendStatusType::SNR,
- FrontendStatusType::FEC, FrontendStatusType::MODULATION,
- FrontendStatusType::MODULATIONS, FrontendStatusType::ROLL_OFF,
+ FrontendStatusType::DEMOD_LOCK,
+ FrontendStatusType::SNR,
+ FrontendStatusType::FEC,
+ FrontendStatusType::MODULATION,
+ FrontendStatusType::MODULATIONS,
+ FrontendStatusType::ROLL_OFF,
+ FrontendStatusType::STREAM_ID_LIST,
};
mFrontendStatusCaps[0] = statusCaps;
@@ -169,7 +173,7 @@
statusCaps = {
FrontendStatusType::DEMOD_LOCK, FrontendStatusType::MODULATION,
FrontendStatusType::MODULATIONS, FrontendStatusType::ROLL_OFF,
- FrontendStatusType::IS_SHORT_FRAMES,
+ FrontendStatusType::IS_SHORT_FRAMES, FrontendStatusType::STREAM_ID_LIST,
};
mFrontendStatusCaps[8] = statusCaps;
@@ -313,6 +317,33 @@
return ::ndk::ScopedAStatus::ok();
}
+binder_status_t Tuner::dump(int fd, const char** args, uint32_t numArgs) {
+ ALOGV("%s", __FUNCTION__);
+ {
+ dprintf(fd, "Frontends:\n");
+ for (int i = 0; i < mFrontendSize; i++) {
+ mFrontends[i]->dump(fd, args, numArgs);
+ for (int j = 0; j < mFrontendStatusCaps[i].size(); j++) {
+ dprintf(fd, " statusCap: %d\n", mFrontendStatusCaps[i][j]);
+ }
+ }
+ }
+ {
+ dprintf(fd, "Demuxs:\n");
+ map<int32_t, std::shared_ptr<Demux>>::iterator it;
+ for (it = mDemuxes.begin(); it != mDemuxes.end(); it++) {
+ it->second->dump(fd, args, numArgs);
+ }
+ }
+ {
+ dprintf(fd, "Lnbs:\n");
+ for (int i = 0; i < mLnbs.size(); i++) {
+ mLnbs[i]->dump(fd, args, numArgs);
+ }
+ }
+ return STATUS_OK;
+}
+
void Tuner::setFrontendAsDemuxSource(int32_t frontendId, int32_t demuxId) {
mFrontendToDemux[frontendId] = demuxId;
if (mFrontends[frontendId] != nullptr && mFrontends[frontendId]->isLocked()) {
@@ -332,6 +363,10 @@
}
void Tuner::removeFrontend(int32_t frontendId) {
+ map<int32_t, int32_t>::iterator it = mFrontendToDemux.find(frontendId);
+ if (it != mFrontendToDemux.end()) {
+ mDemuxes.erase(it->second);
+ }
mFrontendToDemux.erase(frontendId);
}
diff --git a/tv/tuner/aidl/default/Tuner.h b/tv/tuner/aidl/default/Tuner.h
index 7af7ab8..682496c 100644
--- a/tv/tuner/aidl/default/Tuner.h
+++ b/tv/tuner/aidl/default/Tuner.h
@@ -57,6 +57,8 @@
std::vector<int32_t>* out_lnbId,
std::shared_ptr<ILnb>* _aidl_return) override;
+ binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
+
std::shared_ptr<Frontend> getFrontendById(int32_t frontendId);
void setFrontendAsDemuxSource(int32_t frontendId, int32_t demuxId);
void frontendStartTune(int32_t frontendId);
diff --git a/tv/tuner/aidl/vts/functional/FrontendTests.cpp b/tv/tuner/aidl/vts/functional/FrontendTests.cpp
index 6204803..12b1f33 100644
--- a/tv/tuner/aidl/vts/functional/FrontendTests.cpp
+++ b/tv/tuner/aidl/vts/functional/FrontendTests.cpp
@@ -398,6 +398,13 @@
expectStatuses[i].get<FrontendStatus::Tag::partialReceptionFlag>());
break;
}
+ case FrontendStatusType::STREAM_ID_LIST: {
+ ASSERT_TRUE(std::equal(
+ realStatuses[i].get<FrontendStatus::Tag::streamIdList>().begin(),
+ realStatuses[i].get<FrontendStatus::Tag::streamIdList>().end(),
+ expectStatuses[i].get<FrontendStatus::Tag::streamIdList>().begin()));
+ break;
+ }
default: {
continue;
}
diff --git a/vibrator/aidl/default/main.cpp b/vibrator/aidl/default/main.cpp
index bd834d2..feba2c7 100644
--- a/vibrator/aidl/default/main.cpp
+++ b/vibrator/aidl/default/main.cpp
@@ -31,14 +31,14 @@
auto vib = ndk::SharedRefBase::make<Vibrator>();
const std::string vibName = std::string() + Vibrator::descriptor + "/default";
binder_status_t status = AServiceManager_addService(vib->asBinder().get(), vibName.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
// make the vibrator manager service with a different vibrator
auto managedVib = ndk::SharedRefBase::make<Vibrator>();
auto vibManager = ndk::SharedRefBase::make<VibratorManager>(std::move(managedVib));
const std::string vibManagerName = std::string() + VibratorManager::descriptor + "/default";
status = AServiceManager_addService(vibManager->asBinder().get(), vibManagerName.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
diff --git a/weaver/aidl/default/service.cpp b/weaver/aidl/default/service.cpp
index 1495bc9..2099ffd 100644
--- a/weaver/aidl/default/service.cpp
+++ b/weaver/aidl/default/service.cpp
@@ -28,7 +28,7 @@
const std::string instance = std::string() + Weaver::descriptor + "/default";
binder_status_t status = AServiceManager_addService(weaver->asBinder().get(), instance.c_str());
- CHECK(status == STATUS_OK);
+ CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return -1; // Should never be reached