Don't warn for displays with no input device matching.

Creating a virtual display via the public APIs prevents from
using the @hide VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH flag in
createVirtualDisplay. Not passing this flag results in
viewport DisplayDeviceInfo.TOUCH_NONE, i.e. the input system
will not be dispatching to it. This results in a warning being
logged for a valid per public API contract case.

Test: No warning logs for displays with no input device matching.

Upstream from Meta.

Change-Id: I0d4386542a85cdf4c6322d934338dbde4ae2bb10
This commit is contained in:
Svet Ganov
2022-10-29 15:25:00 -07:00
parent 9e7649d5e7
commit 5613979215

View File

@@ -2218,7 +2218,9 @@ public final class DisplayManagerService extends SystemService {
}
// fallthrough
default:
Slog.w(TAG, "Display " + info + " does not support input device matching.");
if (DEBUG) {
Slog.w(TAG, "Display " + info + " does not support input device matching.");
}
}
return Optional.empty();
}