Skip to content

Commit 86bf84f

Browse files
committed
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
1 parent 915cd5f commit 86bf84f

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

services/surfaceflinger/LayerProtoHelper.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ void LayerProtoHelper::writeToProto(
187187
void LayerProtoHelper::writeToProto(
188188
const WindowInfo& inputInfo,
189189
std::function<perfetto::protos::InputWindowInfoProto*()> getInputWindowInfoProto) {
190-
if (inputInfo.token == nullptr) {
191-
return;
192-
}
193-
194190
perfetto::protos::InputWindowInfoProto* proto = getInputWindowInfoProto();
195191
proto->set_layout_params_flags(inputInfo.layoutParamsFlags.get());
196192
proto->set_input_config(inputInfo.inputConfig.get());

0 commit comments

Comments
 (0)