summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2024-10-14 18:53:25 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2024-10-14 18:53:25 +0000
commit86bf84f8468f16e9d415f36c41c40a301652a335 (patch)
tree3972473657defd2266f66ff109113dbf8fb6ae3a
parent915cd5f0a8e0c50cf1b209c4f994e8db8bcf6b68 (diff)
SF: Trace input info whenever it is present, even if input token is null
The bug is that if inputInfo.token is null, the function will return early without writing anything to the proto. This is incorrect, as the proto should still be written even if inputInfo.token is null, since the input window can have a touchable region that can affect input dispatching. For example, the various "input sink" windows usually have input info, but set the NO_INPUT_CHANNEL flag and thus have null input channels and tokens. This CL fixes the bug by removing the if statement that checks if inputInfo.token is null. Bug: 373401882 Change-Id: Ide2ebf4a932139dac766101bb52921ff64b02899 Test: manual: take input trace with winscope, and look for input sinks Flag: EXEMPT bug fix
-rw-r--r--services/surfaceflinger/LayerProtoHelper.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index a0fbab0728..44cd3194bc 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -187,10 +187,6 @@ void LayerProtoHelper::writeToProto(
void LayerProtoHelper::writeToProto(
const WindowInfo& inputInfo,
std::function<perfetto::protos::InputWindowInfoProto*()> getInputWindowInfoProto) {
- if (inputInfo.token == nullptr) {
- return;
- }
-
perfetto::protos::InputWindowInfoProto* proto = getInputWindowInfoProto();
proto->set_layout_params_flags(inputInfo.layoutParamsFlags.get());
proto->set_input_config(inputInfo.inputConfig.get());