diff options
| author | 2021-08-10 19:32:28 +0000 | |
|---|---|---|
| committer | 2021-08-10 19:32:28 +0000 | |
| commit | 1464edbf773726f3afaf9a6e95ca1ed2ac718696 (patch) | |
| tree | aeca6d145a28d1f580f43a228171bd4ccf4e400d /telecomm/java | |
| parent | 5532495913152a2ad25958da1931a5c573a37192 (diff) | |
| parent | b54789d14a20dc53f2a258b0838425df8209c064 (diff) | |
Merge "Merge "Add new API to notify CallRedirectionService timed out." am: 5a5c3d7562 am: 423dd00f7f am: 811de5db8c am: 5ca3132389" into sc-v2-dev-plus-aosp
Diffstat (limited to 'telecomm/java')
| -rw-r--r-- | telecomm/java/android/telecom/CallRedirectionService.java | 25 | ||||
| -rw-r--r-- | telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/CallRedirectionService.java b/telecomm/java/android/telecom/CallRedirectionService.java index 402b70b63204..93989b6744dc 100644 --- a/telecomm/java/android/telecom/CallRedirectionService.java +++ b/telecomm/java/android/telecom/CallRedirectionService.java @@ -89,6 +89,13 @@ public abstract class CallRedirectionService extends Service { boolean allowInteractiveResponse); /** + * Telecom calls this method when times out waiting for the {@link CallRedirectionService} to + * call {@link #placeCallUnmodified()}, {@link #redirectCall(Uri, PhoneAccountHandle, boolean)}, + * or {@link #cancelCall()} + */ + public void onRedirectionTimeout() {} + + /** * The implemented {@link CallRedirectionService} calls this method to response a request * received via {@link #onPlaceCall(Uri, PhoneAccountHandle, boolean)} to inform Telecom that * no changes are required to the outgoing call, and that the call should be placed as-is. @@ -167,6 +174,12 @@ public abstract class CallRedirectionService extends Service { private static final int MSG_PLACE_CALL = 1; /** + * A handler message to process the attempt to notify the operation of redirection service timed + * out from Telecom + */ + private static final int MSG_TIMEOUT = 2; + + /** * A handler to process the attempt to place call with redirection service from Telecom */ private final Handler mHandler = new Handler(Looper.getMainLooper()) { @@ -183,6 +196,9 @@ public abstract class CallRedirectionService extends Service { args.recycle(); } break; + case MSG_TIMEOUT: + onRedirectionTimeout(); + break; } } }; @@ -209,6 +225,15 @@ public abstract class CallRedirectionService extends Service { args.arg4 = allowInteractiveResponse; mHandler.obtainMessage(MSG_PLACE_CALL, args).sendToTarget(); } + + /** + * Telecom calls this method to inform the CallRedirectionService of the timeout waiting for + * it to complete its operation. + */ + @Override + public void notifyTimeout() { + mHandler.obtainMessage(MSG_TIMEOUT).sendToTarget(); + } } @Override diff --git a/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl b/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl index c1bc44007b0b..ce1938b81727 100644 --- a/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl +++ b/telecomm/java/com/android/internal/telecom/ICallRedirectionService.aidl @@ -31,4 +31,6 @@ import com.android.internal.telecom.ICallRedirectionAdapter; oneway interface ICallRedirectionService { void placeCall(in ICallRedirectionAdapter adapter, in Uri handle, in PhoneAccountHandle initialPhoneAccount, boolean allowInteractiveResponse); + + void notifyTimeout(); } |