[ComposerService] Add API to query protected content support.
Add API to query protected content support for upper stack usage.
BUG: 117436546
Test: Build, flash and boot. Check returned value.
Change-Id: I1bc7320a2ce5a99889c979f6d6fd159369668871
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9eff3c6..72ca363 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1153,6 +1153,14 @@
outStats);
}
+status_t SurfaceFlinger::getProtectedContentSupport(bool* outSupported) const {
+ if (!outSupported) {
+ return BAD_VALUE;
+ }
+ *outSupported = getRenderEngine().supportsProtectedContent();
+ return NO_ERROR;
+}
+
status_t SurfaceFlinger::enableVSyncInjections(bool enable) {
postMessageSync(new LambdaMessage([&] {
Mutex::Autolock _l(mStateLock);
@@ -5004,7 +5012,8 @@
case SET_TRANSACTION_STATE:
case CREATE_CONNECTION:
case GET_COLOR_MANAGEMENT:
- case GET_COMPOSITION_PREFERENCE: {
+ case GET_COMPOSITION_PREFERENCE:
+ case GET_PROTECTED_CONTENT_SUPPORT: {
return OK;
}
case CAPTURE_LAYERS: