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

Commit ef8c2cb4 authored by Yunfan Chen's avatar Yunfan Chen
Browse files

If decouple flag turns on, skip legacy value verification

The values were used to calculate the configuration, after the decouple,
the bar window should no longer included in those fields. New tests will
be introduced to guard the behavior.

Skip the verification for now.

Bug: 330835960
Bug: 151861875
Test: DisplayPolicyInsetsTests
Change-Id: I5243a9f5fbeb76c630db0258709f5cdcc351ca4d
parent a2073989
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ import android.view.DisplayInfo;

import androidx.test.filters.SmallTest;

import com.android.window.flags.Flags;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ErrorCollector;
@@ -142,12 +144,20 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase {

    private void verifyStableInsets(DisplayInfo di, int left, int top,
            int right, int bottom) {
        if (Flags.insetsDecoupledConfiguration()) {
            // TODO: update the verification to match the new behavior.
            return;
        }
        mErrorCollector.checkThat("stableInsets", getStableInsets(di),
                equalTo(new Rect(left, top, right, bottom)));
    }

    private void verifyNonDecorInsets(DisplayInfo di, int left, int top,
            int right, int bottom) {
        if (Flags.insetsDecoupledConfiguration()) {
            // TODO: update the verification to match the new behavior.
            return;
        }
        mErrorCollector.checkThat("nonDecorInsets",
                getNonDecorInsets(di), equalTo(new Rect(left, top, right, bottom)));
    }