SF: Return EX_CONFIG_FAILED from setActiveConfigWithConstraints()
setActiveConfigWithConstraints() currently returns V2_4 Hal::Error
But with the new Composer3 IcomposerClient AIDL changes, it should
return int32_t corresponding the new EX_CONFIG_FAILED
exception. So define a new enum class Error to handle all V2_1 and 2_4
errors and the new IcomposerClient exception.
Also define a new class to return the result of initiateModeChange
as: Changed, Rejected, Aborted.
So change this plumbing through SF. Catch this error and propagate
up from DisplayModeController to SF using Scheduler
Bug: 374185540
Flag: EXEMPT refactor
Test: manual
Change-Id: I3548fd6bda806055fb071cc364d07d37b2693374
Signed-off-by: Manasi Navare <navaremanasi@google.com>
diff --git a/services/surfaceflinger/DisplayHardware/HidlComposerHal.h b/services/surfaceflinger/DisplayHardware/HidlComposerHal.h
index 9a89dba..42ba9a9 100644
--- a/services/surfaceflinger/DisplayHardware/HidlComposerHal.h
+++ b/services/surfaceflinger/DisplayHardware/HidlComposerHal.h
@@ -60,7 +60,6 @@
using V2_1::Config;
using V2_1::Display;
-using V2_1::Error;
using V2_1::Layer;
using V2_4::CommandReaderBase;
using V2_4::CommandWriterBase;
@@ -308,7 +307,7 @@
V2_4::Error getDisplayConnectionType(Display display,
IComposerClient::DisplayConnectionType* outType) override;
V2_4::Error getDisplayVsyncPeriod(Display display, VsyncPeriodNanos* outVsyncPeriod) override;
- V2_4::Error setActiveConfigWithConstraints(
+ Error setActiveConfigWithConstraints(
Display display, Config config,
const IComposerClient::VsyncPeriodChangeConstraints& vsyncPeriodChangeConstraints,
VsyncPeriodChangeTimeline* outTimeline) override;