diff options
author | Scott Lobdell <slobdell@google.com> | 2021-07-27 17:02:32 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-07-27 17:02:32 +0000 |
commit | cb84bc77bfeb89a940d8439f7458fe5d9bef7bef (patch) | |
tree | d6e70908803e918eb485e058341ce55d0a957188 /telecomm | |
parent | dc5ea9d31ab76ba378da9c550813e6b7d8be1e69 (diff) | |
parent | 6aa393b52cd7362100a2b3e9b0b1dece473cf6dd (diff) |
Merge SP1A.210723.002
Change-Id: I220cdfc5cb9db40162fd33f400a54591018d54cf
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecom/CallRedirectionService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/CallRedirectionService.java b/telecomm/java/android/telecom/CallRedirectionService.java index c832f53ae073..402b70b63204 100644 --- a/telecomm/java/android/telecom/CallRedirectionService.java +++ b/telecomm/java/android/telecom/CallRedirectionService.java @@ -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(); |