SF: fix binder thread priority
Add setMinSchedulerPolicy to all binder interfaces SF exposes.
It was missing from gui::ISurfaceComposer and
gui::IDisplayEventConnection.
Test: presubmit
Bug: 299378819
Change-Id: Ia0d99efa5a3bc58625c320d4df3c08bb597d2e38
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index b526a6c..ff6b558 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -25,6 +25,7 @@
#include <gui/IGraphicBufferProducer.h>
#include <gui/ISurfaceComposer.h>
#include <gui/LayerState.h>
+#include <gui/SchedulingPolicy.h>
#include <private/gui/ParcelUtils.h>
#include <stdint.h>
#include <sys/types.h>
@@ -201,6 +202,18 @@
isAutoTimestamp, uncacheBuffers, hasListenerCallbacks,
listenerCallbacks, transactionId, mergedTransactions);
}
+ case GET_SCHEDULING_POLICY: {
+ gui::SchedulingPolicy policy;
+ const auto status = gui::getSchedulingPolicy(&policy);
+ if (!status.isOk()) {
+ return status.exceptionCode();
+ }
+
+ SAFE_PARCEL(reply->writeInt32, policy.policy);
+ SAFE_PARCEL(reply->writeInt32, policy.priority);
+ return NO_ERROR;
+ }
+
default: {
return BBinder::onTransact(code, data, reply, flags);
}