summaryrefslogtreecommitdiff
path: root/telephony/java
diff options
context:
space:
mode:
authorBrad Ebinger <breadley@google.com>2021-02-23 10:30:00 -0800
committerBrad Ebinger <breadley@google.com>2021-03-03 00:59:27 +0000
commitded80f3e3315644932a5a7d2f655d4f0de69596e (patch)
treed514d6272b172c7cee6307558c6dc8af5dceecdb /telephony/java
parentbff838987228acb3b8424018e92d6062d5275579 (diff)
Move illegal state detection in stub classes to warning
In order to increase stability, move *ImplBase listeners to warning for now until we can find the source of the error. Fixes: 179217608 Test: manual; kill phone process Merged-In: If1813ed6c82b778018d61691018604b6891ff34e Change-Id: If1813ed6c82b778018d61691018604b6891ff34e
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java8
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java8
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsUtImplBase.java9
3 files changed, 12 insertions, 13 deletions
diff --git a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
index 5f8e93d02a00..8ad40ed1032c 100644
--- a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
@@ -57,10 +57,10 @@ public class ImsEcbmImplBase {
} else if (listener != null && mListener == null) {
mListener = listener;
} else {
- // Fail fast here instead of silently overwriting the listener to another
- // listener due to another connection connecting.
- throw new IllegalStateException("ImsEcbmImplBase: Listener already set by "
- + "another connection.");
+ // Warn that the listener is being replaced while active
+ Log.w(TAG, "setListener is being called when there is already an active "
+ + "listener");
+ mListener = listener;
}
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
index 8e961acc7b36..ec1c7b3a92a8 100644
--- a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
@@ -62,10 +62,10 @@ public class ImsMultiEndpointImplBase {
} else if (listener != null && mListener == null) {
mListener = listener;
} else {
- // Fail fast here instead of silently overwriting the listener to another
- // listener due to another connection connecting.
- throw new IllegalStateException("ImsMultiEndpointImplBase: Listener already"
- + " set by another connection.");
+ // Warn that the listener is being replaced while active
+ Log.w(TAG, "setListener is being called when there is already an active "
+ + "listener");
+ mListener = listener;
}
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
index 83b89aa8e814..eb3e8ed5a8e4 100644
--- a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
@@ -224,11 +224,10 @@ public class ImsUtImplBase {
} else if (listener != null && mUtListener == null) {
mUtListener = new ImsUtListener(listener);
} else {
- // This is a limitation of the current API surface, there can only be one
- // listener connected. Fail fast instead of silently overwriting the other
- // listener.
- throw new IllegalStateException("ImsUtImplBase#setListener: listener already "
- + "set by another connected interface!");
+ // Warn that the listener is being replaced while active
+ Log.w(TAG, "setListener is being called when there is already an active "
+ + "listener");
+ mUtListener = new ImsUtListener(listener);
}
}