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

Commit f4b87f8a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Add new API to notify CallRedirectionService timed out." am:...

Merge "Merge "Add new API to notify CallRedirectionService timed out." am: 5a5c3d75 am: 423dd00f am: 811de5db am: 5ca31323" into sc-v2-dev-plus-aosp am: 1464edbf

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

Change-Id: I8f1b5de99589b7f389ecaa4cbbd3f8a49d219430
parents becdaf00 1464edbf
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -39696,6 +39696,7 @@ package android.telecom {
    method public final void cancelCall();
    method public final void cancelCall();
    method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method public abstract void onPlaceCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
    method public abstract void onPlaceCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
    method public void onRedirectionTimeout();
    method public final boolean onUnbind(@NonNull android.content.Intent);
    method public final boolean onUnbind(@NonNull android.content.Intent);
    method public final void placeCallUnmodified();
    method public final void placeCallUnmodified();
    method public final void redirectCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
    method public final void redirectCall(@NonNull android.net.Uri, @NonNull android.telecom.PhoneAccountHandle, boolean);
+25 −0
Original line number Original line Diff line number Diff line
@@ -88,6 +88,13 @@ public abstract class CallRedirectionService extends Service {
                                     @NonNull PhoneAccountHandle initialPhoneAccount,
                                     @NonNull PhoneAccountHandle initialPhoneAccount,
                                     boolean allowInteractiveResponse);
                                     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
     * The implemented {@link CallRedirectionService} calls this method to response a request
     * received via {@link #onPlaceCall(Uri, PhoneAccountHandle, boolean)} to inform Telecom that
     * received via {@link #onPlaceCall(Uri, PhoneAccountHandle, boolean)} to inform Telecom that
@@ -166,6 +173,12 @@ public abstract class CallRedirectionService extends Service {
     */
     */
    private static final int MSG_PLACE_CALL = 1;
    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
     * A handler to process the attempt to place call with redirection service from Telecom
     */
     */
@@ -183,6 +196,9 @@ public abstract class CallRedirectionService extends Service {
                        args.recycle();
                        args.recycle();
                    }
                    }
                    break;
                    break;
                case MSG_TIMEOUT:
                    onRedirectionTimeout();
                    break;
            }
            }
        }
        }
    };
    };
@@ -209,6 +225,15 @@ public abstract class CallRedirectionService extends Service {
            args.arg4 = allowInteractiveResponse;
            args.arg4 = allowInteractiveResponse;
            mHandler.obtainMessage(MSG_PLACE_CALL, args).sendToTarget();
            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
    @Override
+2 −0
Original line number Original line Diff line number Diff line
@@ -31,4 +31,6 @@ import com.android.internal.telecom.ICallRedirectionAdapter;
oneway interface ICallRedirectionService {
oneway interface ICallRedirectionService {
    void placeCall(in ICallRedirectionAdapter adapter, in Uri handle,
    void placeCall(in ICallRedirectionAdapter adapter, in Uri handle,
            in PhoneAccountHandle initialPhoneAccount, boolean allowInteractiveResponse);
            in PhoneAccountHandle initialPhoneAccount, boolean allowInteractiveResponse);

    void notifyTimeout();
}
}