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

Commit 8b73d864 authored by An An Yu's avatar An An Yu
Browse files

Upon double registration just return instead of throwing exception

Bug: 204073440
Test: manual
Change-Id: I019f3a63a12d64f3e8cb7059fa8ac237ec8dd09b
parent 8a786013
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -117,9 +117,7 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent {
        if (mWindowLayoutChangeListeners.containsKey(context)
                // In theory this method can be called on the same consumer with different context.
                || mWindowLayoutChangeListeners.containsValue(consumer)) {
            throw new IllegalArgumentException(
                    "Context or Consumer has already been registered for WindowLayoutInfo"
                            + " callback.");
            return;
        }
        if (!context.isUiContext()) {
            throw new IllegalArgumentException("Context must be a UI Context, which should be"