Revert "Prevent Remote Connection Services from unbinding when conference merges."
This reverts commit ab8d14b2bcf0b00963b4daf5b9fd54ccd04cbb89.
Reason for revert: This temporary fix will be fixed in a more thorough way as part of the fix for b/286154316 in which we plan to ensure the associatedCallCount is always tracked accurately for both the remote connection service and primary connection service.
Change-Id: I83545dcc3ac16c84a4f1ce1bcf1210ba7fbd0d3e
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index c11ee6e..07b048d 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -525,8 +525,6 @@
.validateAccountIconUserBoundary(icon, callingUserHandle));
}
- if (ConnectionServiceWrapper.this.mIsRemoteConnectionService) return;
-
if (parcelableConference.getConnectElapsedTimeMillis() != 0
&& mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE)
!= PackageManager.PERMISSION_GRANTED) {
@@ -941,9 +939,6 @@
public void addExistingConnection(String callId, ParcelableConnection connection,
Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.aEC", mPackageAbbreviation);
-
- if (ConnectionServiceWrapper.this.mIsRemoteConnectionService) return;
-
UserHandle userHandle = Binder.getCallingUserHandle();
// Check that the Calling Package matches PhoneAccountHandle's Component Package
PhoneAccountHandle callingPhoneAccountHandle = connection.getPhoneAccount();
@@ -1358,7 +1353,6 @@
private final CallsManager mCallsManager;
private final AppOpsManager mAppOpsManager;
private final Context mContext;
- public boolean mIsRemoteConnectionService = false;
private ConnectionServiceFocusManager.ConnectionServiceFocusListener mConnSvrFocusListener;
@@ -2548,13 +2542,13 @@
private void logIncoming(String msg, Object... params) {
// Keep these as debug; the incoming logging is traced on a package level through the
// session logging.
- Log.d(this, "CS -> TC[" + Log.getPackageAbbreviation(mComponentName) + "]:"
- + " isRCS = " + this.mIsRemoteConnectionService + ": " + msg, params);
+ Log.d(this, "CS -> TC[" + Log.getPackageAbbreviation(mComponentName) + "]: "
+ + msg, params);
}
private void logOutgoing(String msg, Object... params) {
- Log.d(this, "TC -> CS[" + Log.getPackageAbbreviation(mComponentName) + "]:"
- + " isRCS = " + this.mIsRemoteConnectionService + ": " + msg, params);
+ Log.d(this, "TC -> CS[" + Log.getPackageAbbreviation(mComponentName) + "]: "
+ + msg, params);
}
private void queryRemoteConnectionServices(final UserHandle userHandle,
@@ -2581,7 +2575,6 @@
ConnectionServiceWrapper service = mConnectionServiceRepository.getService(
handle.getComponentName(), handle.getUserHandle());
if (service != null && service != this) {
- service.mIsRemoteConnectionService = true;
simServices.add(service);
} else {
// This is unexpected, normally PhoneAccounts with CAPABILITY_CALL_PROVIDER are not