aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/android/ims/MmTelFeatureConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/android/ims/MmTelFeatureConnection.java')
-rw-r--r--src/java/com/android/ims/MmTelFeatureConnection.java92
1 files changed, 90 insertions, 2 deletions
diff --git a/src/java/com/android/ims/MmTelFeatureConnection.java b/src/java/com/android/ims/MmTelFeatureConnection.java
index 3170d413..c09fd94f 100644
--- a/src/java/com/android/ims/MmTelFeatureConnection.java
+++ b/src/java/com/android/ims/MmTelFeatureConnection.java
@@ -22,8 +22,11 @@ import android.os.IBinder;
import android.os.IInterface;
import android.os.Message;
import android.os.RemoteException;
+import android.telephony.SubscriptionManager;
import android.telephony.ims.ImsCallProfile;
import android.telephony.ims.ImsService;
+import android.telephony.ims.MediaQualityStatus;
+import android.telephony.ims.MediaThreshold;
import android.telephony.ims.RtpHeaderExtensionType;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.aidl.IImsConfig;
@@ -33,11 +36,14 @@ import android.telephony.ims.aidl.IImsRegistration;
import android.telephony.ims.aidl.IImsRegistrationCallback;
import android.telephony.ims.aidl.IImsSmsListener;
import android.telephony.ims.aidl.ISipTransport;
+import android.telephony.ims.aidl.ISrvccStartedCallback;
import android.telephony.ims.feature.CapabilityChangeRequest;
import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.stub.ImsEcbmImplBase;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.telephony.ims.stub.ImsSmsImplBase;
import android.util.Log;
+import android.util.SparseArray;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsEcbm;
@@ -45,7 +51,7 @@ import com.android.ims.internal.IImsMultiEndpoint;
import com.android.ims.internal.IImsUt;
import java.util.ArrayList;
-import java.util.Optional;
+import java.util.HashMap;
import java.util.Set;
/**
@@ -100,7 +106,6 @@ public class MmTelFeatureConnection extends FeatureConnection {
}
private class CapabilityCallbackManager extends ImsCallbackAdapterManager<IImsCapabilityCallback> {
-
public CapabilityCallbackManager(Context context, Object lock) {
super(context, lock, mSlotId, mSubId);
}
@@ -376,6 +381,22 @@ public class MmTelFeatureConnection extends FeatureConnection {
mProvisioningCallbackManager.removeCallback(callback);
}
+ public void setMediaThreshold(@MediaQualityStatus.MediaSessionType int sessionType,
+ MediaThreshold threshold) throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).setMediaQualityThreshold(sessionType, threshold);
+ }
+ }
+
+ public MediaQualityStatus queryMediaQualityStatus(
+ @MediaQualityStatus.MediaSessionType int sessionType) throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ return getServiceInterface(mBinder).queryMediaQualityStatus(sessionType);
+ }
+ }
+
public void changeEnabledCapabilities(CapabilityChangeRequest request,
IImsCapabilityCallback callback) throws RemoteException {
synchronized (mLock) {
@@ -504,6 +525,13 @@ public class MmTelFeatureConnection extends FeatureConnection {
}
}
+ public void onMemoryAvailable(int token) throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).onMemoryAvailable(token);
+ }
+ }
+
public void acknowledgeSms(int token, int messageRef,
@ImsSmsImplBase.SendStatusResult int result) throws RemoteException {
synchronized (mLock) {
@@ -512,6 +540,14 @@ public class MmTelFeatureConnection extends FeatureConnection {
}
}
+ public void acknowledgeSms(int token, int messageRef,
+ @ImsSmsImplBase.SendStatusResult int result, byte[] pdu) throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).acknowledgeSmsWithPdu(token, messageRef, result, pdu);
+ }
+ }
+
public void acknowledgeSmsReport(int token, int messageRef,
@ImsSmsImplBase.StatusReportResult int result) throws RemoteException {
synchronized (mLock) {
@@ -541,6 +577,45 @@ public class MmTelFeatureConnection extends FeatureConnection {
}
}
+ public void notifySrvccStarted(ISrvccStartedCallback cb)
+ throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).notifySrvccStarted(cb);
+ }
+ }
+
+ public void notifySrvccCompleted() throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).notifySrvccCompleted();
+ }
+ }
+
+ public void notifySrvccFailed() throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).notifySrvccFailed();
+ }
+ }
+
+ public void notifySrvccCanceled() throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).notifySrvccCanceled();
+ }
+ }
+
+ public void triggerDeregistration(@ImsRegistrationImplBase.ImsDeregistrationReason int reason)
+ throws RemoteException {
+ IImsRegistration registration = getRegistration();
+ if (registration != null) {
+ registration.triggerDeregistration(reason);
+ } else {
+ Log.e(TAG + " [" + mSlotId + "]", "triggerDeregistration IImsRegistration is null");
+ }
+ }
+
public @MmTelFeature.ProcessCallResult int shouldProcessCall(boolean isEmergency,
String[] numbers) throws RemoteException {
if (isEmergency && !isEmergencyMmTelAvailable()) {
@@ -576,6 +651,19 @@ public class MmTelFeatureConnection extends FeatureConnection {
}
}
+ /**
+ * Notifies the MmTelFeature of the enablement status of terminal based call waiting
+ *
+ * @param enabled indicates whether the user setting for call waiting is enabled or not.
+ */
+ public void setTerminalBasedCallWaitingStatus(boolean enabled)
+ throws RemoteException {
+ synchronized (mLock) {
+ checkServiceIsReady();
+ getServiceInterface(mBinder).setTerminalBasedCallWaitingStatus(enabled);
+ }
+ }
+
private IImsMmTelFeature getServiceInterface(IBinder b) {
return IImsMmTelFeature.Stub.asInterface(b);
}