summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Piotr WilczyƄski <wilczynskip@google.com> 2025-03-13 06:56:37 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2025-03-13 06:56:37 -0700
commite9f83b626847ded3237af18ccd6679738dcafe7d (patch)
tree94fc9aeac9c455b3278036ecc9150f5aa5930369
parent0143339b4a5e3c018cac8b4798c21a602eeede82 (diff)
parentfbac3d94a31c3f1aa29549274c8ee0d3e24037b1 (diff)
Merge "Don't throw exception when adding display to topology" into main
-rw-r--r--core/java/android/hardware/display/DisplayTopology.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/hardware/display/DisplayTopology.java b/core/java/android/hardware/display/DisplayTopology.java
index 4ed0fc056e7d..c3c8c3d63bec 100644
--- a/core/java/android/hardware/display/DisplayTopology.java
+++ b/core/java/android/hardware/display/DisplayTopology.java
@@ -600,8 +600,7 @@ public final class DisplayTopology implements Parcelable {
private void addDisplay(int displayId, float width, float height, boolean shouldLog) {
if (findDisplay(displayId, mRoot) != null) {
- throw new IllegalArgumentException(
- "DisplayTopology: attempting to add a display that already exists");
+ return;
}
if (mRoot == null) {
mRoot = new TreeNode(displayId, width, height, POSITION_LEFT, /* offset= */ 0);