commit | 4601dd22ee7ecf2dad0fe11f4ffe4667a7efb1d4 | [log] [tgz] |
---|---|---|
author | An An Yu <ananyu@google.com> | Thu Oct 13 00:55:20 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Oct 13 00:55:20 2022 +0000 |
tree | 34368eaafcc700e72f2b06a9a32a2bd9c0600a37 | |
parent | ac375b6f8af6c01d0e83841aeebb05678a928175 [diff] | |
parent | a3be6a1773a67699996b21bec3fcc2d6b388ad37 [diff] |
Merge "Upon double registration just return instead of throwing exception" into tm-qpr-dev am: a3be6a1773 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20181366 Change-Id: I24566dd9ca1ed2ad66fa0966ad7aad548f0293ea Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java index 0fb6ff8..b516e140 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
@@ -117,9 +117,7 @@ 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"