diff options
author | 2019-05-30 16:52:28 -0700 | |
---|---|---|
committer | 2019-05-31 17:53:48 -0700 | |
commit | 156a33b9a8d34ffdafa00a1915114fc1365772f8 (patch) | |
tree | 72f0e7cf9040487b08e3d5913ddbe5155976c942 | |
parent | 731490a14297c11a0adadfbf9df2196d14db5cbf (diff) |
Fix bugs with Remote Connection Services.
1. A previous change was made in ConnectionServiceAdapterServant to add
another parameter, requiring the user of SomeArgs. I think this fix is
pretty self-explanatory. (facepalm)
2. queryRemoteConnectionServices in ConnectionServiceAdapter had an issue
where the callback would not get called if there was more than one
IConnectionServiceAdapter instances. This isn't an error condition, but
a condition where we don't query telecom for the list of valid remote
connection services. We ensure a callback with an empty list is made
(this is similar to what Telecom already does).
This seems to be an issue inherent with DSDS because there can be multiple
SIM ConnectionServices where before there was only one.
Test: Run CTS tests.
Bug: 133639062
Change-Id: I1c508e97d1f0ea1bc72ad7ebd026c1ad66a52de3
-rw-r--r-- | telecomm/java/android/telecom/ConnectionServiceAdapter.java | 9 | ||||
-rw-r--r-- | telecomm/java/android/telecom/ConnectionServiceAdapterServant.java | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapter.java b/telecomm/java/android/telecom/ConnectionServiceAdapter.java index 3acd83a41396..04e930ccd954 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapter.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapter.java @@ -325,6 +325,15 @@ final class ConnectionServiceAdapter implements DeathRecipient { } catch (RemoteException e) { Log.e(this, e, "Exception trying to query for remote CSs"); } + } else { + try { + // This is not an error condition, so just pass back an empty list. + // This happens when querying from a remote connection service, not the connection + // manager itself. + callback.onResult(Collections.EMPTY_LIST, Collections.EMPTY_LIST); + } catch (RemoteException e) { + Log.e(this, e, "Exception trying to query for remote CSs"); + } } } diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java index b28158913dc4..60b2172fdeca 100644 --- a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java @@ -477,7 +477,7 @@ final class ConnectionServiceAdapterServant { SomeArgs args = SomeArgs.obtain(); args.arg1 = callback; args.arg2 = callingPackage; - mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, callback).sendToTarget(); + mHandler.obtainMessage(MSG_QUERY_REMOTE_CALL_SERVICES, args).sendToTarget(); } @Override |