Loading telecomm/java/android/telecom/CallStreamingService.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -73,22 +73,26 @@ public abstract class CallStreamingService extends Service { @Override @Override public void handleMessage(Message msg) { public void handleMessage(Message msg) { if (mStreamingCallAdapter == null && msg.what != MSG_SET_STREAMING_CALL_ADAPTER) { if (mStreamingCallAdapter == null && msg.what != MSG_SET_STREAMING_CALL_ADAPTER) { Log.i(this, "handleMessage: null adapter!"); return; return; } } switch (msg.what) { switch (msg.what) { case MSG_SET_STREAMING_CALL_ADAPTER: case MSG_SET_STREAMING_CALL_ADAPTER: if (msg.obj != null) { if (msg.obj != null) { Log.i(this, "MSG_SET_STREAMING_CALL_ADAPTER"); mStreamingCallAdapter = new StreamingCallAdapter( mStreamingCallAdapter = new StreamingCallAdapter( (IStreamingCallAdapter) msg.obj); (IStreamingCallAdapter) msg.obj); } } break; break; case MSG_CALL_STREAMING_STARTED: case MSG_CALL_STREAMING_STARTED: Log.i(this, "MSG_CALL_STREAMING_STARTED"); mCall = (StreamingCall) msg.obj; mCall = (StreamingCall) msg.obj; mCall.setAdapter(mStreamingCallAdapter); mCall.setAdapter(mStreamingCallAdapter); CallStreamingService.this.onCallStreamingStarted(mCall); CallStreamingService.this.onCallStreamingStarted(mCall); break; break; case MSG_CALL_STREAMING_STOPPED: case MSG_CALL_STREAMING_STOPPED: Log.i(this, "MSG_CALL_STREAMING_STOPPED"); mCall = null; mCall = null; mStreamingCallAdapter = null; mStreamingCallAdapter = null; CallStreamingService.this.onCallStreamingStopped(); CallStreamingService.this.onCallStreamingStopped(); Loading @@ -109,6 +113,7 @@ public abstract class CallStreamingService extends Service { @Nullable @Nullable @Override @Override public IBinder onBind(@NonNull Intent intent) { public IBinder onBind(@NonNull Intent intent) { Log.i(this, "onBind"); return new CallStreamingServiceBinder(); return new CallStreamingServiceBinder(); } } Loading @@ -117,12 +122,14 @@ public abstract class CallStreamingService extends Service { @Override @Override public void setStreamingCallAdapter(IStreamingCallAdapter streamingCallAdapter) public void setStreamingCallAdapter(IStreamingCallAdapter streamingCallAdapter) throws RemoteException { throws RemoteException { mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, mStreamingCallAdapter) Log.i(this, "setCallStreamingAdapter"); mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, streamingCallAdapter) .sendToTarget(); .sendToTarget(); } } @Override @Override public void onCallStreamingStarted(StreamingCall call) throws RemoteException { public void onCallStreamingStarted(StreamingCall call) throws RemoteException { Log.i(this, "onCallStreamingStarted"); mHandler.obtainMessage(MSG_CALL_STREAMING_STARTED, call).sendToTarget(); mHandler.obtainMessage(MSG_CALL_STREAMING_STARTED, call).sendToTarget(); } } Loading telecomm/java/android/telecom/StreamingCall.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,12 @@ public final class StreamingCall implements Parcelable { */ */ public static final int STATE_DISCONNECTED = 3; 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 * @hide */ */ Loading Loading
telecomm/java/android/telecom/CallStreamingService.java +8 −1 Original line number Original line Diff line number Diff line Loading @@ -73,22 +73,26 @@ public abstract class CallStreamingService extends Service { @Override @Override public void handleMessage(Message msg) { public void handleMessage(Message msg) { if (mStreamingCallAdapter == null && msg.what != MSG_SET_STREAMING_CALL_ADAPTER) { if (mStreamingCallAdapter == null && msg.what != MSG_SET_STREAMING_CALL_ADAPTER) { Log.i(this, "handleMessage: null adapter!"); return; return; } } switch (msg.what) { switch (msg.what) { case MSG_SET_STREAMING_CALL_ADAPTER: case MSG_SET_STREAMING_CALL_ADAPTER: if (msg.obj != null) { if (msg.obj != null) { Log.i(this, "MSG_SET_STREAMING_CALL_ADAPTER"); mStreamingCallAdapter = new StreamingCallAdapter( mStreamingCallAdapter = new StreamingCallAdapter( (IStreamingCallAdapter) msg.obj); (IStreamingCallAdapter) msg.obj); } } break; break; case MSG_CALL_STREAMING_STARTED: case MSG_CALL_STREAMING_STARTED: Log.i(this, "MSG_CALL_STREAMING_STARTED"); mCall = (StreamingCall) msg.obj; mCall = (StreamingCall) msg.obj; mCall.setAdapter(mStreamingCallAdapter); mCall.setAdapter(mStreamingCallAdapter); CallStreamingService.this.onCallStreamingStarted(mCall); CallStreamingService.this.onCallStreamingStarted(mCall); break; break; case MSG_CALL_STREAMING_STOPPED: case MSG_CALL_STREAMING_STOPPED: Log.i(this, "MSG_CALL_STREAMING_STOPPED"); mCall = null; mCall = null; mStreamingCallAdapter = null; mStreamingCallAdapter = null; CallStreamingService.this.onCallStreamingStopped(); CallStreamingService.this.onCallStreamingStopped(); Loading @@ -109,6 +113,7 @@ public abstract class CallStreamingService extends Service { @Nullable @Nullable @Override @Override public IBinder onBind(@NonNull Intent intent) { public IBinder onBind(@NonNull Intent intent) { Log.i(this, "onBind"); return new CallStreamingServiceBinder(); return new CallStreamingServiceBinder(); } } Loading @@ -117,12 +122,14 @@ public abstract class CallStreamingService extends Service { @Override @Override public void setStreamingCallAdapter(IStreamingCallAdapter streamingCallAdapter) public void setStreamingCallAdapter(IStreamingCallAdapter streamingCallAdapter) throws RemoteException { throws RemoteException { mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, mStreamingCallAdapter) Log.i(this, "setCallStreamingAdapter"); mHandler.obtainMessage(MSG_SET_STREAMING_CALL_ADAPTER, streamingCallAdapter) .sendToTarget(); .sendToTarget(); } } @Override @Override public void onCallStreamingStarted(StreamingCall call) throws RemoteException { public void onCallStreamingStarted(StreamingCall call) throws RemoteException { Log.i(this, "onCallStreamingStarted"); mHandler.obtainMessage(MSG_CALL_STREAMING_STARTED, call).sendToTarget(); mHandler.obtainMessage(MSG_CALL_STREAMING_STARTED, call).sendToTarget(); } } Loading
telecomm/java/android/telecom/StreamingCall.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,12 @@ public final class StreamingCall implements Parcelable { */ */ public static final int STATE_DISCONNECTED = 3; 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 * @hide */ */ Loading