Make queryRemoteConnectionServices DSDS aware.
The method queryRemoteConnectionServices had the issue that it assumes
there is a single connection manager for the device. This assumption does
not work on a multisim device. Since the ConnectionManager is associated
with a particular carrier, this means that the connection mgr for one
carrier could try to impact calls destined for another carrier.
This change ensures that the calling package is passed into Telecom so
that we can determine which RemoteConnectionServices which are available to
the calling connection manager.
Test: Manual test on DSDS with a connection mgr carrier and another carrier.
Bug: 131856987
Change-Id: I46d80dc68adaab7fd4374f023d7ba4242804c253
diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapter.java b/telecomm/java/android/telecom/ConnectionServiceAdapter.java
index 6c3f4f3..3acd83a 100644
--- a/telecomm/java/android/telecom/ConnectionServiceAdapter.java
+++ b/telecomm/java/android/telecom/ConnectionServiceAdapter.java
@@ -316,11 +316,11 @@
/**
* Retrieves a list of remote connection services usable to place calls.
*/
- void queryRemoteConnectionServices(RemoteServiceCallback callback) {
+ void queryRemoteConnectionServices(RemoteServiceCallback callback, String callingPackage) {
// Only supported when there is only one adapter.
if (mAdapters.size() == 1) {
try {
- mAdapters.iterator().next().queryRemoteConnectionServices(callback,
+ mAdapters.iterator().next().queryRemoteConnectionServices(callback, callingPackage,
Log.getExternalSession());
} catch (RemoteException e) {
Log.e(this, e, "Exception trying to query for remote CSs");