Merge "Upon double registration just return instead of throwing exception" into tm-qpr-dev
This commit is contained in:
@@ -117,9 +117,7 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent {
|
|||||||
if (mWindowLayoutChangeListeners.containsKey(context)
|
if (mWindowLayoutChangeListeners.containsKey(context)
|
||||||
// In theory this method can be called on the same consumer with different context.
|
// In theory this method can be called on the same consumer with different context.
|
||||||
|| mWindowLayoutChangeListeners.containsValue(consumer)) {
|
|| mWindowLayoutChangeListeners.containsValue(consumer)) {
|
||||||
throw new IllegalArgumentException(
|
return;
|
||||||
"Context or Consumer has already been registered for WindowLayoutInfo"
|
|
||||||
+ " callback.");
|
|
||||||
}
|
}
|
||||||
if (!context.isUiContext()) {
|
if (!context.isUiContext()) {
|
||||||
throw new IllegalArgumentException("Context must be a UI Context, which should be"
|
throw new IllegalArgumentException("Context must be a UI Context, which should be"
|
||||||
|
|||||||
Reference in New Issue
Block a user