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

Commit 96707b04 authored by Grace Jia's avatar Grace Jia
Browse files

Add new API to notify CallRedirectionService timed out.

Currently, CallRedirectionService is unable to know if a call failed due
to timeout. Add new API to notify them and call it when Telecom wait too
long to complete a call redirection request.

Bug: 187346611
Test: CTS test
Change-Id: I65aa0a893b3e35a412851ec969f6cdec74af8fab
parent 06ad6c21
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -124,6 +124,17 @@ public class CallRedirectionProcessor implements CallRedirectionCallback {
            }
        }

        public void notifyTimeout() {
            if (mService != null) {
                try {
                    mService.notifyTimeout();
                } catch (RemoteException e) {
                    Log.e(this, e, "Failed to notify call redirection timed out to "
                            + mServiceType + " call redirection service");
                }
            }
        }

        private class CallRedirectionServiceConnection implements ServiceConnection {
            @Override
            public void onServiceConnected(ComponentName componentName, IBinder service) {
@@ -394,6 +405,7 @@ public class CallRedirectionProcessor implements CallRedirectionCallback {
                    Log.addEvent(mCall, serviceType.equals(SERVICE_TYPE_USER_DEFINED)
                            ? LogUtils.Events.REDIRECTION_TIMED_OUT_USER
                            : LogUtils.Events.REDIRECTION_TIMED_OUT_CARRIER);
                    mAttempt.notifyTimeout();
                    if (serviceType.equals(SERVICE_TYPE_USER_DEFINED)) {
                        mUiAction = UI_TYPE_USER_DEFINED_TIMEOUT;
                        mShouldCancelCall = true;