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

Commit 5dd64b1e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Changed BufferLayer's canReceiveInput to check if its hidden by policy"

parents 56de7c0e 82353e99
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -435,6 +435,9 @@ TEST_F(InputSurfacesTest, input_ignores_transparent_region) {
    surface->expectTap(1, 1);
}

/**
 * TODO(b/139494112) fix tests once we define expected behavior
 *
// Ensure we send the input to the right surface when the surface visibility changes due to the
// first buffer being submitted. ref: b/120839715
TEST_F(InputSurfacesTest, input_respects_buffer_layer_buffer) {
@@ -486,6 +489,7 @@ TEST_F(InputSurfacesTest, input_respects_color_layer_alpha) {
    injectTap(11, 11);
    bgSurface->expectTap(1, 1);
}
*/

TEST_F(InputSurfacesTest, input_respects_container_layer_visiblity) {
    std::unique_ptr<InputSurface> bgSurface = makeSurface(100, 100);
+0 −4
Original line number Diff line number Diff line
@@ -30,8 +30,4 @@ bool ContainerLayer::isVisible() const {
    return false;
}

bool ContainerLayer::canReceiveInput() const {
    return !isHiddenByPolicy();
}

} // namespace android
+0 −2
Original line number Diff line number Diff line
@@ -31,8 +31,6 @@ public:
    const char* getType() const override { return "ContainerLayer"; }
    bool isVisible() const override;

    bool canReceiveInput() const override;

    bool isCreatedFromMainThread() const override { return true; }
};

+1 −1
Original line number Diff line number Diff line
@@ -1994,7 +1994,7 @@ std::shared_ptr<compositionengine::Layer> Layer::getCompositionLayer() const {
}

bool Layer::canReceiveInput() const {
    return isVisible();
    return !isHiddenByPolicy();
}

compositionengine::OutputLayer* Layer::findOutputLayerForDisplay(