summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tyler Gunn <tgunn@google.com> 2023-04-26 02:41:41 +0000
committer Tyler Gunn <tgunn@google.com> 2023-04-27 20:09:26 +0000
commit8ae4277688dfbed0e7a56868f4435579ce1e05af (patch)
tree28da33421177df4d08568d5e89115831d054d4fc
parent6fe97e67cf37e64ad58dd11c51000a2a5479379d (diff)
Add extra key to StreamingCall.
Also fix bug where CallStreamingService would never init the streaming adapter. This caused the CallStreamingService to NEVER get notified of onCallStreamingstarted since the handleMessage method was checking to see if the adapter was set. Test: Added CTS test for this case. Bug: 279650527 Change-Id: I389efacd7547439985caabc068be5413897cf128
-rw-r--r--telecomm/java/android/telecom/CallStreamingService.java9
-rw-r--r--telecomm/java/android/telecom/StreamingCall.java6
2 files changed, 14 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/CallStreamingService.java b/telecomm/java/android/telecom/CallStreamingService.java
index df48cd6a16e2..581cd7ee6d50 100644
--- a/telecomm/java/android/telecom/CallStreamingService.java
+++ b/telecomm/java/android/telecom/CallStreamingService.java
@@ -73,22 +73,26 @@ public abstract class CallStreamingService extends Service {
@Override
public void handleMessage(Message msg) {
if (mStreamingCallAdapter == null && msg.what != MSG_SET_STREAMING_CALL_ADAPTER) {
+ Log.i(this, "handleMessage: null adapter!");
return;
}
switch (msg.what) {
case MSG_SET_STREAMING_CALL_ADAPTER:
if (msg.obj != null) {
+ Log.i(this, "MSG_SET_STREAMING_CALL_ADAPTER");
mStreamingCallAdapter = new StreamingCallAdapter(
(IStreamingCallAdapter) msg.obj);
}
break;
case MSG_CALL_STREAMING_STARTED:
+ Log.i(this, "MSG_CALL_STREAMING_STARTED");
mCall = (StreamingCall) msg.obj;
mCall.setAdapter(mStreamingCallAdapter);
CallStreamingService.this.onCallStreamingStarted(mCall);
break;
case MSG_CALL_STREAMING_STOPPED:
+ Log.i(this, "MSG_CALL_STREAMING_STOPPED");
mCall = null;
mStreamingCallAdapter = null;
CallStreamingService.this.onCallStreamingStopped();
@@ -109,6 +113,7 @@ public abstract class CallStreamingService extends Service {
@Nullable
@Override
public IBinder onBind(@NonNull Intent intent) {
+ Log.i(this, "onBind");
return new CallStreamingServiceBinder();
}
@@ -117,12 +122,14 @@ public abstract class CallStreamingService extends Service {
@Override
public void setStreamingCallAdapter(IStreamingCallAdapter streamingCallAdapter)
throws RemoteException {
- mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, mStreamingCallAdapter)
+ Log.i(this, "setCallStreamingAdapter");
+ mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, streamingCallAdapter)
.sendToTarget();
}
@Override
public void onCallStreamingStarted(StreamingCall call) throws RemoteException {
+ Log.i(this, "onCallStreamingStarted");
mHandler.obtainMessage(MSG_CALL_STREAMING_STARTED, call).sendToTarget();
}
diff --git a/telecomm/java/android/telecom/StreamingCall.java b/telecomm/java/android/telecom/StreamingCall.java
index d4f43225139b..3319fc117b4d 100644
--- a/telecomm/java/android/telecom/StreamingCall.java
+++ b/telecomm/java/android/telecom/StreamingCall.java
@@ -55,6 +55,12 @@ public final class StreamingCall implements Parcelable {
public static final int STATE_DISCONNECTED = 3;
/**
+ * The ID associated with this call. This is the same value as {@link CallControl#getCallId()}.
+ * @hide
+ */
+ public static final String EXTRA_CALL_ID = "android.telecom.extra.CALL_ID";
+
+ /**
* @hide
*/
private StreamingCall(@NonNull Parcel in) {