summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 71e4791fe9..6a967d2982 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2151,7 +2151,7 @@ void Layer::writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet
layerInfo->set_owner_uid(mOwnerUid);
}
- if (traceFlags & SurfaceTracing::TRACE_INPUT) {
+ if (traceFlags & SurfaceTracing::TRACE_INPUT && needsInputInfo()) {
InputWindowInfo info;
if (useDrawing) {
info = fillInputInfo({nullptr});
@@ -2399,7 +2399,8 @@ sp<Layer> Layer::getClonedRoot() {
}
bool Layer::hasInputInfo() const {
- return mDrawingState.inputInfo.token != nullptr;
+ return mDrawingState.inputInfo.token != nullptr ||
+ mDrawingState.inputInfo.inputFeatures.test(InputWindowInfo::Feature::NO_INPUT_CHANNEL);
}
bool Layer::canReceiveInput() const {