summaryrefslogtreecommitdiff
path: root/framework/src/android
diff options
context:
space:
mode:
authorbodamnam <bodamnam@google.com>2022-06-27 08:38:59 +0000
committerbodamnam <bodamnam@google.com>2022-06-28 00:46:37 +0000
commit40a3f9e06a3aca510e8451bd95fd67e9db2930ee (patch)
treeba5de8183c345fc1d965f49365032fd316812c24 /framework/src/android
parentf04a10cb190e01229abc75b575126702598c163a (diff)
downloadImsMedia-40a3f9e06a3aca510e8451bd95fd67e9db2930ee.tar.gz
Add implementation for the case of ImsStack crash handling
Bug: 233860727 Test: test with devices Change-Id: I844b0bc7ef450fc578267b1a4a6c40663c73a5e9
Diffstat (limited to 'framework/src/android')
-rw-r--r--framework/src/android/telephony/imsmedia/ImsMediaManager.java30
1 files changed, 18 insertions, 12 deletions
diff --git a/framework/src/android/telephony/imsmedia/ImsMediaManager.java b/framework/src/android/telephony/imsmedia/ImsMediaManager.java
index 3afd085a..fc16d158 100644
--- a/framework/src/android/telephony/imsmedia/ImsMediaManager.java
+++ b/framework/src/android/telephony/imsmedia/ImsMediaManager.java
@@ -16,8 +16,6 @@
package android.telephony.imsmedia;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -28,9 +26,13 @@ import android.os.RemoteException;
import android.telephony.imsmedia.ImsMediaSession;
import android.util.Log;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
import java.net.DatagramSocket;
-import java.util.concurrent.Executor;
import java.util.Objects;
+import java.util.concurrent.Executor;
+
/**
* IMS media manager APIs to manage the IMS media sessions
@@ -57,12 +59,13 @@ public class ImsMediaManager {
* open session is failed then an error code {@link SessionOperationResult} will
* be returned using {@link SessionCallback#onOpenSessionFailure(int)} API.
*
- * @param rtpSocket local UDP socket to send and receive incoming RTP packets
+ * @param rtpSocket local UDP socket to send and receive incoming RTP packets
* @param rtcpSocket local UDP socket to send and receive incoming RTCP packets
- * @param rtpConfig provides remote endpoint info and codec details.
- * This could be null initially and the application may update
- * this later using {@link ImsMediaSession#modifySession()} API.
- * @param callback callbacks to receive session specific notifications.
+ * @param rtpConfig provides remote endpoint info and codec details.
+ * This could be null initially and the application may update
+ * this later using {@link ImsMediaSession#modifySession()}
+ * API.
+ * @param callback callbacks to receive session specific notifications.
*/
public void openSession(@NonNull final DatagramSocket rtpSocket,
@NonNull final DatagramSocket rtcpSocket,
@@ -115,7 +118,8 @@ public class ImsMediaManager {
}
/**
- * Interface to send call-backs to the application when the service is connected.
+ * Interface to send call-backs to the application when the service is
+ * connected.
*/
public interface OnConnectedCallback {
/**
@@ -143,7 +147,6 @@ public class ImsMediaManager {
mImsMedia = IImsMedia.Stub.asInterface(service);
Log.d(TAG, "onServiceConnected");
-
mExecutor.execute(new Runnable() {
@Override
public void run() {
@@ -166,8 +169,8 @@ public class ImsMediaManager {
Intent intent = new Intent(IImsMedia.class.getName());
intent.setClassName(MEDIA_SERVICE_PACKAGE, MEDIA_SERVICE_CLASS);
- boolean bindingSuccessful =
- mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+ boolean bindingSuccessful = mContext.bindService(intent, mConnection,
+ Context.BIND_AUTO_CREATE);
Log.d(TAG, "binding: " + bindingSuccessful);
if (bindingSuccessful) {
@@ -193,6 +196,7 @@ public class ImsMediaManager {
/**
* Called when the session is opened successfully
+ *
* @param session session object
*/
public void onOpenSessionSuccess(ImsMediaSession session) {
@@ -201,6 +205,7 @@ public class ImsMediaManager {
/**
* Called when the open session fails
+ *
* @param error Error code
*/
public void onOpenSessionFailure(int error) {
@@ -209,6 +214,7 @@ public class ImsMediaManager {
/**
* Called when any change occurs to the RTP session.
+ *
* @param state session state
*/
public void onSessionChanged(@ImsMediaSession.SessionState int state) {