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

Commit fbac3d94 authored by Piotr Wilczyński's avatar Piotr Wilczyński
Browse files

Don't throw exception when adding display to topology

Bug: 401178031
Flag: EXEMPT bugfix
Test: DisplayTopologyTest
Change-Id: I3eb00823b8392c10753397ea0edaf14d0c94c2ec
parent 76ccff7d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -600,8 +600,7 @@ public final class DisplayTopology implements Parcelable {


    private void addDisplay(int displayId, float width, float height, boolean shouldLog) {
    private void addDisplay(int displayId, float width, float height, boolean shouldLog) {
        if (findDisplay(displayId, mRoot) != null) {
        if (findDisplay(displayId, mRoot) != null) {
            throw new IllegalArgumentException(
            return;
                    "DisplayTopology: attempting to add a display that already exists");
        }
        }
        if (mRoot == null) {
        if (mRoot == null) {
            mRoot = new TreeNode(displayId, width, height, POSITION_LEFT, /* offset= */ 0);
            mRoot = new TreeNode(displayId, width, height, POSITION_LEFT, /* offset= */ 0);