summaryrefslogtreecommitdiff
path: root/telephony/java
diff options
context:
space:
mode:
authorBrad Ebinger <breadley@google.com>2018-01-22 13:51:52 -0800
committerBrad Ebinger <breadley@google.com>2018-01-25 14:11:37 -0800
commitf8c3cd8b3530a27f7534c32bac84c464ad5f66ae (patch)
tree696aad86ce1295d44e8da5d47194fed08f0b8072 /telephony/java
parent112c36d39f3668f5c90edc818045c4318957d018 (diff)
Make ImsService API @SystemApi
Marks the ImsService API as @SystemAPI. Bug: 63987047 Test: Build, Telephony unit tests Change-Id: I10f8a09950be87cb166b718d1dcc2954fba872cb
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java4
-rw-r--r--telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl (renamed from telephony/java/com/android/ims/ImsCallForwardInfo.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsCallForwardInfo.java (renamed from telephony/java/com/android/ims/ImsCallForwardInfo.java)42
-rw-r--r--telephony/java/android/telephony/ims/ImsCallProfile.aidl (renamed from telephony/java/com/android/ims/ImsCallProfile.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsCallProfile.java (renamed from telephony/java/com/android/ims/ImsCallProfile.java)118
-rw-r--r--telephony/java/android/telephony/ims/ImsCallSession.java (renamed from telephony/java/com/android/ims/internal/ImsCallSession.java)47
-rw-r--r--telephony/java/android/telephony/ims/ImsCallSessionListener.java537
-rw-r--r--telephony/java/android/telephony/ims/ImsConferenceState.aidl (renamed from telephony/java/com/android/ims/ImsConferenceState.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsConferenceState.java (renamed from telephony/java/com/android/ims/ImsConferenceState.java)15
-rw-r--r--telephony/java/android/telephony/ims/ImsExternalCallState.aidl (renamed from telephony/java/com/android/ims/ImsExternalCallState.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsExternalCallState.java (renamed from telephony/java/com/android/ims/ImsExternalCallState.java)13
-rw-r--r--telephony/java/android/telephony/ims/ImsReasonInfo.aidl (renamed from telephony/java/com/android/ims/ImsReasonInfo.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsReasonInfo.java (renamed from telephony/java/com/android/ims/ImsReasonInfo.java)35
-rw-r--r--telephony/java/android/telephony/ims/ImsService.java90
-rw-r--r--telephony/java/android/telephony/ims/ImsSsData.aidl (renamed from telephony/java/com/android/ims/ImsSsData.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsSsData.java (renamed from telephony/java/com/android/ims/ImsSsData.java)38
-rw-r--r--telephony/java/android/telephony/ims/ImsSsInfo.aidl (renamed from telephony/java/com/android/ims/ImsSsInfo.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsSsInfo.java (renamed from telephony/java/com/android/ims/ImsSsInfo.java)22
-rw-r--r--telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl (renamed from telephony/java/com/android/ims/ImsStreamMediaProfile.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsStreamMediaProfile.java (renamed from telephony/java/com/android/ims/ImsStreamMediaProfile.java)38
-rw-r--r--telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl (renamed from telephony/java/com/android/ims/ImsSuppServiceNotification.aidl)2
-rw-r--r--telephony/java/android/telephony/ims/ImsSuppServiceNotification.java (renamed from telephony/java/com/android/ims/ImsSuppServiceNotification.java)42
-rw-r--r--telephony/java/android/telephony/ims/ImsUtListener.java108
-rw-r--r--telephony/java/android/telephony/ims/ImsVideoCallProvider.java (renamed from telephony/java/com/android/ims/internal/ImsVideoCallProvider.java)9
-rw-r--r--telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl10
-rw-r--r--telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl3
-rw-r--r--telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl2
-rw-r--r--telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java4
-rw-r--r--telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java12
-rw-r--r--telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java (renamed from telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java)12
-rw-r--r--telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java45
-rw-r--r--telephony/java/android/telephony/ims/feature/ImsFeature.java143
-rw-r--r--telephony/java/android/telephony/ims/feature/MmTelFeature.java75
-rw-r--r--telephony/java/android/telephony/ims/feature/RcsFeature.java11
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java364
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java110
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java61
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java28
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java51
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java37
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java6
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsUtImplBase.java253
-rw-r--r--telephony/java/com/android/ims/ImsConfig.java1
-rw-r--r--telephony/java/com/android/ims/ImsException.java2
-rw-r--r--telephony/java/com/android/ims/ImsUtInterface.java2
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl4
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl10
-rw-r--r--telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl2
-rw-r--r--telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl25
-rw-r--r--telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl2
-rw-r--r--telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl2
-rw-r--r--telephony/java/com/android/ims/internal/IImsService.aidl2
-rw-r--r--telephony/java/com/android/ims/internal/IImsUtListener.aidl8
53 files changed, 1847 insertions, 616 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 91d86c698f84..a34e9f9481fa 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -27,8 +27,8 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.service.carrier.CarrierService;
+import android.telephony.ims.ImsReasonInfo;
-import com.android.ims.ImsReasonInfo;
import com.android.internal.telephony.ICarrierConfigLoader;
/**
@@ -1390,7 +1390,7 @@ public class CarrierConfigManager {
"allow_video_calling_fallback_bool";
/**
- * Defines operator-specific {@link com.android.ims.ImsReasonInfo} mappings.
+ * Defines operator-specific {@link ImsReasonInfo} mappings.
*
* Format: "ORIGINAL_CODE|MESSAGE|NEW_CODE"
* Where {@code ORIGINAL_CODE} corresponds to a {@link ImsReasonInfo#getCode()} code,
diff --git a/telephony/java/com/android/ims/ImsCallForwardInfo.aidl b/telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl
index a7c3f9a5f722..b322b39be7e4 100644
--- a/telephony/java/com/android/ims/ImsCallForwardInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsCallForwardInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsCallForwardInfo;
diff --git a/telephony/java/com/android/ims/ImsCallForwardInfo.java b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
index eeee0fc938bc..6d7218179067 100644
--- a/telephony/java/com/android/ims/ImsCallForwardInfo.java
+++ b/telephony/java/android/telephony/ims/ImsCallForwardInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,23 +25,32 @@ import android.os.Parcelable;
*
* @hide
*/
-public class ImsCallForwardInfo implements Parcelable {
+@SystemApi
+public final class ImsCallForwardInfo implements Parcelable {
// Refer to ImsUtInterface#CDIV_CF_XXX
+ /** @hide */
public int mCondition;
// 0: disabled, 1: enabled
+ /** @hide */
public int mStatus;
// 0x91: International, 0x81: Unknown
+ /** @hide */
public int mToA;
// Service class
+ /** @hide */
public int mServiceClass;
// Number (it will not include the "sip" or "tel" URI scheme)
+ /** @hide */
public String mNumber;
// No reply timer for CF
+ /** @hide */
public int mTimeSeconds;
+ /** @hide */
public ImsCallForwardInfo() {
}
+ /** @hide */
public ImsCallForwardInfo(Parcel in) {
readFromParcel(in);
}
@@ -91,4 +101,28 @@ public class ImsCallForwardInfo implements Parcelable {
return new ImsCallForwardInfo[size];
}
};
+
+ public int getCondition() {
+ return mCondition;
+ }
+
+ public int getStatus() {
+ return mStatus;
+ }
+
+ public int getToA() {
+ return mToA;
+ }
+
+ public int getServiceClass() {
+ return mServiceClass;
+ }
+
+ public String getNumber() {
+ return mNumber;
+ }
+
+ public int getTimeSeconds() {
+ return mTimeSeconds;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsCallProfile.aidl b/telephony/java/android/telephony/ims/ImsCallProfile.aidl
index a356d1352eb2..e24e14530916 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.aidl
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsCallProfile;
diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java
index 693aaff8ce0f..27e5f943982b 100644
--- a/telephony/java/com/android/ims/ImsCallProfile.java
+++ b/telephony/java/android/telephony/ims/ImsCallProfile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@ import com.android.internal.telephony.PhoneConstants;
*
* @hide
*/
-public class ImsCallProfile implements Parcelable {
+@SystemApi
+public final class ImsCallProfile implements Parcelable {
private static final String TAG = "ImsCallProfile";
/**
@@ -110,52 +112,92 @@ public class ImsCallProfile implements Parcelable {
* the video during voice call.
* conference_avail : Indicates if the session can be extended to the conference.
*/
+ /**
+ * @hide
+ */
public static final String EXTRA_CONFERENCE = "conference";
+ /**
+ * @hide
+ */
public static final String EXTRA_E_CALL = "e_call";
+ /**
+ * @hide
+ */
public static final String EXTRA_VMS = "vms";
+ /**
+ * @hide
+ */
public static final String EXTRA_CALL_MODE_CHANGEABLE = "call_mode_changeable";
+ /**
+ * @hide
+ */
public static final String EXTRA_CONFERENCE_AVAIL = "conference_avail";
// Extra string for internal use only. OEMs should not use
// this for packing extras.
+ /**
+ * @hide
+ */
public static final String EXTRA_OEM_EXTRAS = "OemCallExtras";
/**
- * Integer extra properties
- * oir : Rule for originating identity (number) presentation, MO/MT.
+ * Rule for originating identity (number) presentation, MO/MT.
* {@link ImsCallProfile#OIR_DEFAULT}
* {@link ImsCallProfile#OIR_PRESENTATION_RESTRICTED}
* {@link ImsCallProfile#OIR_PRESENTATION_NOT_RESTRICTED}
- * cnap : Rule for calling name presentation
+ */
+ public static final String EXTRA_OIR = "oir";
+ /**
+ * Rule for calling name presentation
* {@link ImsCallProfile#OIR_DEFAULT}
* {@link ImsCallProfile#OIR_PRESENTATION_RESTRICTED}
* {@link ImsCallProfile#OIR_PRESENTATION_NOT_RESTRICTED}
- * dialstring : To identify the Ims call type, MO
- * {@link ImsCallProfile#DIALSTRING_NORMAL_CALL}
+ */
+ public static final String EXTRA_CNAP = "cnap";
+ /**
+ * To identify the Ims call type, MO
+ * {@link ImsCallProfile#DIALSTRING_NORMAL}
* {@link ImsCallProfile#DIALSTRING_SS_CONF}
* {@link ImsCallProfile#DIALSTRING_USSD}
*/
- public static final String EXTRA_OIR = "oir";
- public static final String EXTRA_CNAP = "cnap";
public static final String EXTRA_DIALSTRING = "dialstring";
/**
* Values for EXTRA_OIR / EXTRA_CNAP
*/
+ /**
+ * Default presentation for Originating Identity.
+ */
public static final int OIR_DEFAULT = 0; // "user subscription default value"
+ /**
+ * Restricted presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_RESTRICTED = 1;
+ /**
+ * Not restricted presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2;
+ /**
+ * Presentation unknown for Originating Identity.
+ */
public static final int OIR_PRESENTATION_UNKNOWN = 3;
+ /**
+ * Payphone presentation for Originating Identity.
+ */
public static final int OIR_PRESENTATION_PAYPHONE = 4;
+ //Values for EXTRA_DIALSTRING
/**
- * Values for EXTRA_DIALSTRING
+ * A default or normal normal call.
*/
- // default (normal call)
public static final int DIALSTRING_NORMAL = 0;
- // Call for SIP-based user configuration
+ /**
+ * Call for SIP-based user configuration
+ */
public static final int DIALSTRING_SS_CONF = 1;
- // Call for USSD message
+ /**
+ * Call for USSD message
+ */
public static final int DIALSTRING_USSD = 2;
/**
@@ -215,8 +257,11 @@ public class ImsCallProfile implements Parcelable {
*/
public static final String EXTRA_CALL_RAT_TYPE_ALT = "callRadioTech";
+ /** @hide */
public int mServiceType;
+ /** @hide */
public int mCallType;
+ /** @hide */
public int mRestrictCause = CALL_RESTRICT_CAUSE_NONE;
/**
@@ -241,13 +286,17 @@ public class ImsCallProfile implements Parcelable {
* Invalid types will be removed when the {@link ImsCallProfile} is parceled for transmit across
* a {@link android.os.Binder}.
*/
+ /** @hide */
public Bundle mCallExtras;
+ /** @hide */
public ImsStreamMediaProfile mMediaProfile;
+ /** @hide */
public ImsCallProfile(Parcel in) {
readFromParcel(in);
}
+ /** @hide */
public ImsCallProfile() {
mServiceType = SERVICE_TYPE_NORMAL;
mCallType = CALL_TYPE_VOICE_N_VIDEO;
@@ -255,6 +304,7 @@ public class ImsCallProfile implements Parcelable {
mMediaProfile = new ImsStreamMediaProfile();
}
+ /** @hide */
public ImsCallProfile(int serviceType, int callType) {
mServiceType = serviceType;
mCallType = callType;
@@ -366,8 +416,28 @@ public class ImsCallProfile implements Parcelable {
}
};
+ public int getServiceType() {
+ return mServiceType;
+ }
+
+ public int getCallType() {
+ return mCallType;
+ }
+
+ public int getRestrictCause() {
+ return mRestrictCause;
+ }
+
+ public Bundle getCallExtras() {
+ return mCallExtras;
+ }
+
+ public ImsStreamMediaProfile getMediaProfile() {
+ return mMediaProfile;
+ }
+
/**
- * Converts from the call types defined in {@link com.android.ims.ImsCallProfile} to the
+ * Converts from the call types defined in {@link ImsCallProfile} to the
* video state values defined in {@link VideoProfile}.
*
* @param callProfile The call profile.
@@ -434,9 +504,9 @@ public class ImsCallProfile implements Parcelable {
}
/**
- * Translate presentation value to OIR value
- * @param presentation
- * @return OIR valuse
+ * Badly named old method, kept for compatibility.
+ * See {@link #presentationToOir(int)}.
+ * @hide
*/
public static int presentationToOIR(int presentation) {
switch (presentation) {
@@ -454,9 +524,19 @@ public class ImsCallProfile implements Parcelable {
}
/**
+ * Translate presentation value to OIR value
+ * @param presentation
+ * @return OIR values
+ */
+ public static int presentationToOir(int presentation) {
+ return presentationToOIR(presentation);
+ }
+
+ /**
* Translate OIR value to presentation value
* @param oir value
* @return presentation value
+ * @hide
*/
public static int OIRToPresentation(int oir) {
switch(oir) {
diff --git a/telephony/java/com/android/ims/internal/ImsCallSession.java b/telephony/java/android/telephony/ims/ImsCallSession.java
index e914f484fc74..c3d103f88db3 100644
--- a/telephony/java/com/android/ims/internal/ImsCallSession.java
+++ b/telephony/java/android/telephony/ims/ImsCallSession.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,23 +11,26 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims.internal;
+package android.telephony.ims;
+import android.annotation.CallbackExecutor;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.os.Message;
import android.os.RemoteException;
import android.telephony.ims.aidl.IImsCallSessionListener;
import java.util.Objects;
+import java.util.concurrent.Executor;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
import android.util.Log;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
+
+import com.android.ims.internal.IImsCallSession;
+import com.android.ims.internal.IImsVideoCallProvider;
/**
* Provides the call initiation/termination, and media exchange between two IMS endpoints.
@@ -39,7 +42,8 @@ public class ImsCallSession {
private static final String TAG = "ImsCallSession";
/**
- * Defines IMS call session state.
+ * Defines IMS call session state. Please use {@link ImsCallSessionImplBase.State} definition.
+ * This is kept around for capability reasons.
*/
public static class State {
public static final int IDLE = 0;
@@ -92,6 +96,7 @@ public class ImsCallSession {
* Listener for events relating to an IMS session, such as when a session is being
* recieved ("on ringing") or a call is outgoing ("on calling").
* <p>Many of these events are also received by {@link ImsCall.Listener}.</p>
+ * @hide
*/
public static class Listener {
/**
@@ -449,6 +454,7 @@ public class ImsCallSession {
private boolean mClosed = false;
private Listener mListener;
+ /** @hide */
public ImsCallSession(IImsCallSession iSession) {
miSession = iSession;
@@ -462,6 +468,7 @@ public class ImsCallSession {
}
}
+ /** @hide */
public ImsCallSession(IImsCallSession iSession, Listener listener) {
this(iSession);
setListener(listener);
@@ -470,15 +477,17 @@ public class ImsCallSession {
/**
* Closes this object. This object is not usable after being closed.
*/
- public synchronized void close() {
- if (mClosed) {
- return;
- }
+ public void close() {
+ synchronized (this) {
+ if (mClosed) {
+ return;
+ }
- try {
- miSession.close();
- mClosed = true;
- } catch (RemoteException e) {
+ try {
+ miSession.close();
+ mClosed = true;
+ } catch (RemoteException e) {
+ }
}
}
@@ -554,6 +563,7 @@ public class ImsCallSession {
* Gets the video call provider for the session.
*
* @return The video call provider.
+ * @hide
*/
public IImsVideoCallProvider getVideoCallProvider() {
if (mClosed) {
@@ -659,6 +669,7 @@ public class ImsCallSession {
* override the previous listener.
*
* @param listener to listen to the session events of this object
+ * @hide
*/
public void setListener(Listener listener) {
mListener = listener;
@@ -1274,7 +1285,7 @@ public class ImsCallSession {
}
/**
- * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may
+ * Notifies of a case where a {@link ImsCallSession} may
* potentially handover from one radio technology to another.
* @param srcAccessTech The source radio access technology; one of the access technology
* constants defined in {@link android.telephony.ServiceState}. For
diff --git a/telephony/java/android/telephony/ims/ImsCallSessionListener.java b/telephony/java/android/telephony/ims/ImsCallSessionListener.java
index 96c7af6bd039..a7f124a5b791 100644
--- a/telephony/java/android/telephony/ims/ImsCallSessionListener.java
+++ b/telephony/java/android/telephony/ims/ImsCallSessionListener.java
@@ -16,343 +16,508 @@
package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.RemoteException;
import android.telephony.ims.aidl.IImsCallSessionListener;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.internal.ImsCallSession;
/**
- * Proxy class for interfacing with the framework's Call session for an ongoing IMS call.
- *
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsCallSessionListener maintained by other ImsServices.
+ * Listener interface for notifying the Framework's {@link ImsCallSession} for updates to an ongoing
+ * IMS call.
*
* @hide
*/
+// DO NOT remove or change the existing APIs, only add new ones to this implementation or you
+// will break other implementations of ImsCallSessionListener maintained by other ImsServices.
+// TODO: APIs in here do not conform to API guidelines yet. This can be changed if
+// ImsCallSessionListenerConverter is also changed.
+@SystemApi
public class ImsCallSessionListener {
private final IImsCallSessionListener mListener;
+ /** @hide */
public ImsCallSessionListener(IImsCallSessionListener l) {
mListener = l;
}
/**
- * Called when a request is sent out to initiate a new session
- * and 1xx response is received from the network.
+ * A request has been sent out to initiate a new IMS call session and a 1xx response has been
+ * received from the network.
*/
- public void callSessionProgressing(ImsStreamMediaProfile profile)
- throws RemoteException {
- mListener.callSessionProgressing(profile);
+ public void callSessionProgressing(ImsStreamMediaProfile profile) {
+ try {
+ mListener.callSessionProgressing(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session is initiated.
+ * The IMS call session has been initiated.
*
- * @param profile the associated {@link ImsCallSession}.
+ * @param profile the associated {@link ImsCallProfile}.
*/
- public void callSessionInitiated(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionInitiated(profile);
+ public void callSessionInitiated(ImsCallProfile profile) {
+ try {
+ mListener.callSessionInitiated(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session establishment has failed.
+ * The IMS call session establishment has failed.
*
- * @param reasonInfo detailed reason of the session establishment failure
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the IMS call session
+ * establishment failure.
*/
- public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionInitiatedFailed(reasonInfo);
+ public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionInitiatedFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session is terminated.
+ * The IMS call session has been terminated.
*
- * @param reasonInfo detailed reason of the session termination
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the session termination.
*/
- public void callSessionTerminated(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionTerminated(reasonInfo);
+ public void callSessionTerminated(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionTerminated(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session is on hold.
+ * The IMS call session has started the process of holding the call. If it fails,
+ * {@link #callSessionHoldFailed(ImsReasonInfo)} should be called.
+ *
+ * If the IMS call session is resumed, call {@link #callSessionResumed(ImsCallProfile)}.
+ *
+ * @param profile The associated {@link ImsCallProfile} of the call session that has been put
+ * on hold.
*/
- public void callSessionHeld(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionHeld(profile);
+ public void callSessionHeld(ImsCallProfile profile) {
+ try {
+ mListener.callSessionHeld(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session hold has failed.
+ * The IMS call session has failed to be held.
*
- * @param reasonInfo detailed reason of the session hold failure
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the session hold failure.
*/
- public void callSessionHoldFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHoldFailed(reasonInfo);
+ public void callSessionHoldFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHoldFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session hold is received from the remote user.
+ * This IMS Call session has been put on hold by the remote party.
+ *
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
*/
- public void callSessionHoldReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionHoldReceived(profile);
+ public void callSessionHoldReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionHoldReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session resume is done.
+ * The IMS call session has started the process of resuming the call. If the process of resuming
+ * the call fails, call {@link #callSessionResumeFailed(ImsReasonInfo)}.
+ *
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
*/
- public void callSessionResumed(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionResumed(profile);
+ public void callSessionResumed(ImsCallProfile profile) {
+ try {
+ mListener.callSessionResumed(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session resume has failed.
+ * The IMS call session resume has failed.
*
- * @param reasonInfo detailed reason of the session resume failure
+ * @param reasonInfo {@link ImsReasonInfo} containing the detailed reason of the session resume
+ * failure.
*/
- public void callSessionResumeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionResumeFailed(reasonInfo);
+ public void callSessionResumeFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionResumeFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session resume is received from the remote user.
+ * The remote party has resumed this IMS call session.
+ *
+ * @param profile {@link ImsCallProfile} associated with the IMS call session.
*/
- public void callSessionResumeReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionResumeReceived(profile);
+ public void callSessionResumeReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionResumeReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session merge has been started. At this point, the {@code newSession}
- * represents the session which has been initiated to the IMS conference server for the
- * new merged conference.
+ * The IMS call session merge has been started. At this point, the {@code newSession}
+ * represents the IMS call session which represents the new merged conference and has been
+ * initiated to the IMS conference server.
*
- * @param newSession the session object that is merged with an active & hold session
+ * @param newSession the {@link ImsCallSessionImplBase} that represents the merged active & held
+ * sessions.
+ * @param profile The {@link ImsCallProfile} associated with this IMS call session.
*/
- public void callSessionMergeStarted(ImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionMergeStarted(newSession != null ? newSession.getSession() : null,
- profile);
+ public void callSessionMergeStarted(ImsCallSessionImplBase newSession, ImsCallProfile profile)
+ {
+ try {
+ mListener.callSessionMergeStarted(newSession != null ?
+ newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session merge has been started. At this point, the {@code newSession}
- * represents the session which has been initiated to the IMS conference server for the
- * new merged conference.
- *
- * @param newSession the session object that is merged with an active & hold session
+ * Compatibility method for older implementations.
+ * See {@link #callSessionMergeStarted(ImsCallSessionImplBase, ImsCallProfile)}.
*
* @hide
*/
public void callSessionMergeStarted(IImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionMergeStarted(newSession, profile);
+ {
+ try {
+ mListener.callSessionMergeStarted(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session merge is successful and the merged session is active.
+ * The session merge is successful and the merged {@link ImsCallSession} is active.
*
- * @param newSession the new session object that is used for the conference
+ * @param newSession the new {@link ImsCallSessionImplBase}
+ * that represents the conference IMS call
+ * session.
*/
- public void callSessionMergeComplete(ImsCallSession newSession) throws RemoteException {
- mListener.callSessionMergeComplete(newSession != null ? newSession.getSession() : null);
+ public void callSessionMergeComplete(ImsCallSessionImplBase newSession) {
+ try {
+ mListener.callSessionMergeComplete(newSession != null ?
+ newSession.getServiceImpl() : null);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session merge is successful and the merged session is active.
+ * Compatibility method for older implementations of ImsService.
*
- * @param newSession the new session object that is used for the conference
+ * See {@link #callSessionMergeComplete(ImsCallSessionImplBase)}}.
*
* @hide
*/
- public void callSessionMergeComplete(IImsCallSession newSession) throws RemoteException {
- mListener.callSessionMergeComplete(newSession);
+ public void callSessionMergeComplete(IImsCallSession newSession) {
+ try {
+ mListener.callSessionMergeComplete(newSession);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session merge has failed.
+ * The IMS call session merge has failed.
*
- * @param reasonInfo detailed reason of the call merge failure
+ * @param reasonInfo {@link ImsReasonInfo} contining the reason for the call merge failure.
*/
- public void callSessionMergeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionMergeFailed(reasonInfo);
+ public void callSessionMergeFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionMergeFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session is updated (except for hold/unhold).
+ * The IMS call session profile has been updated. Does not include holding or resuming a call.
+ *
+ * @param profile The {@link ImsCallProfile} associated with the updated IMS call session.
*/
- public void callSessionUpdated(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionUpdated(profile);
+ public void callSessionUpdated(ImsCallProfile profile) {
+ try {
+ mListener.callSessionUpdated(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session update has failed.
+ * The IMS call session profile update has failed.
*
- * @param reasonInfo detailed reason of the session update failure
+ * @param reasonInfo {@link ImsReasonInfo} containing a reason for the session update failure.
*/
- public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionUpdateFailed(reasonInfo);
+ public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionUpdateFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session update is received from the remote user.
+ * The IMS call session profile has received an update from the remote user.
+ *
+ * @param profile The new {@link ImsCallProfile} associated with the update.
*/
- public void callSessionUpdateReceived(ImsCallProfile profile) throws RemoteException {
- mListener.callSessionUpdateReceived(profile);
+ public void callSessionUpdateReceived(ImsCallProfile profile) {
+ try {
+ mListener.callSessionUpdateReceived(profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
* Called when the session has been extended to a conference session.
*
- * @param newSession the session object that is extended to the conference
- * from the active session
+ * If the conference extension fails, call
+ * {@link #callSessionConferenceExtendFailed(ImsReasonInfo)}.
+ *
+ * @param newSession the session object that is extended to the conference from the active
+ * IMS Call session.
+ * @param profile The {@link ImsCallProfile} associated with the IMS call session.
*/
- public void callSessionConferenceExtended(ImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionConferenceExtended(newSession != null ? newSession.getSession() : null,
- profile);
+ public void callSessionConferenceExtended(ImsCallSessionImplBase newSession,
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtended(
+ newSession != null ? newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the session has been extended to a conference session.
+ * Compatibility method to interface with older versions of ImsService.
+ * See {@link #callSessionConferenceExtended(ImsCallSessionImplBase, ImsCallProfile)}.
*
- * @param newSession the session object that is extended to the conference
- * from the active session
* @hide
*/
- public void callSessionConferenceExtended(IImsCallSession newSession, ImsCallProfile profile)
- throws RemoteException {
- mListener.callSessionConferenceExtended(newSession, profile);
+ public void callSessionConferenceExtended(IImsCallSession newSession, ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtended(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the conference extension has failed.
+ * The previous conference extension has failed.
*
- * @param reasonInfo detailed reason of the conference extension failure
+ * @param reasonInfo {@link ImsReasonInfo} containing the detailed reason of the conference
+ * extension failure.
*/
- public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionConferenceExtendFailed(reasonInfo);
+ public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionConferenceExtendFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the conference extension is received from the remote user.
+ * A conference extension has been received received from the remote party.
+ *
+ * @param newSession An {@link ImsCallSessionImplBase}
+ * representing the extended IMS call session.
+ * @param profile The {@link ImsCallProfile} associated with the new IMS call session.
*/
- public void callSessionConferenceExtendReceived(ImsCallSession newSession,
- ImsCallProfile profile) throws RemoteException {
- mListener.callSessionConferenceExtendReceived(newSession != null
- ? newSession.getSession() : null, profile);
+ public void callSessionConferenceExtendReceived(ImsCallSessionImplBase newSession,
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtendReceived(newSession != null
+ ? newSession.getServiceImpl() : null, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the conference extension is received from the remote user.
+ * Compatibility method to interface with older versions of ImsService.
+ * See {@link #callSessionConferenceExtendReceived(ImsCallSessionImplBase, ImsCallProfile)}.
*
* @hide
*/
public void callSessionConferenceExtendReceived(IImsCallSession newSession,
- ImsCallProfile profile) throws RemoteException {
- mListener.callSessionConferenceExtendReceived(newSession, profile);
+ ImsCallProfile profile) {
+ try {
+ mListener.callSessionConferenceExtendReceived(newSession, profile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the invitation request of the participants is delivered to the conference
+ * The request to invite participants to the conference has been delivered to the conference
* server.
*/
- public void callSessionInviteParticipantsRequestDelivered() throws RemoteException {
- mListener.callSessionInviteParticipantsRequestDelivered();
+ public void callSessionInviteParticipantsRequestDelivered() {
+ try {
+ mListener.callSessionInviteParticipantsRequestDelivered();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the invitation request of the participants has failed.
+ * The previous request to invite participants to the conference (see
+ * {@link #callSessionInviteParticipantsRequestDelivered()}) has failed.
*
- * @param reasonInfo detailed reason of the conference invitation failure
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason forthe conference invitation
+ * failure.
*/
public void callSessionInviteParticipantsRequestFailed(ImsReasonInfo reasonInfo)
- throws RemoteException {
- mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ {
+ try {
+ mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the removal request of the participants is delivered to the conference
+ * The request to remove participants from the conference has been delivered to the conference
* server.
*/
- public void callSessionRemoveParticipantsRequestDelivered() throws RemoteException {
- mListener.callSessionRemoveParticipantsRequestDelivered();
+ public void callSessionRemoveParticipantsRequestDelivered() {
+ try {
+ mListener.callSessionRemoveParticipantsRequestDelivered();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the removal request of the participants has failed.
+ * The previous request to remove participants from the conference (see
+ * {@link #callSessionRemoveParticipantsRequestDelivered()}) has failed.
*
- * @param reasonInfo detailed reason of the conference removal failure
+ * @param reasonInfo {@link ImsReasonInfo} detailing the reason for the conference removal
+ * failure.
*/
public void callSessionRemoveParticipantsRequestFailed(ImsReasonInfo reasonInfo)
- throws RemoteException {
- mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ {
+ try {
+ mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Notifies the framework of the updated Call session conference state.
+ * The IMS call session's conference state has changed.
*
- * @param state the new {@link ImsConferenceState} associated with the conference.
+ * @param state The new {@link ImsConferenceState} associated with the conference.
*/
- public void callSessionConferenceStateUpdated(ImsConferenceState state) throws RemoteException {
- mListener.callSessionConferenceStateUpdated(state);
+ public void callSessionConferenceStateUpdated(ImsConferenceState state) {
+ try {
+ mListener.callSessionConferenceStateUpdated(state);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Notifies the incoming USSD message.
+ * The IMS call session has received a Ussd message.
+ *
+ * @param mode The mode of the USSD message, either
+ * {@link ImsCallSessionImplBase#USSD_MODE_NOTIFY} or
+ * {@link ImsCallSessionImplBase#USSD_MODE_REQUEST}.
+ * @param ussdMessage The USSD message.
*/
public void callSessionUssdMessageReceived(int mode, String ussdMessage)
- throws RemoteException {
- mListener.callSessionUssdMessageReceived(mode, ussdMessage);
+ {
+ try {
+ mListener.callSessionUssdMessageReceived(mode, ussdMessage);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may potentially
- * handover from one radio technology to another.
+ * An {@link ImsCallSession} may potentially handover from one radio
+ * technology to another.
*
- * @param srcAccessTech The source radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example
- * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
+ * @param srcAccessTech The source radio access technology; one of the access technology
+ * constants defined in {@link android.telephony.ServiceState}. For example
+ * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
* @param targetAccessTech The target radio access technology; one of the access technology
- * constants defined in {@link android.telephony.ServiceState}. For
- * example
- * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
+ * constants defined in {@link android.telephony.ServiceState}. For example
+ * {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
*/
public void callSessionMayHandover(int srcAccessTech, int targetAccessTech)
- throws RemoteException {
- mListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
+ {
+ try {
+ mListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when session access technology changes.
+ * The IMS call session's access technology has changed.
*
- * @param srcAccessTech original access technology
- * @param targetAccessTech new access technology
- * @param reasonInfo
+ * @param srcAccessTech original access technology, defined in
+ * {@link android.telephony.ServiceState}.
+ * @param targetAccessTech new access technology, defined in
+ * {@link android.telephony.ServiceState}.
+ * @param reasonInfo The {@link ImsReasonInfo} associated with this handover.
*/
public void callSessionHandover(int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
+ ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when session access technology change fails.
+ * The IMS call session's access technology change has failed..
*
* @param srcAccessTech original access technology
* @param targetAccessTech new access technology
- * @param reasonInfo handover failure reason
+ * @param reasonInfo An {@link ImsReasonInfo} detailing the reason for the failure.
*/
public void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
- ImsReasonInfo reasonInfo) throws RemoteException {
- mListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
+ ImsReasonInfo reasonInfo) {
+ try {
+ mListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the TTY mode is changed by the remote party.
+ * The TTY mode has been changed by the remote party.
*
* @param mode one of the following: -
* {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} -
@@ -360,53 +525,79 @@ public class ImsCallSessionListener {
* {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} -
* {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
*/
- public void callSessionTtyModeReceived(int mode) throws RemoteException {
- mListener.callSessionTtyModeReceived(mode);
+ public void callSessionTtyModeReceived(int mode) {
+ try {
+ mListener.callSessionTtyModeReceived(mode);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the multiparty state is changed for this {@code ImsCallSession}.
+ * The multiparty state has been changed for this {@code ImsCallSession}.
*
- * @param isMultiParty {@code true} if the session became multiparty,
- * {@code false} otherwise.
+ * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise.
*/
-
- public void callSessionMultipartyStateChanged(boolean isMultiParty) throws RemoteException {
- mListener.callSessionMultipartyStateChanged(isMultiParty);
+ public void callSessionMultipartyStateChanged(boolean isMultiParty) {
+ try {
+ mListener.callSessionMultipartyStateChanged(isMultiParty);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Called when the supplementary service information is received for the current session.
+ * Supplementary service information has been received for the current IMS call session.
+ *
+ * @param suppSrvNotification The {@link ImsSuppServiceNotification} containing the change.
*/
public void callSessionSuppServiceReceived(ImsSuppServiceNotification suppSrvNotification)
- throws RemoteException {
- mListener.callSessionSuppServiceReceived(suppSrvNotification);
+ {
+ try {
+ mListener.callSessionSuppServiceReceived(suppSrvNotification);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Received RTT modify request from the remote party.
+ * An RTT modify request has been received from the remote party.
*
- * @param callProfile ImsCallProfile with updated attributes
+ * @param callProfile An {@link ImsCallProfile} with the updated attributes
*/
public void callSessionRttModifyRequestReceived(ImsCallProfile callProfile)
- throws RemoteException {
- mListener.callSessionRttModifyRequestReceived(callProfile);
+ {
+ try {
+ mListener.callSessionRttModifyRequestReceived(callProfile);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
+ * An RTT modify response has been received.
+ *
* @param status the received response for RTT modify request.
*/
- public void callSessionRttModifyResponseReceived(int status) throws RemoteException {
- mListener.callSessionRttModifyResponseReceived(status);
+ public void callSessionRttModifyResponseReceived(int status) {
+ try {
+ mListener.callSessionRttModifyResponseReceived(status);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
/**
- * Device received RTT message from Remote UE.
+ * An RTT message has been received from the remote party.
*
- * @param rttMessage RTT message received
- */
- public void callSessionRttMessageReceived(String rttMessage) throws RemoteException {
- mListener.callSessionRttMessageReceived(rttMessage);
+ * @param rttMessage The RTT message that has been received.
+ */
+ public void callSessionRttMessageReceived(String rttMessage) {
+ try {
+ mListener.callSessionRttMessageReceived(rttMessage);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
}
diff --git a/telephony/java/com/android/ims/ImsConferenceState.aidl b/telephony/java/android/telephony/ims/ImsConferenceState.aidl
index 2fc029f57902..e2b371c1440e 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.aidl
+++ b/telephony/java/android/telephony/ims/ImsConferenceState.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsConferenceState;
diff --git a/telephony/java/com/android/ims/ImsConferenceState.java b/telephony/java/android/telephony/ims/ImsConferenceState.java
index 0afde88b8918..66d2f8d929d3 100644
--- a/telephony/java/com/android/ims/ImsConferenceState.java
+++ b/telephony/java/android/telephony/ims/ImsConferenceState.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,16 +11,17 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@ import android.telecom.Connection;
*
* @hide
*/
-public class ImsConferenceState implements Parcelable {
+@SystemApi
+public final class ImsConferenceState implements Parcelable {
/**
* conference-info : user
*/
@@ -87,12 +89,13 @@ public class ImsConferenceState implements Parcelable {
*/
public static final String SIP_STATUS_CODE = "sipstatuscode";
- public HashMap<String, Bundle> mParticipants = new HashMap<String, Bundle>();
+ public final HashMap<String, Bundle> mParticipants = new HashMap<String, Bundle>();
+ /** @hide */
public ImsConferenceState() {
}
- public ImsConferenceState(Parcel in) {
+ private ImsConferenceState(Parcel in) {
readFromParcel(in);
}
diff --git a/telephony/java/com/android/ims/ImsExternalCallState.aidl b/telephony/java/android/telephony/ims/ImsExternalCallState.aidl
index c208702a8c34..99d293566806 100644
--- a/telephony/java/com/android/ims/ImsExternalCallState.aidl
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsExternalCallState;
diff --git a/telephony/java/com/android/ims/ImsExternalCallState.java b/telephony/java/android/telephony/ims/ImsExternalCallState.java
index da2607356d6c..e82c115cb4b3 100644
--- a/telephony/java/com/android/ims/ImsExternalCallState.java
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -32,7 +33,8 @@ import android.telephony.Rlog;
* Parcelable object to handle MultiEndpoint Dialog Information
* @hide
*/
-public class ImsExternalCallState implements Parcelable {
+@SystemApi
+public final class ImsExternalCallState implements Parcelable {
private static final String TAG = "ImsExternalCallState";
@@ -50,9 +52,11 @@ public class ImsExternalCallState implements Parcelable {
private int mCallType;
private boolean mIsHeld;
+ /** @hide */
public ImsExternalCallState() {
}
+ /** @hide */
public ImsExternalCallState(int callId, Uri address, boolean isPullable, int callState,
int callType, boolean isCallheld) {
mCallId = callId;
@@ -64,6 +68,7 @@ public class ImsExternalCallState implements Parcelable {
Rlog.d(TAG, "ImsExternalCallState = " + this);
}
+ /** @hide */
public ImsExternalCallState(Parcel in) {
mCallId = in.readInt();
ClassLoader classLoader = ImsExternalCallState.class.getClassLoader();
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.aidl b/telephony/java/android/telephony/ims/ImsReasonInfo.aidl
index 17e6d3a729e9..604b323d1292 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsReasonInfo;
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java
index 83d9bd94013e..52a6ab902d9a 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,8 @@ import android.os.Parcelable;
*
* @hide
*/
-public class ImsReasonInfo implements Parcelable {
+@SystemApi
+public final class ImsReasonInfo implements Parcelable {
/**
* Specific code of each types
@@ -418,27 +420,36 @@ public class ImsReasonInfo implements Parcelable {
// For main reason code
- public int mCode;
+ /** @hide */
+ public final int mCode;
// For the extra code value; it depends on the code value.
- public int mExtraCode;
+ /** @hide */
+ public final int mExtraCode;
// For the additional message of the reason info.
- public String mExtraMessage;
+ /** @hide */
+ public final String mExtraMessage;
+
+ /** @hide */
public ImsReasonInfo() {
mCode = CODE_UNSPECIFIED;
mExtraCode = CODE_UNSPECIFIED;
mExtraMessage = null;
}
- public ImsReasonInfo(Parcel in) {
- readFromParcel(in);
+ private ImsReasonInfo(Parcel in) {
+ mCode = in.readInt();
+ mExtraCode = in.readInt();
+ mExtraMessage = in.readString();
}
+ /** @hide */
public ImsReasonInfo(int code, int extraCode) {
mCode = code;
mExtraCode = extraCode;
mExtraMessage = null;
}
+ /** @hide */
public ImsReasonInfo(int code, int extraCode, String extraMessage) {
mCode = code;
mExtraCode = extraCode;
@@ -487,12 +498,6 @@ public class ImsReasonInfo implements Parcelable {
out.writeString(mExtraMessage);
}
- private void readFromParcel(Parcel in) {
- mCode = in.readInt();
- mExtraCode = in.readInt();
- mExtraMessage = in.readString();
- }
-
public static final Creator<ImsReasonInfo> CREATOR = new Creator<ImsReasonInfo>() {
@Override
public ImsReasonInfo createFromParcel(Parcel in) {
diff --git a/telephony/java/android/telephony/ims/ImsService.java b/telephony/java/android/telephony/ims/ImsService.java
index 2f32bae88f03..2748cb5470bf 100644
--- a/telephony/java/android/telephony/ims/ImsService.java
+++ b/telephony/java/android/telephony/ims/ImsService.java
@@ -51,9 +51,7 @@ import static android.Manifest.permission.MODIFY_PHONE_STATE;
* ...
* <service android:name=".EgImsService"
* android:permission="android.permission.BIND_IMS_SERVICE" >
- * <!-- Apps must declare which features they support as metadata. The different categories are
- * defined below. In this example, the RCS_FEATURE feature is supported. -->
- * <meta-data android:name="android.telephony.ims.RCS_FEATURE" android:value="true" />
+ * ...
* <intent-filter>
* <action android:name="android.telephony.ims.ImsService" />
* </intent-filter>
@@ -65,12 +63,33 @@ import static android.Manifest.permission.MODIFY_PHONE_STATE;
* 1) Defined as the default ImsService for the device in the device overlay using
* "config_ims_package".
* 2) Defined as a Carrier Provided ImsService in the Carrier Configuration using
- * {@link CarrierConfigManager#KEY_CTONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
+ * {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}.
+ *
+ * There are two ways to define to the platform which {@link ImsFeature}s this {@link ImsService}
+ * supports, dynamic or static definitions.
+ *
+ * In the static definition, the {@link ImsFeature}s that are supported are defined in the service
+ * definition of the AndroidManifest.xml file as metadata:
+ * <!-- Apps must declare which features they support as metadata. The different categories are
+ * defined below. In this example, the MMTEL_FEATURE feature is supported. -->
+ * <meta-data android:name="android.telephony.ims.MMTEL_FEATURE" android:value="true" />
*
* The features that are currently supported in an ImsService are:
* - RCS_FEATURE: This ImsService implements the RcsFeature class.
* - MMTEL_FEATURE: This ImsService implements the MmTelFeature class.
- * @hide
+ * - EMERGENCY_MMTEL_FEATURE: This ImsService supports Emergency Calling for MMTEL, must be
+ * declared along with the MMTEL_FEATURE. If this is not specified, the framework will use
+ * circuit switch for emergency calling.
+ *
+ * In the dynamic definition, the supported features are not specified in the service definition
+ * of the AndroidManifest. Instead, the framework binds to this service and calls
+ * {@link #querySupportedImsFeatures()}. The {@link ImsService} then returns an
+ * {@link ImsFeatureConfiguration}, which the framework uses to initialize the supported
+ * {@link ImsFeature}s. If at any time, the list of supported {@link ImsFeature}s changes,
+ * {@link #onUpdateSupportedImsFeatures(ImsFeatureConfiguration)} can be called to tell the
+ * framework of the changes.
+ *
+ * @hide
*/
@SystemApi
public class ImsService extends Service {
@@ -127,8 +146,7 @@ public class ImsService extends Service {
}
@Override
- public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c)
- throws RemoteException {
+ public void removeImsFeature(int slotId, int featureType, IImsFeatureStatusCallback c) {
ImsService.this.removeImsFeature(slotId, featureType, c);
}
@@ -143,19 +161,18 @@ public class ImsService extends Service {
}
@Override
- public void notifyImsFeatureReady(int slotId, int featureType)
- throws RemoteException {
+ public void notifyImsFeatureReady(int slotId, int featureType) {
ImsService.this.notifyImsFeatureReady(slotId, featureType);
}
@Override
- public IImsConfig getConfig(int slotId) throws RemoteException {
+ public IImsConfig getConfig(int slotId) {
ImsConfigImplBase c = ImsService.this.getConfig(slotId);
return c != null ? c.getIImsConfig() : null;
}
@Override
- public IImsRegistration getRegistration(int slotId) throws RemoteException {
+ public IImsRegistration getRegistration(int slotId) {
ImsRegistrationImplBase r = ImsService.this.getRegistration(slotId);
return r != null ? r.getBinder() : null;
}
@@ -277,12 +294,14 @@ public class ImsService extends Service {
}
/**
- * When called, provide the {@link ImsFeatureConfiguration} that this ImsService currently
- * supports. This will trigger the framework to set up the {@link ImsFeature}s that correspond
- * to the {@link ImsFeature.FeatureType}s configured here.
- * @return an {@link ImsFeatureConfiguration} containing Features this ImsService supports,
- * defined in {@link ImsFeature.FeatureType}.
- * @hide
+ * When called, provide the {@link ImsFeatureConfiguration} that this {@link ImsService}
+ * currently supports. This will trigger the framework to set up the {@link ImsFeature}s that
+ * correspond to the {@link ImsFeature}s configured here.
+ *
+ * Use {@link #onUpdateSupportedImsFeatures(ImsFeatureConfiguration)} to change the supported
+ * {@link ImsFeature}s.
+ *
+ * @return an {@link ImsFeatureConfiguration} containing Features this ImsService supports.
*/
public ImsFeatureConfiguration querySupportedImsFeatures() {
// Return empty for base implementation
@@ -291,9 +310,8 @@ public class ImsService extends Service {
/**
* Updates the framework with a new {@link ImsFeatureConfiguration} containing the updated
- * features, defined in {@link ImsFeature.FeatureType} that this ImsService supports. This may
- * trigger the framework to add/remove new ImsFeatures, depending on the configuration.
- * @hide
+ * features, that this {@link ImsService} supports. This may trigger the framework to add/remove
+ * new ImsFeatures, depending on the configuration.
*/
public final void onUpdateSupportedImsFeatures(ImsFeatureConfiguration c)
throws RemoteException {
@@ -306,11 +324,12 @@ public class ImsService extends Service {
/**
* The ImsService has been bound and is ready for ImsFeature creation based on the Features that
* the ImsService has registered for with the framework, either in the manifest or via
+ * {@link #querySupportedImsFeatures()}.
+ *
* The ImsService should use this signal instead of onCreate/onBind or similar to perform
* feature initialization because the framework may bind to this service multiple times to
* query the ImsService's {@link ImsFeatureConfiguration} via
* {@link #querySupportedImsFeatures()}before creating features.
- * @hide
*/
public void readyForFeatureCreation() {
}
@@ -318,7 +337,6 @@ public class ImsService extends Service {
/**
* The framework has enabled IMS for the slot specified, the ImsService should register for IMS
* and perform all appropriate initialization to bring up all ImsFeatures.
- * @hide
*/
public void enableIms(int slotId) {
}
@@ -326,50 +344,50 @@ public class ImsService extends Service {
/**
* The framework has disabled IMS for the slot specified. The ImsService must deregister for IMS
* and set capability status to false for all ImsFeatures.
- * @hide
*/
public void disableIms(int slotId) {
}
/**
- * When called, the framework is requesting that a new MmTelFeature is created for the specified
- * slot.
+ * When called, the framework is requesting that a new {@link MmTelFeature} is created for the
+ * specified slot.
*
- * @param slotId The slot ID that the MMTel Feature is being created for.
- * @return The newly created MmTelFeature associated with the slot or null if the feature is not
- * supported.
- * @hide
+ * @param slotId The slot ID that the MMTEL Feature is being created for.
+ * @return The newly created {@link MmTelFeature} associated with the slot or null if the
+ * feature is not supported.
*/
public MmTelFeature createMmTelFeature(int slotId) {
return null;
}
/**
- * When called, the framework is requesting that a new RcsFeature is created for the specified
- * slot
+ * When called, the framework is requesting that a new {@link RcsFeature} is created for the
+ * specified slot.
*
* @param slotId The slot ID that the RCS Feature is being created for.
- * @return The newly created RcsFeature associated with the slot or null if the feature is not
- * supported.
- * @hide
+ * @return The newly created {@link RcsFeature} associated with the slot or null if the feature
+ * is not supported.
*/
public RcsFeature createRcsFeature(int slotId) {
return null;
}
/**
+ * Return the {@link ImsConfigImplBase} implementation associated with the provided slot. This
+ * will be used by the platform to get/set specific IMS related configurations.
+ *
* @param slotId The slot that the IMS configuration is associated with.
* @return ImsConfig implementation that is associated with the specified slot.
- * @hide
*/
public ImsConfigImplBase getConfig(int slotId) {
return new ImsConfigImplBase();
}
/**
+ * Return the {@link ImsRegistrationImplBase} implementation associated with the provided slot.
+ *
* @param slotId The slot that is associated with the IMS Registration.
* @return the ImsRegistration implementation associated with the slot.
- * @hide
*/
public ImsRegistrationImplBase getRegistration(int slotId) {
return new ImsRegistrationImplBase();
diff --git a/telephony/java/com/android/ims/ImsSsData.aidl b/telephony/java/android/telephony/ims/ImsSsData.aidl
index 33f83067a4df..eff3a6b0acc7 100644
--- a/telephony/java/com/android/ims/ImsSsData.aidl
+++ b/telephony/java/android/telephony/ims/ImsSsData.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSsData;
diff --git a/telephony/java/com/android/ims/ImsSsData.java b/telephony/java/android/telephony/ims/ImsSsData.java
index 7336c133af96..1ddf1994f26b 100644
--- a/telephony/java/com/android/ims/ImsSsData.java
+++ b/telephony/java/android/telephony/ims/ImsSsData.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,21 +11,21 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-import java.util.ArrayList;
-
/**
* Provided STK Call Control Suplementary Service information
*
* {@hide}
*/
-public class ImsSsData implements Parcelable {
+@SystemApi
+public final class ImsSsData implements Parcelable {
//ServiceType
public static final int SS_CFU = 0;
@@ -68,30 +68,38 @@ public class ImsSsData implements Parcelable {
public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5;
// Refer to ServiceType
+ /** @hide */
public int serviceType;
// Refere to SSRequestType
+ /** @hide */
public int requestType;
// Refer to TeleserviceType
+ /** @hide */
public int teleserviceType;
// Service Class
+ /** @hide */
public int serviceClass;
// Error information
+ /** @hide */
public int result;
+ /** @hide */
public int[] ssInfo; /* Valid for all supplementary services.
This field will be empty for RequestType SS_INTERROGATION
and ServiceType SS_CF_*, SS_INCOMING_BARRING_DN,
SS_INCOMING_BARRING_ANONYMOUS.*/
+ /** @hide */
public ImsCallForwardInfo[] cfInfo; /* Valid only for supplementary services
ServiceType SS_CF_* and RequestType SS_INTERROGATION */
+ /** @hide */
public ImsSsInfo[] imsSsInfo; /* Valid only for ServiceType SS_INCOMING_BARRING_DN and
ServiceType SS_INCOMING_BARRING_ANONYMOUS */
public ImsSsData() {}
- public ImsSsData(Parcel in) {
+ private ImsSsData(Parcel in) {
readFromParcel(in);
}
@@ -133,20 +141,36 @@ public class ImsSsData implements Parcelable {
return 0;
}
+ /**
+ * Old method, kept for compatibility. See {@link #isTypeCf()}
+ * @hide
+ */
public boolean isTypeCF() {
return (serviceType == SS_CFU || serviceType == SS_CF_BUSY ||
serviceType == SS_CF_NO_REPLY || serviceType == SS_CF_NOT_REACHABLE ||
serviceType == SS_CF_ALL || serviceType == SS_CF_ALL_CONDITIONAL);
}
+ public boolean isTypeCf() {
+ return isTypeCF();
+ }
+
public boolean isTypeUnConditional() {
return (serviceType == SS_CFU || serviceType == SS_CF_ALL);
}
+ /**
+ * Old method, kept for compatibility. See {@link #isTypeCf()}
+ * @hide
+ */
public boolean isTypeCW() {
return (serviceType == SS_WAIT);
}
+ public boolean isTypeCw() {
+ return isTypeCW();
+ }
+
public boolean isTypeClip() {
return (serviceType == SS_CLIP);
}
diff --git a/telephony/java/com/android/ims/ImsSsInfo.aidl b/telephony/java/android/telephony/ims/ImsSsInfo.aidl
index 0ac598b70218..66d49507c127 100644
--- a/telephony/java/com/android/ims/ImsSsInfo.aidl
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSsInfo;
diff --git a/telephony/java/com/android/ims/ImsSsInfo.java b/telephony/java/android/telephony/ims/ImsSsInfo.java
index 7acc3bfd45c9..1d1292fb9f72 100644
--- a/telephony/java/com/android/ims/ImsSsInfo.java
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -24,7 +25,8 @@ import android.os.Parcelable;
*
* @hide
*/
-public class ImsSsInfo implements Parcelable {
+@SystemApi
+public final class ImsSsInfo implements Parcelable {
/**
* For the status of service registration or activation/deactivation.
*/
@@ -33,13 +35,15 @@ public class ImsSsInfo implements Parcelable {
public static final int ENABLED = 1;
// 0: disabled, 1: enabled
+ /** @hide */
public int mStatus;
+ /** @hide */
public String mIcbNum;
public ImsSsInfo() {
}
- public ImsSsInfo(Parcel in) {
+ private ImsSsInfo(Parcel in) {
readFromParcel(in);
}
@@ -76,4 +80,12 @@ public class ImsSsInfo implements Parcelable {
return new ImsSsInfo[size];
}
};
+
+ public int getStatus() {
+ return mStatus;
+ }
+
+ public String getIcbNum() {
+ return mIcbNum;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl
index d648a3569c11..ee321aec29d8 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.aidl
+++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.aidl
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsStreamMediaProfile;
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
index cfe37b524347..243352bdd180 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/android/telephony/ims/ImsStreamMediaProfile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,11 +11,12 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -25,7 +26,8 @@ import android.os.Parcelable;
*
* @hide
*/
-public class ImsStreamMediaProfile implements Parcelable {
+@SystemApi
+public final class ImsStreamMediaProfile implements Parcelable {
private static final String TAG = "ImsStreamMediaProfile";
/**
@@ -79,18 +81,25 @@ public class ImsStreamMediaProfile implements Parcelable {
public static final int RTT_MODE_FULL = 1;
// Audio related information
+ /** @hide */
public int mAudioQuality;
+ /** @hide */
public int mAudioDirection;
// Video related information
+ /** @hide */
public int mVideoQuality;
+ /** @hide */
public int mVideoDirection;
// Rtt related information
+ /** @hide */
public int mRttMode;
+ /** @hide */
public ImsStreamMediaProfile(Parcel in) {
readFromParcel(in);
}
+ /** @hide */
public ImsStreamMediaProfile() {
mAudioQuality = AUDIO_QUALITY_NONE;
mAudioDirection = DIRECTION_SEND_RECEIVE;
@@ -99,6 +108,7 @@ public class ImsStreamMediaProfile implements Parcelable {
mRttMode = RTT_MODE_DISABLED;
}
+ /** @hide */
public ImsStreamMediaProfile(int audioQuality, int audioDirection,
int videoQuality, int videoDirection) {
mAudioQuality = audioQuality;
@@ -107,6 +117,7 @@ public class ImsStreamMediaProfile implements Parcelable {
mVideoDirection = videoDirection;
}
+ /** @hide */
public ImsStreamMediaProfile(int rttMode) {
mRttMode = rttMode;
}
@@ -178,4 +189,23 @@ public class ImsStreamMediaProfile implements Parcelable {
mRttMode = rttMode;
}
+ public int getAudioQuality() {
+ return mAudioQuality;
+ }
+
+ public int getAudioDirection() {
+ return mAudioDirection;
+ }
+
+ public int getVideoQuality() {
+ return mVideoQuality;
+ }
+
+ public int getVideoDirection() {
+ return mVideoDirection;
+ }
+
+ public int getRttMode() {
+ return mRttMode;
+ }
}
diff --git a/telephony/java/com/android/ims/ImsSuppServiceNotification.aidl b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl
index 6b4479f467c2..0552780c7dd3 100644
--- a/telephony/java/com/android/ims/ImsSuppServiceNotification.aidl
+++ b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.aidl
@@ -15,6 +15,6 @@
*/
-package com.android.ims;
+package android.telephony.ims;
parcelable ImsSuppServiceNotification;
diff --git a/telephony/java/com/android/ims/ImsSuppServiceNotification.java b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.java
index faf749972b91..e6f6f1b021f8 100644
--- a/telephony/java/com/android/ims/ImsSuppServiceNotification.java
+++ b/telephony/java/android/telephony/ims/ImsSuppServiceNotification.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,12 +11,13 @@
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
- * limitations under the License.
+ * limitations under the License
*/
-package com.android.ims;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,27 +29,31 @@ import java.util.Arrays;
*
* @hide
*/
-public class ImsSuppServiceNotification implements Parcelable {
+@SystemApi
+public final class ImsSuppServiceNotification implements Parcelable {
private static final String TAG = "ImsSuppServiceNotification";
/** Type of notification: 0 = MO; 1 = MT */
- public int notificationType;
+ public final int notificationType;
/** TS 27.007 7.17 "code1" or "code2" */
- public int code;
+ public final int code;
/** TS 27.007 7.17 "index" - Not used currently*/
- public int index;
+ public final int index;
/** TS 27.007 7.17 "type" (MT only) - Not used currently */
- public int type;
+ public final int type;
/** TS 27.007 7.17 "number" (MT only) */
- public String number;
+ public final String number;
/** List of forwarded numbers, if any */
- public String[] history;
-
- public ImsSuppServiceNotification() {
- }
+ public final String[] history;
+ /** @hide */
public ImsSuppServiceNotification(Parcel in) {
- readFromParcel(in);
+ notificationType = in.readInt();
+ code = in.readInt();
+ index = in.readInt();
+ type = in.readInt();
+ number = in.readString();
+ history = in.createStringArray();
}
@Override
@@ -77,15 +82,6 @@ public class ImsSuppServiceNotification implements Parcelable {
out.writeStringArray(history);
}
- private void readFromParcel(Parcel in) {
- notificationType = in.readInt();
- code = in.readInt();
- index = in.readInt();
- type = in.readInt();
- number = in.readString();
- history = in.createStringArray();
- }
-
public static final Creator<ImsSuppServiceNotification> CREATOR =
new Creator<ImsSuppServiceNotification>() {
@Override
diff --git a/telephony/java/android/telephony/ims/ImsUtListener.java b/telephony/java/android/telephony/ims/ImsUtListener.java
new file mode 100644
index 000000000000..d50a0f738b25
--- /dev/null
+++ b/telephony/java/android/telephony/ims/ImsUtListener.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.telephony.ims;
+
+import android.annotation.SystemApi;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.ims.internal.IImsUtListener;
+
+/**
+ * Base implementation of the IMS UT listener interface, which implements stubs.
+ * Override these methods to implement functionality.
+ * @hide
+ */
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsUt maintained by other ImsServices.
+@SystemApi
+public class ImsUtListener {
+ private IImsUtListener mServiceInterface;
+ private static final String LOG_TAG = "ImsUtListener";
+
+ public void onUtConfigurationUpdated(int id) {
+ try {
+ mServiceInterface.utConfigurationUpdated(null, id);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationUpdated: remote exception");
+ }
+ }
+
+ public void onUtConfigurationUpdateFailed(int id, ImsReasonInfo error) {
+ try {
+ mServiceInterface.utConfigurationUpdateFailed(null, id, error);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationUpdateFailed: remote exception");
+ }
+ }
+
+ public void onUtConfigurationQueried(int id, Bundle ssInfo) {
+ try {
+ mServiceInterface.utConfigurationQueried(null, id, ssInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationQueryFailed(int id, ImsReasonInfo error) {
+ try {
+ mServiceInterface.utConfigurationQueryFailed(null, id, error);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationQueryFailed: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallBarringQueried(int id, ImsSsInfo[] cbInfo) {
+ try {
+ mServiceInterface.utConfigurationCallBarringQueried(null, id, cbInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallBarringQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallForwardQueried(int id, ImsCallForwardInfo[] cfInfo) {
+ try {
+ mServiceInterface.utConfigurationCallForwardQueried(null, id, cfInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallForwardQueried: remote exception");
+ }
+ }
+
+ public void onUtConfigurationCallWaitingQueried(int id, ImsSsInfo[] cwInfo) {
+ try {
+ mServiceInterface.utConfigurationCallWaitingQueried(null, id, cwInfo);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "utConfigurationCallWaitingQueried: remote exception");
+ }
+ }
+
+ public void onSupplementaryServiceIndication(ImsSsData ssData) {
+ try {
+ mServiceInterface.onSupplementaryServiceIndication(ssData);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "onSupplementaryServiceIndication: remote exception");
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public ImsUtListener(IImsUtListener serviceInterface) {
+ mServiceInterface = serviceInterface;
+ }
+}
diff --git a/telephony/java/com/android/ims/internal/ImsVideoCallProvider.java b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
index 432dc3905737..b4f60b952a00 100644
--- a/telephony/java/com/android/ims/internal/ImsVideoCallProvider.java
+++ b/telephony/java/android/telephony/ims/ImsVideoCallProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,9 @@
* limitations under the License
*/
-package com.android.ims.internal;
+package android.telephony.ims;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
@@ -26,11 +27,14 @@ import android.telecom.VideoProfile;
import android.telecom.VideoProfile.CameraCapabilities;
import android.view.Surface;
+import com.android.ims.internal.IImsVideoCallCallback;
+import com.android.ims.internal.IImsVideoCallProvider;
import com.android.internal.os.SomeArgs;
/**
* @hide
*/
+@SystemApi
public abstract class ImsVideoCallProvider {
private static final int MSG_SET_CALLBACK = 1;
private static final int MSG_SET_CAMERA = 2;
@@ -173,6 +177,7 @@ public abstract class ImsVideoCallProvider {
/**
* Returns binder object which can be used across IPC methods.
+ * @hide
*/
public final IImsVideoCallProvider getInterface() {
return mBinder;
diff --git a/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl b/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
index e6a18d027d62..f25b4b148605 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl
@@ -16,12 +16,12 @@
package android.telephony.ims.aidl;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsConferenceState;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsConferenceState;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.ImsSuppServiceNotification;
+import android.telephony.ims.ImsSuppServiceNotification;
/**
* A listener type for receiving notification on IMS call session events.
diff --git a/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
index f9b15c0b1610..b9a6b3c38a92 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsMmTelFeature.aidl
@@ -22,7 +22,7 @@ import android.telephony.ims.aidl.IImsSmsListener;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.feature.CapabilityChangeRequest;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsMultiEndpoint;
@@ -57,4 +57,5 @@ interface IImsMmTelFeature {
oneway void acknowledgeSms(int token, int messageRef, int result);
oneway void acknowledgeSmsReport(int token, int messageRef, int result);
String getSmsFormat();
+ oneway void onSmsReady();
}
diff --git a/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl b/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
index a745a3819f40..4f37caa33680 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRegistrationCallback.aidl
@@ -20,7 +20,7 @@ package android.telephony.ims.aidl;
import android.net.Uri;
import android.telephony.ims.stub.ImsFeatureConfiguration;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
/**
* See ImsRegistrationImplBase.Callback for more information.
diff --git a/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
index f5c5857b7ab3..7a1b1b218fab 100644
--- a/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
+++ b/telephony/java/android/telephony/ims/compat/feature/MMTelFeature.java
@@ -20,7 +20,7 @@ import android.app.PendingIntent;
import android.os.Message;
import android.os.RemoteException;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsConfig;
import com.android.ims.internal.IImsEcbm;
@@ -28,7 +28,7 @@ import com.android.ims.internal.IImsMMTelFeature;
import com.android.ims.internal.IImsMultiEndpoint;
import com.android.ims.internal.IImsRegistrationListener;
import com.android.ims.internal.IImsUt;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallSession;
/**
* Base implementation for MMTel.
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
index 6725d2937a31..48a5a75ad035 100644
--- a/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java
@@ -19,14 +19,14 @@ package android.telephony.ims.compat.stub;
import android.os.RemoteException;
import android.telephony.ims.ImsCallSessionListener;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsConferenceState;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsSuppServiceNotification;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsConferenceState;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsSuppServiceNotification;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallSession;
/**
* Compat implementation of ImsCallSessionImplBase for older implementations.
diff --git a/telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
index daa74c8f6f88..b2aa08015d10 100644
--- a/telephony/java/android/telephony/ims/stub/ImsUtListenerImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,15 @@
* limitations under the License
*/
-package android.telephony.ims.stub;
+package android.telephony.ims.compat.stub;
import android.os.Bundle;
import android.os.RemoteException;
-import com.android.ims.ImsCallForwardInfo;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsSsData;
-import com.android.ims.ImsSsInfo;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsSsData;
+import android.telephony.ims.ImsSsInfo;
import com.android.ims.internal.IImsUt;
import com.android.ims.internal.IImsUtListener;
diff --git a/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
index efb6ffe99049..7c793a5c18ac 100644
--- a/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
+++ b/telephony/java/android/telephony/ims/feature/CapabilityChangeRequest.java
@@ -16,6 +16,7 @@
package android.telephony.ims.feature;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.ims.stub.ImsRegistrationImplBase;
@@ -30,17 +31,32 @@ import java.util.Set;
* the request.
* {@hide}
*/
-public class CapabilityChangeRequest implements Parcelable {
+@SystemApi
+public final class CapabilityChangeRequest implements Parcelable {
+ /**
+ * Contains a feature capability, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS},
+ * along with an associated technology, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}
+ */
public static class CapabilityPair {
private final int mCapability;
private final int radioTech;
- public CapabilityPair(int capability, int radioTech) {
+ public CapabilityPair(@MmTelFeature.MmTelCapabilities.MmTelCapability int capability,
+ @ImsRegistrationImplBase.ImsRegistrationTech int radioTech) {
this.mCapability = capability;
this.radioTech = radioTech;
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -52,6 +68,9 @@ public class CapabilityChangeRequest implements Parcelable {
return getRadioTech() == that.getRadioTech();
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
int result = getCapability();
@@ -59,10 +78,22 @@ public class CapabilityChangeRequest implements Parcelable {
return result;
}
+ /**
+ * @return The stored capability, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS}
+ */
public @MmTelFeature.MmTelCapabilities.MmTelCapability int getCapability() {
return mCapability;
}
+ /**
+ * @return the stored radio technology, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}
+ */
public @ImsRegistrationImplBase.ImsRegistrationTech int getRadioTech() {
return radioTech;
}
@@ -73,6 +104,7 @@ public class CapabilityChangeRequest implements Parcelable {
// Pair contains <radio tech, mCapability>
private final Set<CapabilityPair> mCapabilitiesToDisable;
+ /** @hide */
public CapabilityChangeRequest() {
mCapabilitiesToEnable = new ArraySet<>();
mCapabilitiesToDisable = new ArraySet<>();
@@ -130,6 +162,9 @@ public class CapabilityChangeRequest implements Parcelable {
}
}
+ /**
+ * @hide
+ */
protected CapabilityChangeRequest(Parcel in) {
int enableSize = in.readInt();
mCapabilitiesToEnable = new ArraySet<>(enableSize);
@@ -177,6 +212,9 @@ public class CapabilityChangeRequest implements Parcelable {
}
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -189,6 +227,9 @@ public class CapabilityChangeRequest implements Parcelable {
return mCapabilitiesToDisable.equals(that.mCapabilitiesToDisable);
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
int result = mCapabilitiesToEnable.hashCode();
diff --git a/telephony/java/android/telephony/ims/feature/ImsFeature.java b/telephony/java/android/telephony/ims/feature/ImsFeature.java
index 2cc0a8a22759..a23ce6316a94 100644
--- a/telephony/java/android/telephony/ims/feature/ImsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/ImsFeature.java
@@ -18,6 +18,7 @@ package android.telephony.ims.feature;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
import android.content.Context;
import android.content.Intent;
import android.os.IInterface;
@@ -25,6 +26,7 @@ import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.telephony.SubscriptionManager;
import android.telephony.ims.aidl.IImsCapabilityCallback;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;
import com.android.ims.internal.IImsFeatureStatusCallback;
@@ -38,10 +40,12 @@ import java.util.Set;
import java.util.WeakHashMap;
/**
- * Base class for all IMS features that are supported by the framework.
+ * Base class for all IMS features that are supported by the framework. Use a concrete subclass
+ * of {@link ImsFeature}, such as {@link MmTelFeature} or {@link RcsFeature}.
*
* @hide
*/
+@SystemApi
public abstract class ImsFeature {
private static final String LOG_TAG = "ImsFeature";
@@ -75,17 +79,35 @@ public abstract class ImsFeature {
*/
public static final String EXTRA_PHONE_ID = "android:phone_id";
- // Invalid feature value
+ /**
+ * Invalid feature value\
+ * @hide
+ */
public static final int FEATURE_INVALID = -1;
// ImsFeatures that are defined in the Manifests. Ensure that these values match the previously
// defined values in ImsServiceClass for compatibility purposes.
+ /**
+ * This feature supports emergency calling over MMTEL.
+ */
public static final int FEATURE_EMERGENCY_MMTEL = 0;
+ /**
+ * This feature supports the MMTEL feature.
+ */
public static final int FEATURE_MMTEL = 1;
+ /**
+ * This feature supports the RCS feature.
+ */
public static final int FEATURE_RCS = 2;
- // Total number of features defined
+ /**
+ * Total number of features defined
+ * @hide
+ */
public static final int FEATURE_MAX = 3;
- // Integer values defining IMS features that are supported in ImsFeature.
+ /**
+ * Integer values defining IMS features that are supported in ImsFeature.
+ * @hide
+ */
@IntDef(flag = true,
value = {
FEATURE_EMERGENCY_MMTEL,
@@ -95,7 +117,10 @@ public abstract class ImsFeature {
@Retention(RetentionPolicy.SOURCE)
public @interface FeatureType {}
- // Integer values defining the state of the ImsFeature at any time.
+ /**
+ * Integer values defining the state of the ImsFeature at any time.
+ * @hide
+ */
@IntDef(flag = true,
value = {
STATE_UNAVAILABLE,
@@ -105,12 +130,24 @@ public abstract class ImsFeature {
@Retention(RetentionPolicy.SOURCE)
public @interface ImsState {}
+ /**
+ * This {@link ImsFeature}'s state is unavailable and should not be communicated with.
+ */
public static final int STATE_UNAVAILABLE = 0;
+ /**
+ * This {@link ImsFeature} state is initializing and should not be communicated with.
+ */
public static final int STATE_INITIALIZING = 1;
+ /**
+ * This {@link ImsFeature} is ready for communication.
+ */
public static final int STATE_READY = 2;
- // Integer values defining the result codes that should be returned from
- // {@link changeEnabledCapabilities} when the framework tries to set a feature's capability.
+ /**
+ * Integer values defining the result codes that should be returned from
+ * {@link #changeEnabledCapabilities} when the framework tries to set a feature's capability.
+ * @hide
+ */
@IntDef(flag = true,
value = {
CAPABILITY_ERROR_GENERIC,
@@ -119,7 +156,13 @@ public abstract class ImsFeature {
@Retention(RetentionPolicy.SOURCE)
public @interface ImsCapabilityError {}
+ /**
+ * The capability was unable to be changed.
+ */
public static final int CAPABILITY_ERROR_GENERIC = -1;
+ /**
+ * The capability was able to be changed.
+ */
public static final int CAPABILITY_SUCCESS = 0;
@@ -129,6 +172,8 @@ public abstract class ImsFeature {
* configurations, via {@link #onQueryCapabilityConfiguration}, as well as to receive error
* callbacks when the ImsService can not change the capability as requested, via
* {@link #onChangeCapabilityConfigurationError}.
+ *
+ * @hide
*/
public static class CapabilityCallback extends IImsCapabilityCallback.Stub {
@@ -159,7 +204,7 @@ public abstract class ImsFeature {
*/
@Override
public void onChangeCapabilityConfigurationError(int capability, int radioTech,
- int reason) {
+ @ImsCapabilityError int reason) {
}
/**
@@ -180,6 +225,7 @@ public abstract class ImsFeature {
protected static class CapabilityCallbackProxy {
private final IImsCapabilityCallback mCallback;
+ /** @hide */
public CapabilityCallbackProxy(IImsCapabilityCallback c) {
mCallback = c;
}
@@ -188,9 +234,16 @@ public abstract class ImsFeature {
* This method notifies the provided framework callback that the request to change the
* indicated capability has failed and has not changed.
*
- * @param capability The Capability that will be notified to the framework.
- * @param radioTech The radio tech that this capability failed for.
- * @param reason The reason this capability was unable to be changed.
+ * @param capability The Capability that will be notified to the framework, defined as
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_UT}, or
+ * {@link MmTelFeature.MmTelCapabilities#CAPABILITY_TYPE_SMS}.
+ * @param radioTech The radio tech that this capability failed for, defined as
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_LTE} or
+ * {@link ImsRegistrationImplBase#REGISTRATION_TECH_IWLAN}.
+ * @param reason The reason this capability was unable to be changed, defined as
+ * {@link #CAPABILITY_ERROR_GENERIC} or {@link #CAPABILITY_SUCCESS}.
*/
public void onChangeCapabilityConfigurationError(int capability, int radioTech,
@ImsCapabilityError int reason) {
@@ -203,22 +256,11 @@ public abstract class ImsFeature {
Log.e(LOG_TAG, "onChangeCapabilityConfigurationError called on dead binder.");
}
}
-
- public void onQueryCapabilityConfiguration(int capability, int radioTech,
- boolean isEnabled) {
- if (mCallback == null) {
- return;
- }
- try {
- mCallback.onQueryCapabilityConfiguration(capability, radioTech, isEnabled);
- } catch (RemoteException e) {
- Log.e(LOG_TAG, "onQueryCapabilityConfiguration called on dead binder.");
- }
- }
}
/**
* Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
+ * @hide
*/
public static class Capabilities {
protected int mCapabilities = 0;
@@ -253,6 +295,9 @@ public abstract class ImsFeature {
return (mCapabilities & capabilities) == capabilities;
}
+ /**
+ * @return a deep copy of the Capabilites.
+ */
public Capabilities copy() {
return new Capabilities(mCapabilities);
}
@@ -264,6 +309,9 @@ public abstract class ImsFeature {
return mCapabilities;
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -274,11 +322,17 @@ public abstract class ImsFeature {
return mCapabilities == that.mCapabilities;
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
return mCapabilities;
}
+ /**
+ * @hide
+ */
@Override
public String toString() {
return "Capabilities: " + Integer.toBinaryString(mCapabilities);
@@ -289,24 +343,40 @@ public abstract class ImsFeature {
new WeakHashMap<IImsFeatureStatusCallback, Boolean>());
private @ImsState int mState = STATE_UNAVAILABLE;
private int mSlotId = SubscriptionManager.INVALID_SIM_SLOT_INDEX;
+ /**
+ * @hide
+ */
protected Context mContext;
private final Object mLock = new Object();
private final RemoteCallbackList<IImsCapabilityCallback> mCapabilityCallbacks
= new RemoteCallbackList<>();
private Capabilities mCapabilityStatus = new Capabilities();
+ /**
+ * @hide
+ */
public final void initialize(Context context, int slotId) {
mContext = context;
mSlotId = slotId;
}
+ /**
+ * @return The current state of the feature, defined as {@link #STATE_UNAVAILABLE},
+ * {@link #STATE_INITIALIZING}, or {@link #STATE_READY}.
+ */
public final int getFeatureState() {
synchronized (mLock) {
return mState;
}
}
- protected final void setFeatureState(@ImsState int state) {
+ /**
+ * Set the state of the ImsFeature. The state is used as a signal to the framework to start or
+ * stop communication, depending on the state sent.
+ * @param state The ImsFeature's state, defined as {@link #STATE_UNAVAILABLE},
+ * {@link #STATE_INITIALIZING}, or {@link #STATE_READY}.
+ */
+ public final void setFeatureState(@ImsState int state) {
synchronized (mLock) {
if (mState != state) {
mState = state;
@@ -315,7 +385,10 @@ public abstract class ImsFeature {
}
}
- // Not final for testing, but shouldn't be extended!
+ /**
+ * Not final for testing, but shouldn't be extended!
+ * @hide
+ */
@VisibleForTesting
public void addImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
try {
@@ -330,8 +403,11 @@ public abstract class ImsFeature {
}
}
+ /**
+ * Not final for testing, but shouldn't be extended!
+ * @hide
+ */
@VisibleForTesting
- // Not final for testing, but should not be extended!
public void removeImsFeatureStatusCallback(@NonNull IImsFeatureStatusCallback c) {
synchronized (mLock) {
mStatusCallbacks.remove(c);
@@ -382,16 +458,23 @@ public abstract class ImsFeature {
mContext.sendBroadcast(intent);
}
+ /**
+ * @hide
+ */
public final void addCapabilityCallback(IImsCapabilityCallback c) {
mCapabilityCallbacks.register(c);
}
+ /**
+ * @hide
+ */
public final void removeCapabilityCallback(IImsCapabilityCallback c) {
mCapabilityCallbacks.unregister(c);
}
/**
* @return the cached capabilities status for this feature.
+ * @hide
*/
@VisibleForTesting
public Capabilities queryCapabilityStatus() {
@@ -400,7 +483,10 @@ public abstract class ImsFeature {
}
}
- // Called internally to request the change of enabled capabilities.
+ /**
+ * Called internally to request the change of enabled capabilities.
+ * @hide
+ */
@VisibleForTesting
public final void requestChangeEnabledCapabilities(CapabilityChangeRequest request,
IImsCapabilityCallback c) throws RemoteException {
@@ -415,6 +501,8 @@ public abstract class ImsFeature {
* Called by the ImsFeature when the capabilities status has changed.
*
* @param c A {@link Capabilities} containing the new Capabilities status.
+ *
+ * @hide
*/
protected final void notifyCapabilitiesStatusChanged(Capabilities c) {
synchronized (mLock) {
@@ -468,6 +556,7 @@ public abstract class ImsFeature {
/**
* @return Binder instance that the framework will use to communicate with this feature.
+ * @hide
*/
protected abstract IInterface getBinder();
}
diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
index 83214b32fc38..2baf076d391f 100644
--- a/telephony/java/android/telephony/ims/feature/MmTelFeature.java
+++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
@@ -17,28 +17,30 @@
package android.telephony.ims.feature;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Bundle;
import android.os.Message;
import android.os.RemoteException;
import android.telecom.TelecomManager;
+import android.telephony.ims.stub.ImsRegistrationImplBase;
+import android.telephony.ims.stub.ImsCallSessionImplBase;
+import android.telephony.ims.stub.ImsSmsImplBase;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.aidl.IImsMmTelFeature;
import android.telephony.ims.aidl.IImsMmTelListener;
import android.telephony.ims.aidl.IImsSmsListener;
-import android.telephony.ims.stub.ImsRegistrationImplBase;
-import android.telephony.ims.stub.ImsSmsImplBase;
import android.telephony.ims.stub.ImsEcbmImplBase;
import android.telephony.ims.stub.ImsMultiEndpointImplBase;
import android.telephony.ims.stub.ImsUtImplBase;
import android.util.Log;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsMultiEndpoint;
import com.android.ims.internal.IImsUt;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallSession;
import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
@@ -51,7 +53,7 @@ import java.lang.annotation.RetentionPolicy;
* service supports.
* @hide
*/
-
+@SystemApi
public class MmTelFeature extends ImsFeature {
private static final String LOG_TAG = "MmTelFeature";
@@ -84,8 +86,8 @@ public class MmTelFeature extends ImsFeature {
@Override
public IImsCallSession createCallSession(ImsCallProfile profile) throws RemoteException {
synchronized (mLock) {
- ImsCallSession s = MmTelFeature.this.createCallSession(profile);
- return s != null ? s.getSession() : null;
+ ImsCallSessionImplBase s = MmTelFeature.this.createCallSession(profile);
+ return s != null ? s.getServiceImpl() : null;
}
}
@@ -99,14 +101,15 @@ public class MmTelFeature extends ImsFeature {
@Override
public IImsUt getUtInterface() throws RemoteException {
synchronized (mLock) {
- return MmTelFeature.this.getUt();
+ return MmTelFeature.this.getUt().getInterface();
}
}
@Override
public IImsEcbm getEcbmInterface() throws RemoteException {
synchronized (mLock) {
- return MmTelFeature.this.getEcbm();
+ ImsEcbmImplBase ecbm = MmTelFeature.this.getEcbm();
+ return ecbm != null ? ecbm.getImsEcbm() : null;
}
}
@@ -120,7 +123,8 @@ public class MmTelFeature extends ImsFeature {
@Override
public IImsMultiEndpoint getMultiEndpointInterface() throws RemoteException {
synchronized (mLock) {
- return MmTelFeature.this.getMultiEndpoint();
+ ImsMultiEndpointImplBase multiEndPoint = MmTelFeature.this.getMultiEndpoint();
+ return multiEndPoint != null ? multiEndPoint.getIImsMultiEndpoint() : null;
}
}
@@ -184,11 +188,22 @@ public class MmTelFeature extends ImsFeature {
return MmTelFeature.this.getSmsFormat();
}
}
+
+ @Override
+ public void onSmsReady() {
+ synchronized (mLock) {
+ MmTelFeature.this.onSmsReady();
+ }
+ }
};
/**
* Contains the capabilities defined and supported by a MmTelFeature in the form of a Bitmask.
- * The capabilities that are used in MmTelFeature are defined by {@link MmTelCapability}.
+ * The capabilities that are used in MmTelFeature are defined as
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_VOICE},
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_VIDEO},
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_UT}, and
+ * {@link MmTelCapabilities#CAPABILITY_TYPE_SMS}.
*
* The capabilities of this MmTelFeature will be set by the framework and can be queried with
* {@link #queryCapabilityStatus()}.
@@ -199,6 +214,9 @@ public class MmTelFeature extends ImsFeature {
*/
public static class MmTelCapabilities extends Capabilities {
+ /**
+ * @hide
+ */
@VisibleForTesting
public MmTelCapabilities() {
super();
@@ -275,6 +293,7 @@ public class MmTelFeature extends ImsFeature {
/**
* Listener that the framework implements for communication from the MmTelFeature.
+ * @hide
*/
public static class Listener extends IImsMmTelListener.Stub {
@@ -375,24 +394,27 @@ public class MmTelFeature extends ImsFeature {
* support the capability that is enabled. A capability that is disabled by the framework (via
* {@link #changeEnabledCapabilities}) should also show the status as disabled.
*/
- protected final void notifyCapabilitiesStatusChanged(MmTelCapabilities c) {
+ public final void notifyCapabilitiesStatusChanged(MmTelCapabilities c) {
super.notifyCapabilitiesStatusChanged(c);
}
/**
* Notify the framework of an incoming call.
- * @param c The {@link ImsCallSession} of the new incoming call.
+ * @param c The {@link ImsCallSessionImplBase} of the new incoming call.
*
- * @throws RemoteException if the connection to the framework is not available. If this happens,
- * the call should be no longer considered active and should be cleaned up.
+ * @throws RuntimeException if the connection to the framework is not available. If this
+ * happens, the call should be no longer considered active and should be cleaned up.
* */
- protected final void notifyIncomingCall(ImsCallSession c, Bundle extras)
- throws RemoteException {
+ public final void notifyIncomingCall(ImsCallSessionImplBase c, Bundle extras) {
synchronized (mLock) {
if (mListener == null) {
throw new IllegalStateException("Session is not available.");
}
- mListener.onIncomingCall(c.getSession(), extras);
+ try {
+ mListener.onIncomingCall(c.getServiceImpl(), extras);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
}
}
@@ -458,7 +480,7 @@ public class MmTelFeature extends ImsFeature {
*
* @param profile a call profile to make the call
*/
- public ImsCallSession createCallSession(ImsCallProfile profile) {
+ public ImsCallSessionImplBase createCallSession(ImsCallProfile profile) {
// Base Implementation - Should be overridden
return null;
}
@@ -477,7 +499,8 @@ public class MmTelFeature extends ImsFeature {
}
/**
- * @return The Ut interface for the supplementary service configuration.
+ * @return The {@link ImsUtImplBase} Ut interface implementation for the supplementary service
+ * configuration.
*/
public ImsUtImplBase getUt() {
// Base Implementation - Should be overridden
@@ -485,7 +508,8 @@ public class MmTelFeature extends ImsFeature {
}
/**
- * @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
+ * @return The {@link ImsEcbmImplBase} Emergency call-back mode interface for emergency VoLTE
+ * calls that support it.
*/
public ImsEcbmImplBase getEcbm() {
// Base Implementation - Should be overridden
@@ -493,7 +517,8 @@ public class MmTelFeature extends ImsFeature {
}
/**
- * @return The Emergency call-back mode interface for emergency VoLTE calls that support it.
+ * @return The {@link ImsMultiEndpointImplBase} implementation for implementing Dialog event
+ * package processing for multi-endpoint.
*/
public ImsMultiEndpointImplBase getMultiEndpoint() {
// Base Implementation - Should be overridden
@@ -532,6 +557,10 @@ public class MmTelFeature extends ImsFeature {
getSmsImplementation().acknowledgeSmsReport(token, messageRef, result);
}
+ private void onSmsReady() {
+ getSmsImplementation().onReady();
+ }
+
/**
* Must be overridden by IMS Provider to be able to support SMS over IMS. Otherwise a default
* non-functional implementation is returned.
@@ -539,7 +568,7 @@ public class MmTelFeature extends ImsFeature {
* @return an instance of {@link ImsSmsImplBase} which should be implemented by the IMS
* Provider.
*/
- protected ImsSmsImplBase getSmsImplementation() {
+ public ImsSmsImplBase getSmsImplementation() {
return new ImsSmsImplBase();
}
diff --git a/telephony/java/android/telephony/ims/feature/RcsFeature.java b/telephony/java/android/telephony/ims/feature/RcsFeature.java
index 3b6f7e0f1a89..a637e16d0a48 100644
--- a/telephony/java/android/telephony/ims/feature/RcsFeature.java
+++ b/telephony/java/android/telephony/ims/feature/RcsFeature.java
@@ -16,6 +16,7 @@
package android.telephony.ims.feature;
+import android.annotation.SystemApi;
import android.telephony.ims.aidl.IImsRcsFeature;
/**
@@ -23,9 +24,10 @@ import android.telephony.ims.aidl.IImsRcsFeature;
* this class and provide implementations of the RcsFeature methods that they support.
* @hide
*/
-
+@SystemApi
public class RcsFeature extends ImsFeature {
+ /**{@inheritDoc}*/
private final IImsRcsFeature mImsRcsBinder = new IImsRcsFeature.Stub() {
// Empty Default Implementation.
};
@@ -35,12 +37,16 @@ public class RcsFeature extends ImsFeature {
super();
}
+ /**
+ * {@inheritDoc}
+ */
@Override
public void changeEnabledCapabilities(CapabilityChangeRequest request,
CapabilityCallbackProxy c) {
// Do nothing for base implementation.
}
+ /**{@inheritDoc}*/
@Override
public void onFeatureRemoved() {
@@ -52,6 +58,9 @@ public class RcsFeature extends ImsFeature {
}
+ /**
+ * @hide
+ */
@Override
public final IImsRcsFeature getBinder() {
return mImsRcsBinder;
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
index 95243fdc5f1b..c6ca6fdb0fd8 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
@@ -16,30 +16,257 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.Message;
import android.os.RemoteException;
import android.telephony.ims.ImsCallSessionListener;
import android.telephony.ims.aidl.IImsCallSessionListener;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.internal.ImsCallSession;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallSession;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsVideoCallProvider;
+import android.telephony.ims.ImsVideoCallProvider;
+
+import dalvik.system.CloseGuard;
/**
- * Base implementation of IImsCallSession, which implements stub versions of the methods in the
- * IImsCallSession AIDL. Override the methods that your implementation of ImsCallSession supports.
+ * Base implementation of IImsCallSession, which implements stub versions of the methods available.
*
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsCallSession maintained by other ImsServices.
+ * Override the methods that your implementation of ImsCallSession supports.
*
* @hide
*/
+@SystemApi
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsCallSession maintained by other ImsServices.
+public class ImsCallSessionImplBase implements AutoCloseable {
+ /**
+ * Notify USSD Mode.
+ */
+ public static final int USSD_MODE_NOTIFY = 0;
+ /**
+ * Request USSD Mode
+ */
+ public static final int USSD_MODE_REQUEST = 1;
-public class ImsCallSessionImplBase extends IImsCallSession.Stub {
+ /**
+ * Defines IMS call session state.
+ */
+ public static class State {
+ public static final int IDLE = 0;
+ public static final int INITIATED = 1;
+ public static final int NEGOTIATING = 2;
+ public static final int ESTABLISHING = 3;
+ public static final int ESTABLISHED = 4;
+
+ public static final int RENEGOTIATING = 5;
+ public static final int REESTABLISHING = 6;
+
+ public static final int TERMINATING = 7;
+ public static final int TERMINATED = 8;
+
+ public static final int INVALID = (-1);
+
+ /**
+ * Converts the state to string.
+ */
+ public static String toString(int state) {
+ switch (state) {
+ case IDLE:
+ return "IDLE";
+ case INITIATED:
+ return "INITIATED";
+ case NEGOTIATING:
+ return "NEGOTIATING";
+ case ESTABLISHING:
+ return "ESTABLISHING";
+ case ESTABLISHED:
+ return "ESTABLISHED";
+ case RENEGOTIATING:
+ return "RENEGOTIATING";
+ case REESTABLISHING:
+ return "REESTABLISHING";
+ case TERMINATING:
+ return "TERMINATING";
+ case TERMINATED:
+ return "TERMINATED";
+ default:
+ return "UNKNOWN";
+ }
+ }
+
+ /**
+ * @hide
+ */
+ private State() {
+ }
+ }
+
+ // Non-final for injection by tests
+ private IImsCallSession mServiceImpl = new IImsCallSession.Stub() {
+ @Override
+ public void close() {
+ ImsCallSessionImplBase.this.close();
+ }
+
+ @Override
+ public String getCallId() {
+ return ImsCallSessionImplBase.this.getCallId();
+ }
+
+ @Override
+ public ImsCallProfile getCallProfile() {
+ return ImsCallSessionImplBase.this.getCallProfile();
+ }
+
+ @Override
+ public ImsCallProfile getLocalCallProfile() {
+ return ImsCallSessionImplBase.this.getLocalCallProfile();
+ }
+
+ @Override
+ public ImsCallProfile getRemoteCallProfile() {
+ return ImsCallSessionImplBase.this.getRemoteCallProfile();
+ }
+
+ @Override
+ public String getProperty(String name) {
+ return ImsCallSessionImplBase.this.getProperty(name);
+ }
+
+ @Override
+ public int getState() {
+ return ImsCallSessionImplBase.this.getState();
+ }
+
+ @Override
+ public boolean isInCall() {
+ return ImsCallSessionImplBase.this.isInCall();
+ }
+
+ @Override
+ public void setListener(IImsCallSessionListener listener) {
+ ImsCallSessionImplBase.this.setListener(new ImsCallSessionListener(listener));
+ }
+
+ @Override
+ public void setMute(boolean muted) {
+ ImsCallSessionImplBase.this.setMute(muted);
+ }
+
+ @Override
+ public void start(String callee, ImsCallProfile profile) {
+ ImsCallSessionImplBase.this.start(callee, profile);
+ }
+
+ @Override
+ public void startConference(String[] participants, ImsCallProfile profile) throws
+ RemoteException {
+ ImsCallSessionImplBase.this.startConference(participants, profile);
+ }
+
+ @Override
+ public void accept(int callType, ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.accept(callType, profile);
+ }
+
+ @Override
+ public void reject(int reason) {
+ ImsCallSessionImplBase.this.reject(reason);
+ }
+
+ @Override
+ public void terminate(int reason) {
+ ImsCallSessionImplBase.this.terminate(reason);
+ }
+
+ @Override
+ public void hold(ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.hold(profile);
+ }
+
+ @Override
+ public void resume(ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.resume(profile);
+ }
+
+ @Override
+ public void merge() {
+ ImsCallSessionImplBase.this.merge();
+ }
+
+ @Override
+ public void update(int callType, ImsStreamMediaProfile profile) {
+ ImsCallSessionImplBase.this.update(callType, profile);
+ }
+
+ @Override
+ public void extendToConference(String[] participants) {
+ ImsCallSessionImplBase.this.extendToConference(participants);
+ }
+
+ @Override
+ public void inviteParticipants(String[] participants) {
+ ImsCallSessionImplBase.this.inviteParticipants(participants);
+ }
+
+ @Override
+ public void removeParticipants(String[] participants) {
+ ImsCallSessionImplBase.this.removeParticipants(participants);
+ }
+
+ @Override
+ public void sendDtmf(char c, Message result) {
+ ImsCallSessionImplBase.this.sendDtmf(c, result);
+ }
+
+ @Override
+ public void startDtmf(char c) {
+ ImsCallSessionImplBase.this.startDtmf(c);
+ }
+
+ @Override
+ public void stopDtmf() {
+ ImsCallSessionImplBase.this.stopDtmf();
+ }
+
+ @Override
+ public void sendUssd(String ussdMessage) {
+ ImsCallSessionImplBase.this.sendUssd(ussdMessage);
+ }
+
+ @Override
+ public IImsVideoCallProvider getVideoCallProvider() {
+ return ImsCallSessionImplBase.this.getVideoCallProvider();
+ }
+
+ @Override
+ public boolean isMultiparty() {
+ return ImsCallSessionImplBase.this.isMultiparty();
+ }
+
+ @Override
+ public void sendRttModifyRequest(ImsCallProfile toProfile) {
+ ImsCallSessionImplBase.this.sendRttModifyRequest(toProfile);
+ }
+
+ @Override
+ public void sendRttModifyResponse(boolean status) {
+ ImsCallSessionImplBase.this.sendRttModifyResponse(status);
+ }
+
+ @Override
+ public void sendRttMessage(String rttMessage) {
+ ImsCallSessionImplBase.this.sendRttMessage(rttMessage);
+ }
+ };
- @Override
+ /**
+ * @hide
+ */
public final void setListener(IImsCallSessionListener listener) throws RemoteException {
setListener(new ImsCallSessionListener(listener));
}
@@ -49,13 +276,14 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* can only hold one listener at a time. Subsequent calls to this method
* override the previous listener.
*
- * @param listener to listen to the session events of this object
+ * @param listener {@link ImsCallSessionListener} used to notify the framework of updates
+ * to the ImsCallSession
*/
public void setListener(ImsCallSessionListener listener) {
}
/**
- * Closes the object. This object is not usable after being closed.
+ * Closes the object. This {@link ImsCallSessionImplBase} is not usable after being closed.
*/
@Override
public void close() {
@@ -63,72 +291,55 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
}
/**
- * Gets the call ID of the session.
- *
- * @return the call ID
+ * @return A String containing the unique call ID of this {@link ImsCallSessionImplBase}.
*/
- @Override
public String getCallId() {
return null;
}
/**
- * Gets the call profile that this session is associated with
- *
- * @return the {@link ImsCallProfile} that this session is associated with
+ * @return The {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is associated
+ * with.
*/
- @Override
public ImsCallProfile getCallProfile() {
return null;
}
/**
- * Gets the local call profile that this session is associated with
- *
- * @return the local {@link ImsCallProfile} that this session is associated with
+ * @return The local {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
*/
- @Override
public ImsCallProfile getLocalCallProfile() {
return null;
}
/**
- * Gets the remote call profile that this session is associated with
- *
- * @return the remote {@link ImsCallProfile} that this session is associated with
+ * @return The remote {@link ImsCallProfile} that this {@link ImsCallSessionImplBase} is
+ * associated with.
*/
- @Override
public ImsCallProfile getRemoteCallProfile() {
return null;
}
/**
- * Gets the value associated with the specified property of this session.
- *
- * @return the string value associated with the specified property
+ * @param name The String extra key.
+ * @return The string extra value associated with the specified property.
*/
- @Override
public String getProperty(String name) {
return null;
}
/**
- * Gets the session state.
- * The value returned must be one of the states in {@link ImsCallSession.State}.
- *
- * @return the session state
+ * @return The {@link ImsCallSessionImplBase} state, defined in
+ * {@link ImsCallSessionImplBase.State}.
*/
- @Override
public int getState() {
- return ImsCallSession.State.INVALID;
+ return ImsCallSessionImplBase.State.INVALID;
}
/**
- * Checks if the session is in call.
- *
- * @return true if the session is in call, false otherwise
+ * @return true if the {@link ImsCallSessionImplBase} is in a call, false otherwise.
*/
- @Override
public boolean isInCall() {
return false;
}
@@ -136,16 +347,16 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
/**
* Mutes or unmutes the mic for the active call.
*
- * @param muted true if the call is muted, false otherwise
+ * @param muted true if the call should be muted, false otherwise.
*/
- @Override
public void setMute(boolean muted) {
}
/**
- * Initiates an IMS call with the specified target and call profile.
- * The session listener set in {@link #setListener} is called back upon defined session events.
- * The method is only valid to call when the session state is in
+ * Initiates an IMS call with the specified number and call profile.
+ * The session listener set in {@link #setListener(ImsCallSessionListener)} is called back upon
+ * defined session events.
+ * Only valid to call when the session state is in
* {@link ImsCallSession.State#IDLE}.
*
* @param callee dialed string to make the call to
@@ -154,13 +365,13 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionStarted},
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
public void start(String callee, ImsCallProfile profile) {
}
/**
* Initiates an IMS call with the specified participants and call profile.
- * The session listener set in {@link #setListener} is called back upon defined session events.
+ * The session listener set in {@link #setListener(ImsCallSessionListener)} is called back upon
+ * defined session events.
* The method is only valid to call when the session state is in
* {@link ImsCallSession.State#IDLE}.
*
@@ -170,7 +381,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionStarted},
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
public void startConference(String[] participants, ImsCallProfile profile) {
}
@@ -181,30 +391,25 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @param profile stream media profile {@link ImsStreamMediaProfile} to be answered
* @see {@link ImsCallSession.Listener#callSessionStarted}
*/
- @Override
public void accept(int callType, ImsStreamMediaProfile profile) {
}
/**
* Rejects an incoming call or session update.
*
- * @param reason reason code to reject an incoming call, defined in
- * com.android.ims.ImsReasonInfo
+ * @param reason reason code to reject an incoming call, defined in {@link ImsReasonInfo}.
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
- @Override
public void reject(int reason) {
}
/**
* Terminates a call.
*
- * @param reason reason code to terminate a call, defined in
- * com.android.ims.ImsReasonInfo
+ * @param reason reason code to terminate a call, defined in {@link ImsReasonInfo}.
*
* @see {@link ImsCallSession.Listener#callSessionTerminated}
*/
- @Override
public void terminate(int reason) {
}
@@ -216,7 +421,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionHeld},
* {@link ImsCallSession.Listener#callSessionHoldFailed}
*/
- @Override
public void hold(ImsStreamMediaProfile profile) {
}
@@ -228,12 +432,11 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionResumed},
* {@link ImsCallSession.Listener#callSessionResumeFailed}
*/
- @Override
public void resume(ImsStreamMediaProfile profile) {
}
/**
- * Merges the active & hold call. When the merge starts,
+ * Merges the active and held call. When the merge starts,
* {@link ImsCallSession.Listener#callSessionMergeStarted} is called.
* {@link ImsCallSession.Listener#callSessionMergeComplete} is called if the merge is
* successful, and {@link ImsCallSession.Listener#callSessionMergeFailed} is called if the merge
@@ -243,7 +446,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* {@link ImsCallSession.Listener#callSessionMergeComplete},
* {@link ImsCallSession.Listener#callSessionMergeFailed}
*/
- @Override
public void merge() {
}
@@ -255,7 +457,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionUpdated},
* {@link ImsCallSession.Listener#callSessionUpdateFailed}
*/
- @Override
public void update(int callType, ImsStreamMediaProfile profile) {
}
@@ -267,7 +468,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionConferenceExtended},
* {@link ImsCallSession.Listener#callSessionConferenceExtendFailed}
*/
- @Override
public void extendToConference(String[] participants) {
}
@@ -278,8 +478,7 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestDelivered},
* {@link ImsCallSession.Listener#callSessionInviteParticipantsRequestFailed}
*/
- @Override
- public void inviteParticipants(String[] participants) throws RemoteException {
+ public void inviteParticipants(String[] participants) {
}
/**
@@ -289,7 +488,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* @see {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestDelivered},
* {@link ImsCallSession.Listener#callSessionRemoveParticipantsRequestFailed}
*/
- @Override
public void removeParticipants(String[] participants) {
}
@@ -300,7 +498,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
*/
- @Override
public void sendDtmf(char c, Message result) {
}
@@ -311,14 +508,12 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
*
* @param c the DTMF to send. '0' ~ '9', 'A' ~ 'D', '*', '#' are valid inputs.
*/
- @Override
public void startDtmf(char c) {
}
/**
* Stop a DTMF code.
*/
- @Override
public void stopDtmf() {
}
@@ -327,17 +522,23 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
*
* @param ussdMessage USSD message to send
*/
- @Override
public void sendUssd(String ussdMessage) {
}
/**
- * Returns a binder for the video call provider implementation contained within the IMS service
- * process. This binder is used by the VideoCallProvider subclass in Telephony which
- * intermediates between the propriety implementation and Telecomm/InCall.
+ * See {@link #getImsVideoCallProvider()}, used directly in older ImsService implementations.
+ * @hide
*/
- @Override
public IImsVideoCallProvider getVideoCallProvider() {
+ ImsVideoCallProvider provider = getImsVideoCallProvider();
+ return provider != null ? provider.getInterface() : null;
+ }
+
+ /**
+ * @return The {@link ImsVideoCallProvider} implementation contained within the IMS service
+ * process.
+ */
+ public ImsVideoCallProvider getImsVideoCallProvider() {
return null;
}
@@ -345,7 +546,6 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* Determines if the current session is multiparty.
* @return {@code True} if the session is multiparty.
*/
- @Override
public boolean isMultiparty() {
return false;
}
@@ -354,16 +554,13 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* Device issues RTT modify request
* @param toProfile The profile with requested changes made
*/
- @Override
public void sendRttModifyRequest(ImsCallProfile toProfile) {
}
/**
* Device responds to Remote RTT modify request
- * @param status true Accepted the request
- * false Declined the request
+ * @param status true if the the request was accepted or false of the request is defined.
*/
- @Override
public void sendRttModifyResponse(boolean status) {
}
@@ -371,7 +568,16 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
* Device sends RTT message
* @param rttMessage RTT message to be sent
*/
- @Override
public void sendRttMessage(String rttMessage) {
}
+
+ /** @hide */
+ public IImsCallSession getServiceImpl() {
+ return mServiceImpl;
+ }
+
+ /** @hide */
+ public void setServiceImpl(IImsCallSession serviceImpl) {
+ mServiceImpl = serviceImpl;
+ }
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
index 9b73c0cef386..412bef0cc089 100644
--- a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
@@ -16,6 +16,7 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.content.Context;
import android.content.Intent;
import android.os.RemoteCallbackList;
@@ -43,10 +44,10 @@ import java.util.HashMap;
* performed every time.
* @hide
*/
-
+@SystemApi
public class ImsConfigImplBase {
- static final private String TAG = "ImsConfigImplBase";
+ private static final String TAG = "ImsConfigImplBase";
/**
* Implements the IImsConfig AIDL interface, which is called by potentially many processes
@@ -90,11 +91,12 @@ public class ImsConfigImplBase {
/**
* Gets the value for ims service/capabilities parameters. It first checks its local cache,
- * if missed, it will call ImsConfigImplBase.getProvisionedValue.
+ * if missed, it will call ImsConfigImplBase.getConfigInt.
* Synchronous blocking call.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in Integer format.
+ * @param item integer key
+ * @return value in Integer format or {@link #CONFIG_RESULT_UNKNOWN} if
+ * unavailable.
*/
@Override
public synchronized int getConfigInt(int item) throws RemoteException {
@@ -111,10 +113,10 @@ public class ImsConfigImplBase {
/**
* Gets the value for ims service/capabilities parameters. It first checks its local cache,
- * if missed, it will call #ImsConfigImplBase.getProvisionedValue.
+ * if missed, it will call #ImsConfigImplBase.getConfigString.
* Synchronous blocking call.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param item integer key
* @return value in String format.
*/
@Override
@@ -136,9 +138,10 @@ public class ImsConfigImplBase {
* from which the master value is derived, and write it into local cache.
* Synchronous blocking call.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param item integer key
* @param value in Integer format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
*/
@Override
public synchronized int setConfigInt(int item, int value) throws RemoteException {
@@ -162,7 +165,8 @@ public class ImsConfigImplBase {
*
* @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
* @param value in String format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
*/
@Override
public synchronized int setConfigString(int item, String value)
@@ -245,12 +249,31 @@ public class ImsConfigImplBase {
}
}
+ /**
+ * The configuration requested resulted in an unknown result. This may happen if the
+ * IMS configurations are unavailable.
+ */
+ public static final int CONFIG_RESULT_UNKNOWN = -1;
+ /**
+ * Setting the configuration value completed.
+ */
+ public static final int CONFIG_RESULT_SUCCESS = 0;
+ /**
+ * Setting the configuration value failed.
+ */
+ public static final int CONFIG_RESULT_FAILED = 1;
+
private final RemoteCallbackList<IImsConfigCallback> mCallbacks = new RemoteCallbackList<>();
ImsConfigStub mImsConfigStub;
+ /**
+ * Used for compatibility between older versions of the ImsService.
+ * @hide
+ */
public ImsConfigImplBase(Context context) {
mImsConfigStub = new ImsConfigStub(this);
}
+
public ImsConfigImplBase() {
mImsConfigStub = new ImsConfigStub(this);
}
@@ -273,7 +296,11 @@ public class ImsConfigImplBase {
mCallbacks.unregister(c);
}
- void notifyConfigChanged(int item, int value) {
+ /**
+ * @param item
+ * @param value
+ */
+ private final void notifyConfigChanged(int item, int value) {
// can be null in testing
if (mCallbacks == null) {
return;
@@ -301,14 +328,17 @@ public class ImsConfigImplBase {
});
}
+ /**
+ * @hide
+ */
public IImsConfig getIImsConfig() { return mImsConfigStub; }
/**
* Updates provisioning value and notifies the framework of the change.
- * Doesn't call #setProvisionedValue and assumes the result succeeded.
- * This should only be used by modem when they implicitly changed provisioned values.
+ * Doesn't call {@link #setConfig(int,int)} and assumes the result succeeded.
+ * This should only be used when the IMS implementer implicitly changed provisioned values.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param item an integer key.
* @param value in Integer format.
*/
public final void notifyProvisionedValueChanged(int item, int value) {
@@ -321,10 +351,10 @@ public class ImsConfigImplBase {
/**
* Updates provisioning value and notifies the framework of the change.
- * Doesn't call #setProvisionedValue and assumes the result succeeded.
- * This should only be used by modem when they implicitly changed provisioned values.
+ * Doesn't call {@link #setConfig(int,String)} and assumes the result succeeded.
+ * This should only be used when the IMS implementer implicitly changed provisioned values.
*
- * @param item, as defined in com.android.ims.ImsConfig#ConfigConstants.
+ * @param item an integer key.
* @param value in String format.
*/
public final void notifyProvisionedValueChanged(int item, String value) {
@@ -336,51 +366,51 @@ public class ImsConfigImplBase {
}
/**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived.
+ * Sets the configuration value for this ImsService.
*
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in Integer format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ * @param item an integer key.
+ * @param value an integer containing the configuration value.
+ * @return the result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
*/
public int setConfig(int item, int value) {
// Base Implementation - To be overridden.
- return ImsConfig.OperationStatusConstants.FAILED;
+ return CONFIG_RESULT_FAILED;
}
/**
- * Sets the value for IMS service/capabilities parameters by the operator device
- * management entity. It sets the config item value in the provisioned storage
- * from which the master value is derived.
+ * Sets the configuration value for this ImsService.
*
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @param value in String format.
- * @return as defined in com.android.ims.ImsConfig#OperationStatusConstants.
+ * @param item an integer key.
+ * @param value a String containing the new configuration value.
+ * @return Result of setting the configuration value, defined as either
+ * {@link #CONFIG_RESULT_FAILED} or {@link #CONFIG_RESULT_SUCCESS}.
*/
public int setConfig(int item, String value) {
- return ImsConfig.OperationStatusConstants.FAILED;
+ // Base Implementation - To be overridden.
+ return CONFIG_RESULT_FAILED;
}
/**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage.
+ * Gets the currently stored value configuration value from the ImsService for {@code item}.
*
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in Integer format.
+ * @param item an integer key.
+ * @return configuration value, stored in integer format or {@link #CONFIG_RESULT_UNKNOWN} if
+ * unavailable.
*/
public int getConfigInt(int item) {
- return ImsConfig.OperationStatusConstants.FAILED;
+ // Base Implementation - To be overridden.
+ return CONFIG_RESULT_UNKNOWN;
}
/**
- * Gets the value for ims service/capabilities parameters from the provisioned
- * value storage.
+ * Gets the currently stored value configuration value from the ImsService for {@code item}.
*
- * @param item as defined in com.android.ims.ImsConfig#ConfigConstants.
- * @return value in String format.
+ * @param item an integer key.
+ * @return configuration value, stored in String format or {@code null} if unavailable.
*/
public String getConfigString(int item) {
+ // Base Implementation - To be overridden.
return null;
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
index 89f95ff0142d..06c35eaec6dd 100644
--- a/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsEcbmImplBase.java
@@ -16,7 +16,9 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.RemoteException;
+import android.util.Log;
import com.android.ims.internal.IImsEcbm;
import com.android.ims.internal.IImsEcbmListener;
@@ -30,22 +32,65 @@ import com.android.ims.internal.IImsEcbmListener;
*
* @hide
*/
+@SystemApi
+public class ImsEcbmImplBase {
+ private static final String TAG = "ImsEcbmImplBase";
-public class ImsEcbmImplBase extends IImsEcbm.Stub {
+ private IImsEcbmListener mListener;
+ private IImsEcbm mImsEcbm = new IImsEcbm.Stub() {
+ @Override
+ public void setListener(IImsEcbmListener listener) {
+ mListener = listener;
+ }
+
+ @Override
+ public void exitEmergencyCallbackMode() {
+ ImsEcbmImplBase.this.exitEmergencyCallbackMode();
+ }
+ };
+
+ /** @hide */
+ public IImsEcbm getImsEcbm() {
+ return mImsEcbm;
+ }
/**
- * Sets the listener.
+ * This method should be implemented by the IMS provider. Framework will trigger this method to
+ * request to come out of ECBM mode
*/
- @Override
- public void setListener(IImsEcbmListener listener) throws RemoteException {
-
+ public void exitEmergencyCallbackMode() {
+ Log.d(TAG, "exitEmergencyCallbackMode() not implemented");
}
/**
- * Requests Modem to come out of ECBM mode
+ * Notifies the framework when the device enters Emergency Callback Mode.
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
*/
- @Override
- public void exitEmergencyCallbackMode() throws RemoteException {
+ public final void enteredEcbm() {
+ Log.d(TAG, "Entered ECBM.");
+ if (mListener != null) {
+ try {
+ mListener.enteredECBM();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ /**
+ * Notifies the framework when the device exits Emergency Callback Mode.
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
+ */
+ public final void exitedEcbm() {
+ Log.d(TAG, "Exited ECBM.");
+ if (mListener != null) {
+ try {
+ mListener.exitedECBM();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java
index c8989e059ee5..98b67c3d3727 100644
--- a/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java
+++ b/telephony/java/android/telephony/ims/stub/ImsFeatureConfiguration.java
@@ -16,6 +16,7 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.ims.feature.ImsFeature;
@@ -25,17 +26,22 @@ import java.util.Set;
/**
* Container class for IMS Feature configuration. This class contains the features that the
- * ImsService supports, which are defined in {@link ImsFeature.FeatureType}.
+ * ImsService supports, which are defined in {@link ImsFeature} as
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ *
* @hide
*/
-public class ImsFeatureConfiguration implements Parcelable {
+@SystemApi
+public final class ImsFeatureConfiguration implements Parcelable {
/**
* Features that this ImsService supports.
*/
private final Set<Integer> mFeatures;
/**
- * Creates an ImsFeatureConfiguration with the features
+ * Builder for {@link ImsFeatureConfiguration} that makes adding supported {@link ImsFeature}s
+ * easier.
*/
public static class Builder {
ImsFeatureConfiguration mConfig;
@@ -71,7 +77,10 @@ public class ImsFeatureConfiguration implements Parcelable {
* Configuration of the ImsService, which describes which features the ImsService supports
* (for registration).
* @param features an array of feature integers defined in {@link ImsFeature} that describe
- * which features this ImsService supports.
+ * which features this ImsService supports. Supported values are
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
+ * @hide
*/
public ImsFeatureConfiguration(int[] features) {
mFeatures = new ArraySet<>();
@@ -84,7 +93,9 @@ public class ImsFeatureConfiguration implements Parcelable {
}
/**
- * @return an int[] containing the features that this ImsService supports.
+ * @return an int[] containing the features that this ImsService supports. Supported values are
+ * {@link ImsFeature#FEATURE_EMERGENCY_MMTEL}, {@link ImsFeature#FEATURE_MMTEL}, and
+ * {@link ImsFeature#FEATURE_RCS}.
*/
public int[] getServiceFeatures() {
return mFeatures.stream().mapToInt(i->i).toArray();
@@ -94,6 +105,7 @@ public class ImsFeatureConfiguration implements Parcelable {
mFeatures.add(feature);
}
+ /** @hide */
protected ImsFeatureConfiguration(Parcel in) {
int[] features = in.createIntArray();
if (features != null) {
@@ -129,6 +141,9 @@ public class ImsFeatureConfiguration implements Parcelable {
dest.writeIntArray(mFeatures.stream().mapToInt(i->i).toArray());
}
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -140,6 +155,9 @@ public class ImsFeatureConfiguration implements Parcelable {
return mFeatures.equals(that.mFeatures);
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
return mFeatures.hashCode();
diff --git a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
index 05da9da485a9..ce2d89a8d809 100644
--- a/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsMultiEndpointImplBase.java
@@ -16,11 +16,16 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.RemoteException;
+import android.util.Log;
+import android.telephony.ims.ImsExternalCallState;
import com.android.ims.internal.IImsExternalCallStateListener;
import com.android.ims.internal.IImsMultiEndpoint;
+import java.util.List;
+
/**
* Base implementation of ImsMultiEndpoint, which implements stub versions of the methods
* in the IImsMultiEndpoint AIDL. Override the methods that your implementation of
@@ -31,23 +36,49 @@ import com.android.ims.internal.IImsMultiEndpoint;
*
* @hide
*/
+@SystemApi
+public class ImsMultiEndpointImplBase {
+ private static final String TAG = "MultiEndpointImplBase";
-public class ImsMultiEndpointImplBase extends IImsMultiEndpoint.Stub {
+ private IImsExternalCallStateListener mListener;
+ private IImsMultiEndpoint mImsMultiEndpoint = new IImsMultiEndpoint.Stub() {
+ @Override
+ public void setListener(IImsExternalCallStateListener listener) throws RemoteException {
+ mListener = listener;
+ }
- /**
- * Sets the listener.
- */
- @Override
- public void setListener(IImsExternalCallStateListener listener) throws RemoteException {
+ @Override
+ public void requestImsExternalCallStateInfo() throws RemoteException {
+ ImsMultiEndpointImplBase.this.requestImsExternalCallStateInfo();
+ }
+ };
+ /** @hide */
+ public IImsMultiEndpoint getIImsMultiEndpoint() {
+ return mImsMultiEndpoint;
}
/**
- * Query API to get the latest Dialog Event Package information
- * Should be invoked only after setListener is done
+ * Notifies framework when Dialog Event Package update is received
+ *
+ * @throws RuntimeException if the connection to the framework is not available.
*/
- @Override
- public void requestImsExternalCallStateInfo() throws RemoteException {
+ public final void onImsExternalCallStateUpdate(List<ImsExternalCallState> externalCallDialogs) {
+ Log.d(TAG, "ims external call state update triggered.");
+ if (mListener != null) {
+ try {
+ mListener.onImsExternalCallStateUpdate(externalCallDialogs);
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ /**
+ * This method should be implemented by the IMS provider. Framework will trigger this to get the
+ * latest Dialog Event Package information. Should
+ */
+ public void requestImsExternalCallStateInfo() {
+ Log.d(TAG, "requestImsExternalCallStateInfo() not implemented");
}
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
index dfb9b63f7b14..4334d3aadab3 100644
--- a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
@@ -17,6 +17,7 @@
package android.telephony.ims.stub;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.net.Uri;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
@@ -24,7 +25,8 @@ import android.telephony.ims.aidl.IImsRegistration;
import android.telephony.ims.aidl.IImsRegistrationCallback;
import android.util.Log;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
+
import com.android.internal.annotations.VisibleForTesting;
import java.lang.annotation.Retention;
@@ -35,11 +37,14 @@ import java.lang.annotation.RetentionPolicy;
* registration for this ImsService has changed status.
* @hide
*/
-
+@SystemApi
public class ImsRegistrationImplBase {
private static final String LOG_TAG = "ImsRegistrationImplBase";
+ /**
+ * @hide
+ */
// Defines the underlying radio technology type that we have registered for IMS over.
@IntDef(flag = true,
value = {
@@ -154,6 +159,9 @@ public class ImsRegistrationImplBase {
// Locked on mLock, create unspecified disconnect cause.
private ImsReasonInfo mLastDisconnectCause = new ImsReasonInfo();
+ /**
+ * @hide
+ */
public final IImsRegistration getBinder() {
return mBinder;
}
@@ -170,8 +178,8 @@ public class ImsRegistrationImplBase {
/**
* Notify the framework that the device is connected to the IMS network.
*
- * @param imsRadioTech the radio access technology. Valid values are defined in
- * {@link ImsRegistrationTech}.
+ * @param imsRadioTech the radio access technology. Valid values are defined as
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
*/
public final void onRegistered(@ImsRegistrationTech int imsRadioTech) {
updateToState(imsRadioTech, REGISTRATION_STATE_REGISTERED);
@@ -188,8 +196,8 @@ public class ImsRegistrationImplBase {
/**
* Notify the framework that the device is trying to connect the IMS network.
*
- * @param imsRadioTech the radio access technology. Valid values are defined in
- * {@link ImsRegistrationTech}.
+ * @param imsRadioTech the radio access technology. Valid values are defined as
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
*/
public final void onRegistering(@ImsRegistrationTech int imsRadioTech) {
updateToState(imsRadioTech, REGISTRATION_STATE_REGISTERING);
@@ -220,6 +228,13 @@ public class ImsRegistrationImplBase {
});
}
+ /**
+ * Notify the framework that the handover from the current radio technology to the technology
+ * defined in {@code imsRadioTech} has failed.
+ * @param imsRadioTech The technology that has failed to be changed. Valid values are
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}.
+ * @param info The {@link ImsReasonInfo} for the failure to change technology.
+ */
public final void onTechnologyChangeFailed(@ImsRegistrationTech int imsRadioTech,
ImsReasonInfo info) {
mCallbacks.broadcast((c) -> {
@@ -232,6 +247,11 @@ public class ImsRegistrationImplBase {
});
}
+ /**
+ * The this device's subscriber associated {@link Uri}s have changed, which are used to filter
+ * out this device's {@link Uri}s during conference calling.
+ * @param uris
+ */
public final void onSubscriberAssociatedUriChanged(Uri[] uris) {
mCallbacks.broadcast((c) -> {
try {
@@ -263,6 +283,11 @@ public class ImsRegistrationImplBase {
}
}
+ /**
+ * @return the current registration connection type. Valid values are
+ * {@link #REGISTRATION_TECH_LTE} and {@link #REGISTRATION_TECH_IWLAN}
+ * @hide
+ */
@VisibleForTesting
public final @ImsRegistrationTech int getConnectionType() {
synchronized (mLock) {
diff --git a/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java b/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java
index 7fe1c8cd005b..0673a3845383 100644
--- a/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsSmsImplBase.java
@@ -157,7 +157,7 @@ public class ImsSmsImplBase {
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
* @param result result of delivering the message. Valid values are:
* {@link #DELIVER_STATUS_OK},
- * {@link #DELIVER_STATUS_OK}
+ * {@link #DELIVER_STATUS_ERROR}
* @param messageRef the message reference
*/
public void acknowledgeSms(int token, @DeliverStatusResult int messageRef, int result) {
@@ -298,9 +298,9 @@ public class ImsSmsImplBase {
}
/**
- * Called when SmsImpl has been initialized and communication with the framework is set up.
+ * Called when ImsSmsImpl has been initialized and communication with the framework is set up.
* Any attempt by this class to access the framework before this method is called will return
- * with an {@link RuntimeException}.
+ * with a {@link RuntimeException}.
*/
public void onReady() {
// Base Implementation - Should be overridden
diff --git a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
index 054a8b22d0f2..fcd7faf73bb8 100644
--- a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java
@@ -16,177 +16,332 @@
package android.telephony.ims.stub;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.RemoteException;
+import android.telephony.ims.ImsUtListener;
import com.android.ims.internal.IImsUt;
import com.android.ims.internal.IImsUtListener;
/**
- * Base implementation of ImsUt, which implements stub versions of the methods
- * in the IImsUt AIDL. Override the methods that your implementation of ImsUt supports.
- *
- * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
- * will break other implementations of ImsUt maintained by other ImsServices.
- *
- * Provides the Ut interface interworking to get/set the supplementary service configuration.
+ * Base implementation of IMS UT interface, which implements stubs. Override these methods to
+ * implement functionality.
*
* @hide
*/
+// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
+// will break other implementations of ImsUt maintained by other ImsServices.
+@SystemApi
+public class ImsUtImplBase {
+
+ private IImsUt.Stub mServiceImpl = new IImsUt.Stub() {
+ @Override
+ public void close() throws RemoteException {
+ ImsUtImplBase.this.close();
+ }
+
+ @Override
+ public int queryCallBarring(int cbType) throws RemoteException {
+ return ImsUtImplBase.this.queryCallBarring(cbType);
+ }
+
+ @Override
+ public int queryCallForward(int condition, String number) throws RemoteException {
+ return ImsUtImplBase.this.queryCallForward(condition, number);
+ }
+
+ @Override
+ public int queryCallWaiting() throws RemoteException {
+ return ImsUtImplBase.this.queryCallWaiting();
+ }
+
+ @Override
+ public int queryCLIR() throws RemoteException {
+ return ImsUtImplBase.this.queryCLIR();
+ }
+
+ @Override
+ public int queryCLIP() throws RemoteException {
+ return ImsUtImplBase.this.queryCLIP();
+ }
+
+ @Override
+ public int queryCOLR() throws RemoteException {
+ return ImsUtImplBase.this.queryCOLR();
+ }
+
+ @Override
+ public int queryCOLP() throws RemoteException {
+ return ImsUtImplBase.this.queryCOLP();
+ }
+
+ @Override
+ public int transact(Bundle ssInfo) throws RemoteException {
+ return ImsUtImplBase.this.transact(ssInfo);
+ }
+
+ @Override
+ public int updateCallBarring(int cbType, int action, String[] barrList) throws
+ RemoteException {
+ return ImsUtImplBase.this.updateCallBarring(cbType, action, barrList);
+ }
+
+ @Override
+ public int updateCallForward(int action, int condition, String number, int serviceClass,
+ int timeSeconds) throws RemoteException {
+ return ImsUtImplBase.this.updateCallForward(action, condition, number, serviceClass,
+ timeSeconds);
+ }
+
+ @Override
+ public int updateCallWaiting(boolean enable, int serviceClass) throws RemoteException {
+ return ImsUtImplBase.this.updateCallWaiting(enable, serviceClass);
+ }
+
+ @Override
+ public int updateCLIR(int clirMode) throws RemoteException {
+ return ImsUtImplBase.this.updateCLIR(clirMode);
+ }
+
+ @Override
+ public int updateCLIP(boolean enable) throws RemoteException {
+ return ImsUtImplBase.this.updateCLIP(enable);
+ }
-public class ImsUtImplBase extends IImsUt.Stub {
+ @Override
+ public int updateCOLR(int presentation) throws RemoteException {
+ return ImsUtImplBase.this.updateCOLR(presentation);
+ }
+
+ @Override
+ public int updateCOLP(boolean enable) throws RemoteException {
+ return ImsUtImplBase.this.updateCOLP(enable);
+ }
+
+ @Override
+ public void setListener(IImsUtListener listener) throws RemoteException {
+ ImsUtImplBase.this.setListener(new ImsUtListener(listener));
+ }
+
+ @Override
+ public int queryCallBarringForServiceClass(int cbType, int serviceClass)
+ throws RemoteException {
+ return ImsUtImplBase.this.queryCallBarringForServiceClass(cbType, serviceClass);
+ }
+
+ @Override
+ public int updateCallBarringForServiceClass(int cbType, int action,
+ String[] barrList, int serviceClass) throws RemoteException {
+ return ImsUtImplBase.this.updateCallBarringForServiceClass(
+ cbType, action, barrList, serviceClass);
+ }
+ };
/**
- * Closes the object. This object is not usable after being closed.
+ * Called when the framework no longer needs to interact with the IMS UT implementation any
+ * longer.
*/
- @Override
- public void close() throws RemoteException {
+ public void close() {
}
/**
- * Retrieves the configuration of the call barring.
+ * Retrieves the call barring configuration.
+ * @param cbType
*/
- @Override
- public int queryCallBarring(int cbType) throws RemoteException {
+ public int queryCallBarring(int cbType) {
return -1;
}
/**
* Retrieves the configuration of the call barring for specified service class.
*/
- @Override
- public int queryCallBarringForServiceClass(int cbType, int serviceClass)
- throws RemoteException {
+ public int queryCallBarringForServiceClass(int cbType, int serviceClass) {
return -1;
}
/**
* Retrieves the configuration of the call forward.
*/
- @Override
- public int queryCallForward(int condition, String number) throws RemoteException {
+ public int queryCallForward(int condition, String number) {
return -1;
}
/**
* Retrieves the configuration of the call waiting.
*/
- @Override
- public int queryCallWaiting() throws RemoteException {
+ public int queryCallWaiting() {
return -1;
}
/**
* Retrieves the default CLIR setting.
+ * @hide
+ */
+ public int queryCLIR() {
+ return queryClir();
+ }
+
+ /**
+ * Retrieves the CLIP call setting.
+ * @hide
+ */
+ public int queryCLIP() {
+ return queryClip();
+ }
+
+ /**
+ * Retrieves the COLR call setting.
+ * @hide
+ */
+ public int queryCOLR() {
+ return queryColr();
+ }
+
+ /**
+ * Retrieves the COLP call setting.
+ * @hide
+ */
+ public int queryCOLP() {
+ return queryColp();
+ }
+
+ /**
+ * Retrieves the default CLIR setting.
*/
- @Override
- public int queryCLIR() throws RemoteException {
+ public int queryClir() {
return -1;
}
/**
* Retrieves the CLIP call setting.
*/
- @Override
- public int queryCLIP() throws RemoteException {
+ public int queryClip() {
return -1;
}
/**
* Retrieves the COLR call setting.
*/
- @Override
- public int queryCOLR() throws RemoteException {
+ public int queryColr() {
return -1;
}
/**
* Retrieves the COLP call setting.
*/
- @Override
- public int queryCOLP() throws RemoteException {
+ public int queryColp() {
return -1;
}
/**
* Updates or retrieves the supplementary service configuration.
*/
- @Override
- public int transact(Bundle ssInfo) throws RemoteException {
+ public int transact(Bundle ssInfo) {
return -1;
}
/**
* Updates the configuration of the call barring.
*/
- @Override
- public int updateCallBarring(int cbType, int action, String[] barrList) throws RemoteException {
+ public int updateCallBarring(int cbType, int action, String[] barrList) {
return -1;
}
/**
* Updates the configuration of the call barring for specified service class.
*/
- @Override
public int updateCallBarringForServiceClass(int cbType, int action, String[] barrList,
- int serviceClass) throws RemoteException {
+ int serviceClass) {
return -1;
}
/**
* Updates the configuration of the call forward.
*/
- @Override
public int updateCallForward(int action, int condition, String number, int serviceClass,
- int timeSeconds) throws RemoteException {
+ int timeSeconds) {
return 0;
}
/**
* Updates the configuration of the call waiting.
*/
- @Override
- public int updateCallWaiting(boolean enable, int serviceClass) throws RemoteException {
+ public int updateCallWaiting(boolean enable, int serviceClass) {
return -1;
}
/**
* Updates the configuration of the CLIR supplementary service.
+ * @hide
+ */
+ public int updateCLIR(int clirMode) {
+ return updateClir(clirMode);
+ }
+
+ /**
+ * Updates the configuration of the CLIP supplementary service.
+ * @hide
+ */
+ public int updateCLIP(boolean enable) {
+ return updateClip(enable);
+ }
+
+ /**
+ * Updates the configuration of the COLR supplementary service.
+ * @hide
+ */
+ public int updateCOLR(int presentation) {
+ return updateColr(presentation);
+ }
+
+ /**
+ * Updates the configuration of the COLP supplementary service.
+ * @hide
+ */
+ public int updateCOLP(boolean enable) {
+ return updateColp(enable);
+ }
+
+ /**
+ * Updates the configuration of the CLIR supplementary service.
*/
- @Override
- public int updateCLIR(int clirMode) throws RemoteException {
+ public int updateClir(int clirMode) {
return -1;
}
/**
* Updates the configuration of the CLIP supplementary service.
*/
- @Override
- public int updateCLIP(boolean enable) throws RemoteException {
+ public int updateClip(boolean enable) {
return -1;
}
/**
* Updates the configuration of the COLR supplementary service.
*/
- @Override
- public int updateCOLR(int presentation) throws RemoteException {
+ public int updateColr(int presentation) {
return -1;
}
/**
* Updates the configuration of the COLP supplementary service.
*/
- @Override
- public int updateCOLP(boolean enable) throws RemoteException {
+ public int updateColp(boolean enable) {
return -1;
}
/**
* Sets the listener.
*/
- @Override
- public void setListener(IImsUtListener listener) throws RemoteException {
+ public void setListener(ImsUtListener listener) {
+ }
+
+ /**
+ * @hide
+ */
+ public IImsUt getInterface() {
+ return mServiceImpl;
}
}
diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java
index e670341ffe7f..1dda6bf2b8bc 100644
--- a/telephony/java/com/android/ims/ImsConfig.java
+++ b/telephony/java/com/android/ims/ImsConfig.java
@@ -19,6 +19,7 @@ package com.android.ims;
import android.content.Context;
import android.os.RemoteException;
import android.telephony.Rlog;
+import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.aidl.IImsConfig;
import android.telephony.ims.stub.ImsConfigImplBase;
diff --git a/telephony/java/com/android/ims/ImsException.java b/telephony/java/com/android/ims/ImsException.java
index 0e8bad79c59b..f35e88672a23 100644
--- a/telephony/java/com/android/ims/ImsException.java
+++ b/telephony/java/com/android/ims/ImsException.java
@@ -16,6 +16,8 @@
package com.android.ims;
+import android.telephony.ims.ImsReasonInfo;
+
/**
* This class defines a general IMS-related exception.
*
diff --git a/telephony/java/com/android/ims/ImsUtInterface.java b/telephony/java/com/android/ims/ImsUtInterface.java
index 14c184a64061..c9d440551631 100644
--- a/telephony/java/com/android/ims/ImsUtInterface.java
+++ b/telephony/java/com/android/ims/ImsUtInterface.java
@@ -18,6 +18,8 @@ package com.android.ims;
import android.os.Handler;
import android.os.Message;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsSsInfo;
/**
* Provides APIs for the supplementary service settings using IMS (Ut interface).
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index b477deab2d56..203e6cf9c577 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -19,8 +19,8 @@ package com.android.ims.internal;
import android.os.Message;
import android.telephony.ims.aidl.IImsCallSessionListener;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsStreamMediaProfile;
import com.android.ims.internal.IImsVideoCallProvider;
/**
diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
index 748092d2a3bd..a8e8b7dd03aa 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
@@ -16,12 +16,12 @@
package com.android.ims.internal;
-import com.android.ims.ImsStreamMediaProfile;
-import com.android.ims.ImsCallProfile;
-import com.android.ims.ImsReasonInfo;
-import com.android.ims.ImsConferenceState;
+import android.telephony.ims.ImsStreamMediaProfile;
+import android.telephony.ims.ImsCallProfile;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsConferenceState;
import com.android.ims.internal.IImsCallSession;
-import com.android.ims.ImsSuppServiceNotification;
+import android.telephony.ims.ImsSuppServiceNotification;
/**
* A listener type for receiving notification on IMS call session events.
diff --git a/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl b/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
index 16219671cea5..b3d813960c55 100644
--- a/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl
@@ -16,7 +16,7 @@
package com.android.ims.internal;
-import com.android.ims.ImsExternalCallState;
+import android.telephony.ims.ImsExternalCallState;
/**
* A listener type for receiving notifications about DEP through IMS
diff --git a/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
new file mode 100644
index 000000000000..b83b13060aff
--- /dev/null
+++ b/telephony/java/com/android/ims/internal/IImsFeatureStatusCallback.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.ims.internal;
+
+/**
+ * Interface from ImsFeature in the ImsService to ImsServiceController.
+ * {@hide}
+ */
+oneway interface IImsFeatureStatusCallback {
+ void notifyImsFeatureStatus(int featureStatus);
+}
diff --git a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
index d43077bf10bc..51511923402f 100644
--- a/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
+++ b/telephony/java/com/android/ims/internal/IImsMMTelFeature.aidl
@@ -18,7 +18,7 @@ package com.android.ims.internal;
import android.app.PendingIntent;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsConfig;
import com.android.ims.internal.IImsEcbm;
diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
index 15f872603bfb..2212109c8a67 100644
--- a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl
@@ -16,7 +16,7 @@
package com.android.ims.internal;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
import android.net.Uri;
diff --git a/telephony/java/com/android/ims/internal/IImsService.aidl b/telephony/java/com/android/ims/internal/IImsService.aidl
index 406d22d9bd8e..c3cc6fb7a385 100644
--- a/telephony/java/com/android/ims/internal/IImsService.aidl
+++ b/telephony/java/com/android/ims/internal/IImsService.aidl
@@ -18,7 +18,7 @@ package com.android.ims.internal;
import android.app.PendingIntent;
-import com.android.ims.ImsCallProfile;
+import android.telephony.ims.ImsCallProfile;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.internal.IImsCallSessionListener;
import com.android.ims.internal.IImsConfig;
diff --git a/telephony/java/com/android/ims/internal/IImsUtListener.aidl b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
index 1bc036979356..a603cd34dfcd 100644
--- a/telephony/java/com/android/ims/internal/IImsUtListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
@@ -18,11 +18,11 @@ package com.android.ims.internal;
import android.os.Bundle;
-import com.android.ims.ImsCallForwardInfo;
-import com.android.ims.ImsSsData;
-import com.android.ims.ImsSsInfo;
+import android.telephony.ims.ImsCallForwardInfo;
+import android.telephony.ims.ImsSsInfo;
import com.android.ims.internal.IImsUt;
-import com.android.ims.ImsReasonInfo;
+import android.telephony.ims.ImsReasonInfo;
+import android.telephony.ims.ImsSsData;
/**
* {@hide}