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

Commit 6e7636e4 authored by Wenhui Yang's avatar Wenhui Yang Committed by Android (Google) Code Review
Browse files

Merge "Revert the change of unifying visibility" into main

parents d6c29636 3bcb0a8f
Loading
Loading
Loading
Loading
+15 −22
Original line number Diff line number Diff line
@@ -264,12 +264,6 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
    }
    snapshot.isVisible = visible;

    if (FlagManager::getInstance().skip_invisible_windows_in_input()) {
        const bool visibleForInput =
                snapshot.isVisible || (snapshot.hasInputInfo() && !snapshot.isHiddenByPolicy());
        snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE,
                                          !visibleForInput);
    } else {
    // TODO(b/238781169) we are ignoring this compat for now, since we will have
    // to remove any optimization based on visibility.

@@ -283,9 +277,8 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
    // anything.
    const bool visibleForInput =
            snapshot.hasInputInfo() ? snapshot.canReceiveInput() : snapshot.isVisible;
        snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE,
                                          !visibleForInput);
    }
    snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE, !visibleForInput);

    LLOGV(snapshot.sequence, "updating visibility %s %s", visible ? "true" : "false",
          snapshot.getDebugString().c_str());
}