Merge changes from topic "usage-setting-hal"
* changes:
UsageSetting Compat Stubs
Add UsageSetting to IRadioNetwork
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
index 46a526c..cab184b 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/include/FakeVehicleHardware.h
@@ -39,14 +39,6 @@
class FakeVehicleHardware final : public IVehicleHardware {
public:
- using SetValuesCallback = std::function<void(
- const std::vector<::aidl::android::hardware::automotive::vehicle::SetValueResult>&)>;
- using GetValuesCallback = std::function<void(
- const std::vector<::aidl::android::hardware::automotive::vehicle::GetValueResult>&)>;
- using OnPropertyChangeCallback = std::function<void(
- const std::vector<::aidl::android::hardware::automotive::vehicle::VehiclePropValue>&)>;
- using OnPropertySetErrorCallback = std::function<void(const std::vector<SetValueErrorEvent>&)>;
-
FakeVehicleHardware();
explicit FakeVehicleHardware(std::unique_ptr<VehiclePropValuePool> valuePool);
@@ -59,7 +51,7 @@
// are sent to vehicle bus or before property set confirmation is received. The callback is
// safe to be called after the function returns and is safe to be called in a different thread.
::aidl::android::hardware::automotive::vehicle::StatusCode setValues(
- SetValuesCallback&& callback,
+ std::shared_ptr<const SetValuesCallback> callback,
const std::vector<::aidl::android::hardware::automotive::vehicle::SetValueRequest>&
requests) override;
@@ -67,7 +59,7 @@
// The callback is safe to be called after the function returns and is safe to be called in a
// different thread.
::aidl::android::hardware::automotive::vehicle::StatusCode getValues(
- GetValuesCallback&& callback,
+ std::shared_ptr<const GetValuesCallback> callback,
const std::vector<::aidl::android::hardware::automotive::vehicle::GetValueRequest>&
requests) const override;
@@ -78,11 +70,13 @@
::aidl::android::hardware::automotive::vehicle::StatusCode checkHealth() override;
// Register a callback that would be called when there is a property change event from vehicle.
- void registerOnPropertyChangeEvent(OnPropertyChangeCallback&& callback) override;
+ void registerOnPropertyChangeEvent(
+ std::unique_ptr<const PropertyChangeCallback> callback) override;
// Register a callback that would be called when there is a property set error event from
// vehicle.
- void registerOnPropertySetErrorEvent(OnPropertySetErrorCallback&& callback) override;
+ void registerOnPropertySetErrorEvent(
+ std::unique_ptr<const PropertySetErrorCallback> callback) override;
private:
// Expose private methods to unit test.
@@ -94,8 +88,10 @@
const std::unique_ptr<obd2frame::FakeObd2Frame> mFakeObd2Frame;
const std::unique_ptr<FakeUserHal> mFakeUserHal;
std::mutex mCallbackLock;
- OnPropertyChangeCallback mOnPropertyChangeCallback GUARDED_BY(mCallbackLock);
- OnPropertySetErrorCallback mOnPropertySetErrorCallback GUARDED_BY(mCallbackLock);
+ std::unique_ptr<const PropertyChangeCallback> mOnPropertyChangeCallback
+ GUARDED_BY(mCallbackLock);
+ std::unique_ptr<const PropertySetErrorCallback> mOnPropertySetErrorCallback
+ GUARDED_BY(mCallbackLock);
void init();
// Stores the initial value to property store.
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
index 5b2003e..e75f0e7 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/src/FakeVehicleHardware.cpp
@@ -379,7 +379,7 @@
return {};
}
-StatusCode FakeVehicleHardware::setValues(FakeVehicleHardware::SetValuesCallback&& callback,
+StatusCode FakeVehicleHardware::setValues(std::shared_ptr<const SetValuesCallback> callback,
const std::vector<SetValueRequest>& requests) {
std::vector<VehiclePropValue> updatedValues;
std::vector<SetValueResult> results;
@@ -424,12 +424,12 @@
// In the real vhal, the values will be sent to Car ECU. We just pretend it is done here and
// send back the updated property values to client.
- callback(std::move(results));
+ (*callback)(std::move(results));
return StatusCode::OK;
}
-StatusCode FakeVehicleHardware::getValues(FakeVehicleHardware::GetValuesCallback&& callback,
+StatusCode FakeVehicleHardware::getValues(std::shared_ptr<const GetValuesCallback> callback,
const std::vector<GetValueRequest>& requests) const {
std::vector<GetValueResult> results;
for (auto& request : requests) {
@@ -471,7 +471,7 @@
results.push_back(std::move(getValueResult));
}
- callback(std::move(results));
+ (*callback)(std::move(results));
return StatusCode::OK;
}
@@ -487,23 +487,28 @@
return StatusCode::OK;
}
-void FakeVehicleHardware::registerOnPropertyChangeEvent(OnPropertyChangeCallback&& callback) {
+void FakeVehicleHardware::registerOnPropertyChangeEvent(
+ std::unique_ptr<const PropertyChangeCallback> callback) {
std::scoped_lock<std::mutex> lockGuard(mCallbackLock);
mOnPropertyChangeCallback = std::move(callback);
}
-void FakeVehicleHardware::registerOnPropertySetErrorEvent(OnPropertySetErrorCallback&& callback) {
+void FakeVehicleHardware::registerOnPropertySetErrorEvent(
+ std::unique_ptr<const PropertySetErrorCallback> callback) {
std::scoped_lock<std::mutex> lockGuard(mCallbackLock);
mOnPropertySetErrorCallback = std::move(callback);
}
void FakeVehicleHardware::onValueChangeCallback(const VehiclePropValue& value) {
std::scoped_lock<std::mutex> lockGuard(mCallbackLock);
- if (mOnPropertyChangeCallback != nullptr) {
- std::vector<VehiclePropValue> updatedValues;
- updatedValues.push_back(value);
- mOnPropertyChangeCallback(std::move(updatedValues));
+
+ if (mOnPropertyChangeCallback == nullptr) {
+ return;
}
+
+ std::vector<VehiclePropValue> updatedValues;
+ updatedValues.push_back(value);
+ (*mOnPropertyChangeCallback)(std::move(updatedValues));
}
void FakeVehicleHardware::maybeOverrideProperties(const char* overrideDir) {
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index 88834f3..f8df6e6 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -76,24 +76,25 @@
class FakeVehicleHardwareTest : public ::testing::Test {
protected:
void SetUp() override {
- getHardware()->registerOnPropertyChangeEvent(
+ auto callback = std::make_unique<IVehicleHardware::PropertyChangeCallback>(
[this](const std::vector<VehiclePropValue>& values) {
- return onPropertyChangeEvent(values);
+ onPropertyChangeEvent(values);
});
+ getHardware()->registerOnPropertyChangeEvent(std::move(callback));
+ mSetValuesCallback = std::make_shared<IVehicleHardware::SetValuesCallback>(
+ [this](std::vector<SetValueResult> results) { onSetValues(results); });
+ mGetValuesCallback = std::make_shared<IVehicleHardware::GetValuesCallback>(
+ [this](std::vector<GetValueResult> results) { onGetValues(results); });
}
FakeVehicleHardware* getHardware() { return &mHardware; }
StatusCode setValues(const std::vector<SetValueRequest>& requests) {
- return getHardware()->setValues(
- [this](const std::vector<SetValueResult> results) { return onSetValues(results); },
- requests);
+ return getHardware()->setValues(mSetValuesCallback, requests);
}
StatusCode getValues(const std::vector<GetValueRequest>& requests) {
- return getHardware()->getValues(
- [this](const std::vector<GetValueResult> results) { return onGetValues(results); },
- requests);
+ return getHardware()->getValues(mGetValuesCallback, requests);
}
StatusCode setValue(const VehiclePropValue& value) {
@@ -245,6 +246,8 @@
std::vector<SetValueResult> mSetValueResults;
std::vector<GetValueResult> mGetValueResults;
std::vector<VehiclePropValue> mChangedProperties;
+ std::shared_ptr<IVehicleHardware::SetValuesCallback> mSetValuesCallback;
+ std::shared_ptr<IVehicleHardware::GetValuesCallback> mGetValuesCallback;
};
TEST_F(FakeVehicleHardwareTest, testGetAllPropertyConfigs) {
@@ -367,9 +370,9 @@
TEST_F(FakeVehicleHardwareTest, testRegisterOnPropertyChangeEvent) {
// We have already registered this callback in Setup, here we are registering again.
- getHardware()->registerOnPropertyChangeEvent(std::bind(
- &FakeVehicleHardwareTest_testRegisterOnPropertyChangeEvent_Test::onPropertyChangeEvent,
- this, std::placeholders::_1));
+ auto callback = std::make_unique<IVehicleHardware::PropertyChangeCallback>(
+ [this](const std::vector<VehiclePropValue>& values) { onPropertyChangeEvent(values); });
+ getHardware()->registerOnPropertyChangeEvent(std::move(callback));
auto testValues = getTestPropValues();
std::vector<SetValueRequest> requests;
diff --git a/automotive/vehicle/aidl/impl/hardware/include/IVehicleHardware.h b/automotive/vehicle/aidl/impl/hardware/include/IVehicleHardware.h
index 2e12327..4b9de2d 100644
--- a/automotive/vehicle/aidl/impl/hardware/include/IVehicleHardware.h
+++ b/automotive/vehicle/aidl/impl/hardware/include/IVehicleHardware.h
@@ -19,6 +19,7 @@
#include <VehicleHalTypes.h>
+#include <memory>
#include <vector>
namespace android {
@@ -49,6 +50,14 @@
// with a VehicleHardware through this interface.
class IVehicleHardware {
public:
+ using SetValuesCallback = std::function<void(
+ std::vector<::aidl::android::hardware::automotive::vehicle::SetValueResult>)>;
+ using GetValuesCallback = std::function<void(
+ std::vector<::aidl::android::hardware::automotive::vehicle::GetValueResult>)>;
+ using PropertyChangeCallback = std::function<void(
+ std::vector<::aidl::android::hardware::automotive::vehicle::VehiclePropValue>)>;
+ using PropertySetErrorCallback = std::function<void(std::vector<SetValueErrorEvent>)>;
+
virtual ~IVehicleHardware() = default;
// Get all the property configs.
@@ -59,9 +68,7 @@
// are sent to vehicle bus or before property set confirmation is received. The callback is
// safe to be called after the function returns and is safe to be called in a different thread.
virtual ::aidl::android::hardware::automotive::vehicle::StatusCode setValues(
- std::function<void(const std::vector<
- ::aidl::android::hardware::automotive::vehicle::SetValueResult>&)>&&
- callback,
+ std::shared_ptr<const SetValuesCallback> callback,
const std::vector<::aidl::android::hardware::automotive::vehicle::SetValueRequest>&
requests) = 0;
@@ -69,9 +76,7 @@
// The callback is safe to be called after the function returns and is safe to be called in a
// different thread.
virtual ::aidl::android::hardware::automotive::vehicle::StatusCode getValues(
- std::function<void(const std::vector<
- ::aidl::android::hardware::automotive::vehicle::GetValueResult>&)>&&
- callback,
+ std::shared_ptr<const GetValuesCallback> callback,
const std::vector<::aidl::android::hardware::automotive::vehicle::GetValueRequest>&
requests) const = 0;
@@ -83,13 +88,12 @@
// Register a callback that would be called when there is a property change event from vehicle.
virtual void registerOnPropertyChangeEvent(
- std::function<void(const std::vector<::aidl::android::hardware::automotive::vehicle::
- VehiclePropValue>&)>&& callback) = 0;
+ std::unique_ptr<const PropertyChangeCallback> callback) = 0;
// Register a callback that would be called when there is a property set error event from
// vehicle.
virtual void registerOnPropertySetErrorEvent(
- std::function<void(const std::vector<SetValueErrorEvent>&)>&& callback) = 0;
+ std::unique_ptr<const PropertySetErrorCallback> callback) = 0;
};
} // namespace vehicle
diff --git a/automotive/vehicle/aidl/impl/vhal/Android.bp b/automotive/vehicle/aidl/impl/vhal/Android.bp
index 79d3ebd..454fea5 100644
--- a/automotive/vehicle/aidl/impl/vhal/Android.bp
+++ b/automotive/vehicle/aidl/impl/vhal/Android.bp
@@ -19,7 +19,7 @@
}
cc_binary {
- name: "android.hardware.automotive.vehicle-aidl-default-service",
+ name: "android.hardware.automotive.vehicle@V1-default-service",
vendor: true,
defaults: [
"FakeVehicleHardwareDefaults",
diff --git a/automotive/vehicle/aidl/impl/vhal/src/VehicleService.cpp b/automotive/vehicle/aidl/impl/vhal/src/VehicleService.cpp
index 14224a5..c8b5c65 100644
--- a/automotive/vehicle/aidl/impl/vhal/src/VehicleService.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/src/VehicleService.cpp
@@ -32,8 +32,8 @@
::ndk::SharedRefBase::make<DefaultVehicleHal>(std::move(hardware));
ALOGI("Registering as service...");
- binder_exception_t err = AServiceManager_addService(vhal->asBinder().get(),
- "android.hardware.automotive.vehicle");
+ binder_exception_t err = AServiceManager_addService(
+ vhal->asBinder().get(), "android.hardware.automotive.vehicle.IVehicle/default");
if (err != EX_NONE) {
ALOGE("failed to register android.hardware.automotive.vehicle service, exception: %d", err);
return 1;
diff --git a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
index 62a7098..2b5ca70 100644
--- a/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/vhal/test/DefaultVehicleHalTest.cpp
@@ -19,6 +19,7 @@
#include <IVehicleHardware.h>
#include <LargeParcelableBase.h>
#include <aidl/android/hardware/automotive/vehicle/IVehicle.h>
+#include <android-base/thread_annotations.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -53,16 +54,17 @@
class MockVehicleHardware final : public IVehicleHardware {
public:
std::vector<VehiclePropConfig> getAllPropertyConfigs() const override {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
return mPropertyConfigs;
}
- StatusCode setValues(std::function<void(const std::vector<SetValueResult>&)>&&,
+ StatusCode setValues(std::shared_ptr<const SetValuesCallback>,
const std::vector<SetValueRequest>&) override {
// TODO(b/200737967): mock this.
return StatusCode::OK;
}
- StatusCode getValues(std::function<void(const std::vector<GetValueResult>&)>&&,
+ StatusCode getValues(std::shared_ptr<const GetValuesCallback>,
const std::vector<GetValueRequest>&) const override {
// TODO(b/200737967): mock this.
return StatusCode::OK;
@@ -78,23 +80,23 @@
return StatusCode::OK;
}
- void registerOnPropertyChangeEvent(
- std::function<void(const std::vector<VehiclePropValue>&)>&&) override {
+ void registerOnPropertyChangeEvent(std::unique_ptr<const PropertyChangeCallback>) override {
// TODO(b/200737967): mock this.
}
- void registerOnPropertySetErrorEvent(
- std::function<void(const std::vector<SetValueErrorEvent>&)>&&) override {
+ void registerOnPropertySetErrorEvent(std::unique_ptr<const PropertySetErrorCallback>) override {
// TODO(b/200737967): mock this.
}
// Test functions.
void setPropertyConfigs(const std::vector<VehiclePropConfig>& configs) {
+ std::scoped_lock<std::mutex> lockGuard(mLock);
mPropertyConfigs = configs;
}
private:
- std::vector<VehiclePropConfig> mPropertyConfigs;
+ mutable std::mutex mLock;
+ std::vector<VehiclePropConfig> mPropertyConfigs GUARDED_BY(mLock);
};
struct PropConfigCmp {
diff --git a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
index 4c8865a..19267cd 100644
--- a/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
+++ b/automotive/vehicle/aidl/impl/vhal/vhal-default-service.rc
@@ -1,4 +1,4 @@
-service vendor.vehicle-hal-default /vendor/bin/hw/android.hardware.automotive.vehicle-aidl-default-service
+service vendor.vehicle-hal-default /vendor/bin/hw/android.hardware.automotive.vehicle@V1-default-service
class early_hal
user vehicle_network
group system inet
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/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/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 94%
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..8bb0711 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;
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/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
index 54f09c1..bfaa15b 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -42,7 +42,8 @@
SKIP_CLIENT_COLOR_TRANSFORM = 1,
/**
* Indicates that the display supports PowerMode::DOZE and
- * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit
+ * 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.
@@ -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 93%
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..cdc4759 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,6 +30,12 @@
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
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 97%
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..ea7745d 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 {
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/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index f661f8b..b89b4c4 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.
@@ -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.
*
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 93%
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..130e3b1 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
*/
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/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 7a20a53..20fffa9 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();
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/neuralnetworks/aidl/android/hardware/neuralnetworks/OperationType.aidl b/neuralnetworks/aidl/android/hardware/neuralnetworks/OperationType.aidl
index aebe8d9..0ad254d 100644
--- a/neuralnetworks/aidl/android/hardware/neuralnetworks/OperationType.aidl
+++ b/neuralnetworks/aidl/android/hardware/neuralnetworks/OperationType.aidl
@@ -5385,7 +5385,7 @@
* must be in the range [0, n).
*
* Outputs:
- * * 0: The reversed tensor.
+ * * 0: The reversed tensor of the same shape as the input tensor.
* For {@link OperandType::TENSOR_QUANT8_ASYMM} and
* {@link OperandType::TENSOR_QUANT8_ASYMM_SIGNED} tensors,
* the scales and zeroPoint must be the same as input0.
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
index 2da0167..93940fd 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsInfo.aidl
@@ -36,6 +36,5 @@
parcelable ActivityStatsInfo {
int sleepModeTimeMs;
int idleModeTimeMs;
- int[] txmModetimeMs;
- int rxModeTimeMs;
+ android.hardware.radio.modem.ActivityStatsTechSpecificInfo[] techSpecificInfo;
}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
similarity index 75%
copy from graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
index 5e6d212..798ec36 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/command/ParcelableBlendMode.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.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,16 @@
// 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.radio.modem;
@VintfStability
-parcelable ParcelableBlendMode {
- android.hardware.graphics.common.BlendMode blendMode;
+parcelable ActivityStatsTechSpecificInfo {
+ android.hardware.radio.AccessNetwork rat;
+ int frequencyRange;
+ int[] txmModetimeMs;
+ int rxModeTimeMs;
+ const int FREQUENCY_RANGE_UNKNOWN = 0;
+ const int FREQUENCY_RANGE_LOW = 1;
+ const int FREQUENCY_RANGE_MID = 2;
+ const int FREQUENCY_RANGE_HIGH = 3;
+ const int FREQUENCY_RANGE_MMWAVE = 4;
}
diff --git a/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl b/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
index 764a86d..d0aa695 100644
--- a/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ActivityStatsInfo.aidl
@@ -16,6 +16,8 @@
package android.hardware.radio.modem;
+import android.hardware.radio.modem.ActivityStatsTechSpecificInfo;
+
@VintfStability
parcelable ActivityStatsInfo {
/**
@@ -28,17 +30,10 @@
*/
int idleModeTimeMs;
/**
- * Each index represent total time (in ms) during which the transmitter is active/awake for a
- * particular power range as shown below.
- * index 0 = tx_power < 0dBm
- * index 1 = 0dBm < tx_power < 5dBm
- * index 2 = 5dBm < tx_power < 15dBm
- * index 3 = 15dBm < tx_power < 20dBm
- * index 4 = tx_power > 20dBm
+ * Technology specific activity stats info.
+ * List of the activity stats for each RATs (2G, 3G, 4G and 5G) and frequency ranges (HIGH for
+ * sub6 and MMWAVE) in case of 5G. In case implementation doesn't have RAT specific activity
+ * stats then send only one activity stats info with RAT unknown.
*/
- int[] txmModetimeMs;
- /**
- * Total time (in ms) for which receiver is active/awake and the transmitter is inactive
- */
- int rxModeTimeMs;
+ ActivityStatsTechSpecificInfo[] techSpecificInfo;
}
diff --git a/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
new file mode 100644
index 0000000..fb14223
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.aidl
@@ -0,0 +1,58 @@
+/*
+ * 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.modem;
+
+import android.hardware.radio.AccessNetwork;
+
+@VintfStability
+parcelable ActivityStatsTechSpecificInfo {
+ /** Indicates the frequency range is unknown. */
+ const int FREQUENCY_RANGE_UNKNOWN = 0;
+ /** Indicates the frequency range is below 1GHz. */
+ const int FREQUENCY_RANGE_LOW = 1;
+ /** Indicates the frequency range is between 1GHz and 3GHz. */
+ const int FREQUENCY_RANGE_MID = 2;
+ /** Indicates the frequency range is between 3GHz and 6GHz. */
+ const int FREQUENCY_RANGE_HIGH = 3;
+ /** Indicates the frequency range is above 6GHz (millimeter wave frequency). */
+ const int FREQUENCY_RANGE_MMWAVE = 4;
+ /**
+ * Radio access technology. Set UNKNOWN if the Activity statistics
+ * is RAT independent.
+ */
+ AccessNetwork rat;
+ /**
+ * Frequency range. Values are FREQUENCY_RANGE_
+ * Set FREQUENCY_RANGE_UNKNOWN if the Activity statistics when frequency range
+ * is not applicable.
+ */
+ int frequencyRange;
+ /**
+ * Each index represent total time (in ms) during which the transmitter is active/awake for a
+ * particular power range as shown below.
+ * index 0 = tx_power <= 0dBm
+ * index 1 = 0dBm < tx_power <= 5dBm
+ * index 2 = 5dBm < tx_power <= 15dBm
+ * index 3 = 15dBm < tx_power <= 20dBm
+ * index 4 = tx_power > 20dBm
+ */
+ int[] txmModetimeMs;
+ /**
+ * Total time (in ms) for which receiver is active/awake and the transmitter is inactive
+ */
+ int rxModeTimeMs;
+}
diff --git a/radio/aidl/compat/libradiocompat/modem/structs.cpp b/radio/aidl/compat/libradiocompat/modem/structs.cpp
index c1cd64c..53d5753 100644
--- a/radio/aidl/compat/libradiocompat/modem/structs.cpp
+++ b/radio/aidl/compat/libradiocompat/modem/structs.cpp
@@ -24,6 +24,7 @@
namespace android::hardware::radio::compat {
+using ::aidl::android::hardware::radio::AccessNetwork;
using ::aidl::android::hardware::radio::RadioAccessFamily;
using ::aidl::android::hardware::radio::RadioTechnology;
namespace aidl = ::aidl::android::hardware::radio::modem;
@@ -82,11 +83,18 @@
}
aidl::ActivityStatsInfo toAidl(const V1_0::ActivityStatsInfo& info) {
+ const aidl::ActivityStatsTechSpecificInfo techSpecificInfo = {
+ .rat = AccessNetwork(AccessNetwork::UNKNOWN),
+ .frequencyRange = static_cast<int32_t>(
+ aidl::ActivityStatsTechSpecificInfo::FREQUENCY_RANGE_UNKNOWN),
+ .txmModetimeMs = toAidl(info.txmModetimeMs),
+ .rxModeTimeMs = static_cast<int32_t>(info.rxModeTimeMs),
+ };
+
return {
.sleepModeTimeMs = static_cast<int32_t>(info.sleepModeTimeMs),
.idleModeTimeMs = static_cast<int32_t>(info.idleModeTimeMs),
- .txmModetimeMs = toAidl(info.txmModetimeMs),
- .rxModeTimeMs = static_cast<int32_t>(info.rxModeTimeMs),
+ .techSpecificInfo = {techSpecificInfo},
};
}
diff --git a/radio/aidl/compat/libradiocompat/modem/structs.h b/radio/aidl/compat/libradiocompat/modem/structs.h
index 3ac1edb..af714c7 100644
--- a/radio/aidl/compat/libradiocompat/modem/structs.h
+++ b/radio/aidl/compat/libradiocompat/modem/structs.h
@@ -16,6 +16,7 @@
#pragma once
#include <aidl/android/hardware/radio/modem/ActivityStatsInfo.h>
+#include <aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.h>
#include <aidl/android/hardware/radio/modem/HardwareConfig.h>
#include <aidl/android/hardware/radio/modem/HardwareConfigModem.h>
#include <aidl/android/hardware/radio/modem/HardwareConfigSim.h>
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp
index c99e1d0..d8b19dc 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;