Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c1f2087 authored by Shuo Qian's avatar Shuo Qian Committed by Automerger Merge Worker
Browse files

Merge "Throw new IllegalStateException in CallRedirectionService when the call...

Merge "Throw new IllegalStateException in CallRedirectionService when the call redirection is not initialized yet" into sc-dev am: ba314fbb am: 513b4646

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15301694

Change-Id: Iff3824c2a57be8377691215a3342d4a09182b1c4
parents 1f862b0a 513b4646
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ public abstract class CallRedirectionService extends Service {
     */
    public final void placeCallUnmodified() {
        try {
            if (mCallRedirectionAdapter == null) {
                throw new IllegalStateException("Can only be called from onPlaceCall.");
            }
            mCallRedirectionAdapter.placeCallUnmodified();
        } catch (RemoteException e) {
            e.rethrowAsRuntimeException();
@@ -128,6 +131,9 @@ public abstract class CallRedirectionService extends Service {
                                   @NonNull PhoneAccountHandle targetPhoneAccount,
                                   boolean confirmFirst) {
        try {
            if (mCallRedirectionAdapter == null) {
                throw new IllegalStateException("Can only be called from onPlaceCall.");
            }
            mCallRedirectionAdapter.redirectCall(gatewayUri, targetPhoneAccount, confirmFirst);
        } catch (RemoteException e) {
            e.rethrowAsRuntimeException();
@@ -146,6 +152,9 @@ public abstract class CallRedirectionService extends Service {
     */
    public final void cancelCall() {
        try {
            if (mCallRedirectionAdapter == null) {
                throw new IllegalStateException("Can only be called from onPlaceCall.");
            }
            mCallRedirectionAdapter.cancelCall();
        } catch (RemoteException e) {
            e.rethrowAsRuntimeException();