summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-05-16 10:28:08 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-05-16 10:28:08 -0700
commita84b951bb7b1b736bdbcceabab0fb9fc3b8d3191 (patch)
treefd6da35c5e4299fe45f23dedaec94d117c0db76f
parenta998037205f3952694aeb850c008b0598c5b3709 (diff)
parent98af3dda7f9a48fd64d547736adf150dc5961952 (diff)
Merge 98af3dda7f9a48fd64d547736adf150dc5961952 on remote branch
Change-Id: I36e5acc18f1c024a2830e4d61e4c02a2d01809e1
-rw-r--r--src/com/android/services/telephony/TelephonyConnectionService.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index a2beb7ddea..543e9340be 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -136,7 +136,7 @@ public class TelephonyConnectionService extends ConnectionService {
}
};
- private final BroadcastReceiver mTtyBroadcastReceiver = new BroadcastReceiver() {
+ private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
@@ -149,6 +149,14 @@ public class TelephonyConnectionService extends ConnectionService {
if (isTtyNowEnabled != mIsTtyEnabled) {
handleTtyModeChange(isTtyNowEnabled);
}
+ } else if (ACTION_MSIM_VOICE_CAPABILITY_CHANGED.equals(action)) {
+ // Add extra to call if answering this incoming call would cause an in progress
+ // call on another subscription to be disconnected.
+ Connection ringingConnection = getRingingConnection();
+ if (ringingConnection != null) {
+ maybeIndicateAnsweringWillDisconnect((TelephonyConnection)ringingConnection,
+ ringingConnection.getPhoneAccountHandle());
+ }
}
}
};
@@ -179,6 +187,8 @@ public class TelephonyConnectionService extends ConnectionService {
@VisibleForTesting
public Pair<WeakReference<TelephonyConnection>, Queue<Phone>> mEmergencyRetryCache;
private DeviceState mDeviceState = new DeviceState();
+ private final String ACTION_MSIM_VOICE_CAPABILITY_CHANGED =
+ "org.codeaurora.intent.action.MSIM_VOICE_CAPABILITY_CHANGED";
/**
* Keeps track of the status of a SIM slot.
@@ -605,13 +615,14 @@ public class TelephonyConnectionService extends ConnectionService {
IntentFilter intentFilter = new IntentFilter(
TelecomManager.ACTION_TTY_PREFERRED_MODE_CHANGED);
- registerReceiver(mTtyBroadcastReceiver, intentFilter,
+ intentFilter.addAction(ACTION_MSIM_VOICE_CAPABILITY_CHANGED);
+ registerReceiver(mBroadcastReceiver, intentFilter,
android.Manifest.permission.MODIFY_PHONE_STATE, null);
}
@Override
public boolean onUnbind(Intent intent) {
- unregisterReceiver(mTtyBroadcastReceiver);
+ unregisterReceiver(mBroadcastReceiver);
return super.onUnbind(intent);
}