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

Commit 6505e93b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix to display merge icon on failure."

parents bde12e9e 1b2b754a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1169,6 +1169,11 @@ public final class Call {
        }
    }

    /** {@hide} */
    final void onMergeFailed() {
        fireStateChanged(mState);
    }

    private void fireStateChanged(final int newState) {
        for (CallbackRecord<Callback> record : mCallbackRecords) {
            final Call call = this;
+9 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public abstract class InCallService extends Service {
    private static final int MSG_ON_CALL_AUDIO_STATE_CHANGED = 5;
    private static final int MSG_BRING_TO_FOREGROUND = 6;
    private static final int MSG_ON_CAN_ADD_CALL_CHANGED = 7;
    private static final int MSG_ON_MERGE_FAILED = 8;

    /** Default Handler used to consolidate binder method calls onto a single thread. */
    private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -91,6 +92,9 @@ public abstract class InCallService extends Service {
                case MSG_ADD_CALL:
                    mPhone.internalAddCall((ParcelableCall) msg.obj);
                    break;
                case MSG_ON_MERGE_FAILED:
                    mPhone.onMergeFailed((ParcelableCall) msg.obj);
                    break;
                case MSG_UPDATE_CALL:
                    mPhone.internalUpdateCall((ParcelableCall) msg.obj);
                    break;
@@ -155,6 +159,11 @@ public abstract class InCallService extends Service {
            mHandler.obtainMessage(MSG_ON_CALL_AUDIO_STATE_CHANGED, callAudioState).sendToTarget();
        }

        @Override
        public void onMergeFailed(ParcelableCall call) {
            mHandler.obtainMessage(MSG_ON_MERGE_FAILED, call).sendToTarget();
        }

        @Override
        public void bringToForeground(boolean showDialpad) {
            mHandler.obtainMessage(MSG_BRING_TO_FOREGROUND, showDialpad ? 1 : 0, 0).sendToTarget();
+6 −0
Original line number Diff line number Diff line
@@ -179,6 +179,12 @@ public final class Phone {
        }
    }

    final void onMergeFailed(ParcelableCall parcelableCall) {
         Call call = mCallByTelecomCallId.get(parcelableCall.getId());
         if (call != null) {
             call.onMergeFailed();
         }
    }
    /**
     * Called to destroy the phone and cleanup any lingering calls.
     */
+2 −0
Original line number Diff line number Diff line
@@ -45,4 +45,6 @@ oneway interface IInCallService {
    void bringToForeground(boolean showDialpad);

    void onCanAddCallChanged(boolean canAddCall);

    void onMergeFailed(in ParcelableCall call);
}