Loading src/com/android/server/telecom/CallStreamingController.java +14 −9 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class CallStreamingController extends CallsManagerListenerBase { if (mCallsManager.getCallStreamingController().isStreaming()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_ALREADY_STREAMING")); } else { future.complete(new VoipCallTransactionResult( Loading Loading @@ -196,7 +196,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (roleManager == null || packageManager == null) { Log.w(this, "processTransaction: Can't find system service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Loading @@ -205,7 +206,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (holders.isEmpty()) { Log.w(this, "processTransaction: Can't find streaming app"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Log.i(this, "processTransaction: servicePackage=%s", holders.get(0)); Loading @@ -216,7 +218,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (infos.isEmpty()) { Log.w(this, "processTransaction: Can't find streaming service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Loading @@ -227,7 +230,8 @@ public class CallStreamingController extends CallsManagerListenerBase { Log.w(this, "Must require BIND_CALL_STREAMING_SERVICE: " + serviceInfo.packageName); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Intent intent = new Intent(CallStreamingService.SERVICE_INTERFACE); Loading @@ -239,7 +243,7 @@ public class CallStreamingController extends CallsManagerListenerBase { | Context.BIND_SCHEDULE_LIKE_TOP_APP, mUserHandle)) { Log.w(this, "Can't bind to streaming service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_SENDER_BINDING_ERROR")); } return future; Loading Loading @@ -379,7 +383,8 @@ public class CallStreamingController extends CallsManagerListenerBase { VoipCallTransactionResult.RESULT_SUCCEED, null)); } catch (RemoteException e) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, "Exception when request " CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "Exception when request " + "setting state to streaming app.")); } return future; Loading Loading @@ -409,7 +414,7 @@ public class CallStreamingController extends CallsManagerListenerBase { } catch (RemoteException e) { resetController(); mFuture.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, StreamingServiceTransaction.MESSAGE)); } } Loading @@ -433,7 +438,7 @@ public class CallStreamingController extends CallsManagerListenerBase { resetController(); if (!mFuture.isDone()) { mFuture.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_SENDER_BINDING_ERROR")); } else { mWrapper.onCallStreamingFailed(mCall, STREAMING_FAILED_SENDER_BINDING_ERROR); Loading src/com/android/server/telecom/voip/EndpointChangeTransaction.java +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.telecom.voip; import android.os.Bundle; import android.os.ResultReceiver; import android.telecom.CallEndpoint; import android.telecom.CallException; import android.util.Log; import com.android.server.telecom.CallsManager; Loading Loading @@ -49,8 +50,9 @@ public class EndpointChangeTransaction extends VoipCallTransaction { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_SUCCEED, null)); } else { // TODO:: define errors in CallException class. b/335703584 future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, null)); CallException.CODE_ERROR_UNKNOWN, null)); } } }); Loading src/com/android/server/telecom/voip/ParallelTransaction.java +5 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.server.telecom.voip; import android.telecom.CallException; import com.android.server.telecom.LoggedHandlerExecutor; import com.android.server.telecom.TelecomSystem; Loading Loading @@ -48,14 +50,8 @@ public class ParallelTransaction extends VoipCallTransaction { if (result.getResult() != VoipCallTransactionResult.RESULT_SUCCEED) { CompletableFuture.completedFuture(null).thenApplyAsync( (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, String.format( "sub transaction %s failed", transactionName)); finish(mainResult); mCompleteListener.onTransactionCompleted(mainResult, finish(result); mCompleteListener.onTransactionCompleted(result, mTransactionName); return null; }, new LoggedHandlerExecutor(mHandler, Loading @@ -74,7 +70,7 @@ public class ParallelTransaction extends VoipCallTransaction { (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_OPERATION_TIMED_OUT, String.format("sub transaction %s timed out", transactionName)); finish(mainResult); Loading src/com/android/server/telecom/voip/RequestVideoStateTransaction.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.telecom.voip; import static com.android.server.telecom.voip.VideoStateTranslation.TransactionalVideoStateToVideoProfileState; import android.telecom.CallException; import android.telecom.VideoProfile; import android.util.Log; Loading Loading @@ -48,12 +49,12 @@ public class RequestVideoStateTransaction extends VoipCallTransaction { if (isRequestingVideoTransmission(mVideoProfileState) && !mCall.isVideoCallingSupportedByPhoneAccount()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /*TODO:: define error code. b/335703584 */, "Video calling is not supported by the target account")); } else if (isRequestingVideoTransmission(mVideoProfileState) && !mCall.isTransactionalCallSupportsVideoCalling()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /*TODO:: define error code. b/335703584 */, "Video calling is not supported according to the callAttributes")); } else { mCall.setVideoState(mVideoProfileState); Loading src/com/android/server/telecom/voip/SerialTransaction.java +5 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.server.telecom.voip; import android.telecom.CallException; import com.android.server.telecom.LoggedHandlerExecutor; import com.android.server.telecom.TelecomSystem; Loading Loading @@ -53,14 +55,8 @@ public class SerialTransaction extends VoipCallTransaction { handleTransactionFailure(); CompletableFuture.completedFuture(null).thenApplyAsync( (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, String.format( "sub transaction %s failed", transactionName)); finish(mainResult); mCompleteListener.onTransactionCompleted(mainResult, finish(result); mCompleteListener.onTransactionCompleted(result, mTransactionName); return null; }, new LoggedHandlerExecutor(mHandler, Loading @@ -86,7 +82,7 @@ public class SerialTransaction extends VoipCallTransaction { (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_OPERATION_TIMED_OUT, String.format("sub transaction %s timed out", transactionName)); finish(mainResult); Loading Loading
src/com/android/server/telecom/CallStreamingController.java +14 −9 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class CallStreamingController extends CallsManagerListenerBase { if (mCallsManager.getCallStreamingController().isStreaming()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_ALREADY_STREAMING")); } else { future.complete(new VoipCallTransactionResult( Loading Loading @@ -196,7 +196,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (roleManager == null || packageManager == null) { Log.w(this, "processTransaction: Can't find system service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Loading @@ -205,7 +206,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (holders.isEmpty()) { Log.w(this, "processTransaction: Can't find streaming app"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Log.i(this, "processTransaction: servicePackage=%s", holders.get(0)); Loading @@ -216,7 +218,8 @@ public class CallStreamingController extends CallsManagerListenerBase { if (infos.isEmpty()) { Log.w(this, "processTransaction: Can't find streaming service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Loading @@ -227,7 +230,8 @@ public class CallStreamingController extends CallsManagerListenerBase { Log.w(this, "Must require BIND_CALL_STREAMING_SERVICE: " + serviceInfo.packageName); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, MESSAGE)); CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, MESSAGE)); return future; } Intent intent = new Intent(CallStreamingService.SERVICE_INTERFACE); Loading @@ -239,7 +243,7 @@ public class CallStreamingController extends CallsManagerListenerBase { | Context.BIND_SCHEDULE_LIKE_TOP_APP, mUserHandle)) { Log.w(this, "Can't bind to streaming service"); future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_SENDER_BINDING_ERROR")); } return future; Loading Loading @@ -379,7 +383,8 @@ public class CallStreamingController extends CallsManagerListenerBase { VoipCallTransactionResult.RESULT_SUCCEED, null)); } catch (RemoteException e) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, "Exception when request " CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "Exception when request " + "setting state to streaming app.")); } return future; Loading Loading @@ -409,7 +414,7 @@ public class CallStreamingController extends CallsManagerListenerBase { } catch (RemoteException e) { resetController(); mFuture.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, StreamingServiceTransaction.MESSAGE)); } } Loading @@ -433,7 +438,7 @@ public class CallStreamingController extends CallsManagerListenerBase { resetController(); if (!mFuture.isDone()) { mFuture.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /* TODO:: define error b/335703584 */, "STREAMING_FAILED_SENDER_BINDING_ERROR")); } else { mWrapper.onCallStreamingFailed(mCall, STREAMING_FAILED_SENDER_BINDING_ERROR); Loading
src/com/android/server/telecom/voip/EndpointChangeTransaction.java +3 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.telecom.voip; import android.os.Bundle; import android.os.ResultReceiver; import android.telecom.CallEndpoint; import android.telecom.CallException; import android.util.Log; import com.android.server.telecom.CallsManager; Loading Loading @@ -49,8 +50,9 @@ public class EndpointChangeTransaction extends VoipCallTransaction { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_SUCCEED, null)); } else { // TODO:: define errors in CallException class. b/335703584 future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, null)); CallException.CODE_ERROR_UNKNOWN, null)); } } }); Loading
src/com/android/server/telecom/voip/ParallelTransaction.java +5 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.server.telecom.voip; import android.telecom.CallException; import com.android.server.telecom.LoggedHandlerExecutor; import com.android.server.telecom.TelecomSystem; Loading Loading @@ -48,14 +50,8 @@ public class ParallelTransaction extends VoipCallTransaction { if (result.getResult() != VoipCallTransactionResult.RESULT_SUCCEED) { CompletableFuture.completedFuture(null).thenApplyAsync( (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, String.format( "sub transaction %s failed", transactionName)); finish(mainResult); mCompleteListener.onTransactionCompleted(mainResult, finish(result); mCompleteListener.onTransactionCompleted(result, mTransactionName); return null; }, new LoggedHandlerExecutor(mHandler, Loading @@ -74,7 +70,7 @@ public class ParallelTransaction extends VoipCallTransaction { (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_OPERATION_TIMED_OUT, String.format("sub transaction %s timed out", transactionName)); finish(mainResult); Loading
src/com/android/server/telecom/voip/RequestVideoStateTransaction.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server.telecom.voip; import static com.android.server.telecom.voip.VideoStateTranslation.TransactionalVideoStateToVideoProfileState; import android.telecom.CallException; import android.telecom.VideoProfile; import android.util.Log; Loading Loading @@ -48,12 +49,12 @@ public class RequestVideoStateTransaction extends VoipCallTransaction { if (isRequestingVideoTransmission(mVideoProfileState) && !mCall.isVideoCallingSupportedByPhoneAccount()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /*TODO:: define error code. b/335703584 */, "Video calling is not supported by the target account")); } else if (isRequestingVideoTransmission(mVideoProfileState) && !mCall.isTransactionalCallSupportsVideoCalling()) { future.complete(new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_ERROR_UNKNOWN /*TODO:: define error code. b/335703584 */, "Video calling is not supported according to the callAttributes")); } else { mCall.setVideoState(mVideoProfileState); Loading
src/com/android/server/telecom/voip/SerialTransaction.java +5 −9 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.server.telecom.voip; import android.telecom.CallException; import com.android.server.telecom.LoggedHandlerExecutor; import com.android.server.telecom.TelecomSystem; Loading Loading @@ -53,14 +55,8 @@ public class SerialTransaction extends VoipCallTransaction { handleTransactionFailure(); CompletableFuture.completedFuture(null).thenApplyAsync( (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, String.format( "sub transaction %s failed", transactionName)); finish(mainResult); mCompleteListener.onTransactionCompleted(mainResult, finish(result); mCompleteListener.onTransactionCompleted(result, mTransactionName); return null; }, new LoggedHandlerExecutor(mHandler, Loading @@ -86,7 +82,7 @@ public class SerialTransaction extends VoipCallTransaction { (x) -> { VoipCallTransactionResult mainResult = new VoipCallTransactionResult( VoipCallTransactionResult.RESULT_FAILED, CallException.CODE_OPERATION_TIMED_OUT, String.format("sub transaction %s timed out", transactionName)); finish(mainResult); Loading