Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d00847d7 authored by Weilun Du's avatar Weilun Du
Browse files

Remove warning when associated display is ADISPLAY_ID_NONE.



This warning caused logspam in emulator system image because emulator
host pre-registeris several touch screen devices which are not associated
with any display until multi-display feature is turned on. Unfortunately,
there is no easy way to add/remove touch screen device on-demand in
emulator host at runtime.

Bug: 160609749

Signed-off-by: default avatarWeilun Du <wdu@google.com>
Change-Id: I78d8c1b18285a58887b107d5469f9d1703132b44
parent 23a2fe41
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -782,12 +782,8 @@ bool InputReader::canDispatchToDisplay(int32_t deviceId, int32_t displayId) {

    std::optional<int32_t> associatedDisplayId = device->getAssociatedDisplayId();
    // No associated display. By default, can dispatch to all displays.
    if (!associatedDisplayId) {
        return true;
    }

    if (*associatedDisplayId == ADISPLAY_ID_NONE) {
        ALOGW("Device %s is associated with display ADISPLAY_ID_NONE.", device->getName().c_str());
    if (!associatedDisplayId ||
            *associatedDisplayId == ADISPLAY_ID_NONE) {
        return true;
    }