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

Commit 1f58f8e7 authored by Sandeep Kunta's avatar Sandeep Kunta Committed by Natiq Ahmed
Browse files

Fix compilation errors

Fix compilation errors

Conflicts:
	src/com/android/server/telecom/BluetoothPhoneService.java

Conflicts:
	src/com/android/server/telecom/CallsManager.java
	src/com/android/server/telecom/PhoneAccountRegistrar.java

Change-Id: I36cf27e37fc8d852f2327ff1bedeb17dd1908955
parent 0e8cc100
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -129,7 +129,6 @@ public class AccountSelection extends Activity {
            PhoneAccountHandle accountHandle = getItem(position);
            PhoneAccountHandle accountHandle = getItem(position);
            PhoneAccount account = mTelecomManager.getPhoneAccount(accountHandle);
            PhoneAccount account = mTelecomManager.getPhoneAccount(accountHandle);
            textView.setText(account.getLabel());
            textView.setText(account.getLabel());
            imageView.setImageDrawable(account.getIcon(mContext));
            return rowView;
            return rowView;
        }
        }


+36 −36
Original line number Original line Diff line number Diff line
@@ -120,7 +120,7 @@ public final class BluetoothPhoneService extends Service {
    private String mRingingAddress = null;
    private String mRingingAddress = null;
    private int mRingingAddressType = 0;
    private int mRingingAddressType = 0;
    private Call mOldHeldCall = null;
    private Call mOldHeldCall = null;
    private static final long INVALID_SUBID = SubscriptionManager.INVALID_SUB_ID;
    private static final int INVALID_SUBID = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
    private static final int[] LIVE_CALL_STATES =
    private static final int[] LIVE_CALL_STATES =
            {CallState.CONNECTING, CallState.DIALING, CallState.ACTIVE};
            {CallState.CONNECTING, CallState.DIALING, CallState.ACTIVE};


@@ -313,9 +313,9 @@ public final class BluetoothPhoneService extends Service {
                            PhoneAccountHandle ph = account.getAccountHandle();
                            PhoneAccountHandle ph = account.getAccountHandle();
                            if (ph != null) {
                            if (ph != null) {
                                String subId = ph.getId();
                                String subId = ph.getId();
                                Long sub = SubscriptionManager.getDefaultVoiceSubId();
                                int sub = SubscriptionManager.getDefaultVoiceSubId();
                                try {
                                try {
                                    sub = Long.parseLong(subId);
                                    sub = Integer.parseInt(subId);
                                } catch (NumberFormatException e){
                                } catch (NumberFormatException e){
                                    Log.w(this, " NumberFormatException " + e);
                                    Log.w(this, " NumberFormatException " + e);
                                }
                                }
@@ -794,18 +794,18 @@ public final class BluetoothPhoneService extends Service {
        boolean isActive = false;
        boolean isActive = false;
        boolean allowDsda = false;
        boolean allowDsda = false;
        int state = convertCallState(call.getState(), isForeground);
        int state = convertCallState(call.getState(), isForeground);
        long activeSub = mTelecomManager.getActiveSubscription();
        int activeSub = mTelecomManager.getActiveSubscription();
        if (INVALID_SUBID == activeSub) {
        if (INVALID_SUBID == activeSub) {
            Log.i(TAG, "Invalid activeSub id, returning");
            Log.i(TAG, "Invalid activeSub id, returning");
            return;
            return;
        }
        }


        Call activeSubForegroundCall = callsManager.getFirstCallWithStateUsingSubId(
        Call activeSubForegroundCall = callsManager.getFirstCallWithStateUsingSubId(
                Long.toString(activeSub), LIVE_CALL_STATES);
                Integer.toString(activeSub), LIVE_CALL_STATES);
        Call activeSubRingingCall = callsManager.getFirstCallWithStateUsingSubId(
        Call activeSubRingingCall = callsManager.getFirstCallWithStateUsingSubId(
                Long.toString(activeSub), CallState.RINGING);
                Integer.toString(activeSub), CallState.RINGING);
        Call activeSubBackgroundCall = callsManager.getFirstCallWithStateUsingSubId(
        Call activeSubBackgroundCall = callsManager.getFirstCallWithStateUsingSubId(
                Long.toString(activeSub), CallState.ON_HOLD);
                Integer.toString(activeSub), CallState.ON_HOLD);


        if (getBluetoothCallStateForUpdate() != CALL_STATE_IDLE) {
        if (getBluetoothCallStateForUpdate() != CALL_STATE_IDLE) {
            allowDsda = true;
            allowDsda = true;
@@ -833,8 +833,8 @@ public final class BluetoothPhoneService extends Service {
            Call activeChild = conferenceCall.getConferenceLevelActiveCall();
            Call activeChild = conferenceCall.getConferenceLevelActiveCall();
            if (state == CALL_STATE_ACTIVE && activeChild != null) {
            if (state == CALL_STATE_ACTIVE && activeChild != null) {
                boolean shouldReevaluateState =
                boolean shouldReevaluateState =
                        conferenceCall.can(PhoneCapabilities.MERGE_CONFERENCE) ||
                        conferenceCall.can(Connection.CAPABILITY_MERGE_CONFERENCE) ||
                        (conferenceCall.can(PhoneCapabilities.SWAP_CONFERENCE) &&
                        (conferenceCall.can(Connection.CAPABILITY_SWAP_CONFERENCE) &&
                        !conferenceCall.wasConferencePreviouslyMerged());
                        !conferenceCall.wasConferencePreviouslyMerged());


                Log.i(this, "shouldReevaluateState: " + shouldReevaluateState);
                Log.i(this, "shouldReevaluateState: " + shouldReevaluateState);
@@ -1099,14 +1099,14 @@ public final class BluetoothPhoneService extends Service {
     */
     */
    private void updateDsdaServiceWithCallState(Call call) {
    private void updateDsdaServiceWithCallState(Call call) {
        CallsManager callsManager = getCallsManager();
        CallsManager callsManager = getCallsManager();
        long subscription = INVALID_SUBID;
        int subscription = INVALID_SUBID;
        if (mBluetoothDsda != null) {
        if (mBluetoothDsda != null) {
            Log.d(TAG, "Get the Sub on which call state change happened");
            Log.d(TAG, "Get the Sub on which call state change happened");
            if (call.getTargetPhoneAccount() != null) {
            if (call.getTargetPhoneAccount() != null) {
                String sub = call.getTargetPhoneAccount().getId();
                String sub = call.getTargetPhoneAccount().getId();
                subscription = SubscriptionManager.getDefaultVoiceSubId();
                subscription = SubscriptionManager.getDefaultVoiceSubId();
                try {
                try {
                    subscription = Long.parseLong(sub);
                    subscription = Integer.parseInt(sub);
                } catch (NumberFormatException e) {
                } catch (NumberFormatException e) {
                    Log.w(this, " NumberFormatException " + e);
                    Log.w(this, " NumberFormatException " + e);
                }
                }
@@ -1116,7 +1116,7 @@ public final class BluetoothPhoneService extends Service {
                        String sub = childCall.getTargetPhoneAccount().getId();
                        String sub = childCall.getTargetPhoneAccount().getId();
                        subscription = SubscriptionManager.getDefaultVoiceSubId();
                        subscription = SubscriptionManager.getDefaultVoiceSubId();
                        try {
                        try {
                            subscription = Long.parseLong(sub);
                            subscription = Integer.parseInt(sub);
                        } catch (NumberFormatException e) {
                        } catch (NumberFormatException e) {
                            Log.w(this, " NumberFormatException " + e);
                            Log.w(this, " NumberFormatException " + e);
                        }
                        }
@@ -1138,17 +1138,17 @@ public final class BluetoothPhoneService extends Service {
            try {
            try {
                mBluetoothDsda.setCurrentSub(subscription);
                mBluetoothDsda.setCurrentSub(subscription);
                Call ringCall = callsManager.getFirstCallWithStateUsingSubId(
                Call ringCall = callsManager.getFirstCallWithStateUsingSubId(
                        Long.toString(subscription), CallState.RINGING);
                        Integer.toString(subscription), CallState.RINGING);
                int ringingCallState = callsManager.hasRingingCall() ?
                int ringingCallState = callsManager.hasRingingCall() ?
                        CallState.RINGING : CallState.NEW;
                        CallState.RINGING : CallState.NEW;


                Call foregroundCall = callsManager.getFirstCallWithStateUsingSubId(
                Call foregroundCall = callsManager.getFirstCallWithStateUsingSubId(
                        Long.toString(subscription), LIVE_CALL_STATES);
                        Integer.toString(subscription), LIVE_CALL_STATES);
                int foregroundCallState = (foregroundCall != null) ?
                int foregroundCallState = (foregroundCall != null) ?
                        foregroundCall.getState() : CallState.NEW;
                        foregroundCall.getState() : CallState.NEW;


                Call backgroundCall = callsManager.getFirstCallWithStateUsingSubId(
                Call backgroundCall = callsManager.getFirstCallWithStateUsingSubId(
                        Long.toString(subscription), CallState.ON_HOLD);
                        Integer.toString(subscription), CallState.ON_HOLD);
                int backgroundCallState = (backgroundCall != null) ?
                int backgroundCallState = (backgroundCall != null) ?
                        CallState.ON_HOLD: CallState.NEW;
                        CallState.ON_HOLD: CallState.NEW;


@@ -1177,19 +1177,19 @@ public final class BluetoothPhoneService extends Service {
        return;
        return;
    }
    }


    private int getDsdaNumHeldCalls(Call activeCall, long subscription, Call mOldHeldCall) {
    private int getDsdaNumHeldCalls(Call activeCall, int subscription, Call mOldHeldCall) {
        // For conference calls which support swapping the active call within the conference
        // For conference calls which support swapping the active call within the conference
        // (namely CDMA calls) we need to expose that as a held call in order for the BT device
        // (namely CDMA calls) we need to expose that as a held call in order for the BT device
        // to show "swap" and "merge" functionality.
        // to show "swap" and "merge" functionality.
        int numHeldCalls = 0;
        int numHeldCalls = 0;
        long activeCallSub = 0;
        int activeCallSub = 0;


        if (activeCall != null && activeCall.isConference()) {
        if (activeCall != null && activeCall.isConference()) {
            if (activeCall.getTargetPhoneAccount() != null) {
            if (activeCall.getTargetPhoneAccount() != null) {
                String sub = activeCall.getTargetPhoneAccount().getId();
                String sub = activeCall.getTargetPhoneAccount().getId();
                activeCallSub = SubscriptionManager.getDefaultVoiceSubId();
                activeCallSub = SubscriptionManager.getDefaultVoiceSubId();
                try {
                try {
                    activeCallSub = Long.parseLong(sub);
                    activeCallSub = Integer.parseInt(sub);
                } catch (NumberFormatException e) {
                } catch (NumberFormatException e) {
                    Log.w(this, " NumberFormatException " + e);
                    Log.w(this, " NumberFormatException " + e);
                }
                }
@@ -1199,7 +1199,7 @@ public final class BluetoothPhoneService extends Service {
                        String sub = childCall.getTargetPhoneAccount().getId();
                        String sub = childCall.getTargetPhoneAccount().getId();
                        activeCallSub = SubscriptionManager.getDefaultVoiceSubId();
                        activeCallSub = SubscriptionManager.getDefaultVoiceSubId();
                        try {
                        try {
                            activeCallSub = Long.parseLong(sub);
                            activeCallSub = Integer.parseInt(sub);
                        } catch (NumberFormatException e) {
                        } catch (NumberFormatException e) {
                            Log.w(this, " NumberFormatException " + e);
                            Log.w(this, " NumberFormatException " + e);
                        }
                        }
@@ -1211,18 +1211,18 @@ public final class BluetoothPhoneService extends Service {
                }
                }
            }
            }
            if (activeCallSub == subscription) {
            if (activeCallSub == subscription) {
                if (activeCall.can(PhoneCapabilities.SWAP_CONFERENCE)) {
                if (activeCall.can(Connection.CAPABILITY_SWAP_CONFERENCE)) {
                    // Indicate that BT device should show SWAP command by indicating that there
                    // Indicate that BT device should show SWAP command by indicating that there
                    // is a call on hold, but only if the conference wasn't previously merged.
                    // is a call on hold, but only if the conference wasn't previously merged.
                    numHeldCalls = activeCall.wasConferencePreviouslyMerged() ? 0 : 1;
                    numHeldCalls = activeCall.wasConferencePreviouslyMerged() ? 0 : 1;
                } else if (activeCall.can(PhoneCapabilities.MERGE_CONFERENCE)) {
                } else if (activeCall.can(Connection.CAPABILITY_MERGE_CONFERENCE)) {
                    numHeldCalls = 1;  // Merge is available, so expose via numHeldCalls.
                    numHeldCalls = 1;  // Merge is available, so expose via numHeldCalls.
                }
                }
                Log.i(TAG, "getDsdaNumHeldCalls: numHeldCalls:  " + numHeldCalls);
                Log.i(TAG, "getDsdaNumHeldCalls: numHeldCalls:  " + numHeldCalls);
                return numHeldCalls;
                return numHeldCalls;
            }
            }
        }
        }
        numHeldCalls = getNumCallsWithState(Long.toString(subscription), CallState.ON_HOLD);
        numHeldCalls = getNumCallsWithState(Integer.toString(subscription), CallState.ON_HOLD);
        Log.i(TAG, "getDsdaNumHeldCalls: numHeldCalls = " + numHeldCalls);
        Log.i(TAG, "getDsdaNumHeldCalls: numHeldCalls = " + numHeldCalls);
        return numHeldCalls;
        return numHeldCalls;
    }
    }
@@ -1350,7 +1350,7 @@ public final class BluetoothPhoneService extends Service {
        boolean status = true;
        boolean status = true;
        CallsManager callsManager = CallsManager.getInstance();
        CallsManager callsManager = CallsManager.getInstance();
        Log.i(TAG, "processDsdaChld: " + chld );
        Log.i(TAG, "processDsdaChld: " + chld );
        long activeSub = mTelecomManager.getActiveSubscription();
        int activeSub = mTelecomManager.getActiveSubscription();
        Log.i(TAG, "activeSub: " + activeSub);
        Log.i(TAG, "activeSub: " + activeSub);
        if (INVALID_SUBID == activeSub) {
        if (INVALID_SUBID == activeSub) {
            Log.i(TAG, "Invalid activeSub id, returning");
            Log.i(TAG, "Invalid activeSub id, returning");
@@ -1359,9 +1359,9 @@ public final class BluetoothPhoneService extends Service {


        Call activeCall = callsManager.getActiveCall();
        Call activeCall = callsManager.getActiveCall();
        Call ringingCall = callsManager.getFirstCallWithStateUsingSubId(
        Call ringingCall = callsManager.getFirstCallWithStateUsingSubId(
                Long.toString(activeSub), CallState.RINGING);
                Integer.toString(activeSub), CallState.RINGING);
        Call backgroundCall = callsManager.getFirstCallWithStateUsingSubId(
        Call backgroundCall = callsManager.getFirstCallWithStateUsingSubId(
                Long.toString(activeSub), CallState.ON_HOLD);
                Integer.toString(activeSub), CallState.ON_HOLD);


        switch (chld) {
        switch (chld) {
            case CHLD_TYPE_RELEASEHELD:
            case CHLD_TYPE_RELEASEHELD:
@@ -1412,7 +1412,7 @@ public final class BluetoothPhoneService extends Service {
            case CHLD_TYPE_HOLDACTIVE_ACCEPTHELD:
            case CHLD_TYPE_HOLDACTIVE_ACCEPTHELD:
                if (mBluetoothDsda.canDoCallSwap()) {
                if (mBluetoothDsda.canDoCallSwap()) {
                    Log.i(TAG, "Try to do call swap on same sub");
                    Log.i(TAG, "Try to do call swap on same sub");
                    if (activeCall != null && activeCall.can(PhoneCapabilities.SWAP_CONFERENCE)) {
                    if (activeCall != null && activeCall.can(Connection.CAPABILITY_SWAP_CONFERENCE)) {
                        activeCall.swapConference();
                        activeCall.swapConference();
                    } else if (backgroundCall != null) {
                    } else if (backgroundCall != null) {
                        callsManager.unholdCall(backgroundCall);
                        callsManager.unholdCall(backgroundCall);
@@ -1436,7 +1436,7 @@ public final class BluetoothPhoneService extends Service {
                        callsManager.answerCall(ringingCall, 0);
                        callsManager.answerCall(ringingCall, 0);
                    } else if (backgroundCall != null) {
                    } else if (backgroundCall != null) {
                        callsManager.unholdCall(backgroundCall);
                        callsManager.unholdCall(backgroundCall);
                    } else if (activeCall != null && activeCall.can(PhoneCapabilities.HOLD)) {
                    } else if (activeCall != null && activeCall.can(Connection.CAPABILITY_HOLD)) {
                        Log.i(TAG, "Only active call, put that to hold");
                        Log.i(TAG, "Only active call, put that to hold");
                        callsManager.holdCall(activeCall);
                        callsManager.holdCall(activeCall);
                    }
                    }
@@ -1446,7 +1446,7 @@ public final class BluetoothPhoneService extends Service {


            case CHLD_TYPE_ADDHELDTOCONF:
            case CHLD_TYPE_ADDHELDTOCONF:
                if (activeCall != null) {
                if (activeCall != null) {
                    if (activeCall.can(PhoneCapabilities.MERGE_CONFERENCE)) {
                    if (activeCall.can(Connection.CAPABILITY_MERGE_CONFERENCE)) {
                        activeCall.mergeConference();
                        activeCall.mergeConference();
                    } else {
                    } else {
                        List<Call> conferenceable = activeCall.getConferenceableCalls();
                        List<Call> conferenceable = activeCall.getConferenceableCalls();
@@ -1470,12 +1470,12 @@ public final class BluetoothPhoneService extends Service {
    private Call getCallOnOtherSub(boolean isActive) throws  RemoteException {
    private Call getCallOnOtherSub(boolean isActive) throws  RemoteException {
        CallsManager callsManager = getCallsManager();
        CallsManager callsManager = getCallsManager();
        Log.d(TAG, "getCallOnOtherSub, isActiveSub call required: " + isActive);
        Log.d(TAG, "getCallOnOtherSub, isActiveSub call required: " + isActive);
        long activeSub = mTelecomManager.getActiveSubscription();
        int activeSub = mTelecomManager.getActiveSubscription();
        if (INVALID_SUBID == activeSub) {
        if (INVALID_SUBID == activeSub) {
            Log.i(TAG, "Invalid activeSub id, returning");
            Log.i(TAG, "Invalid activeSub id, returning");
            return null;
            return null;
        }
        }
        long bgSub = getOtherActiveSub(activeSub);
        int bgSub = getOtherActiveSub(activeSub);
        /*bgSub would be INVALID_SUBID when bg subscription has no calls*/
        /*bgSub would be INVALID_SUBID when bg subscription has no calls*/
        if (bgSub == INVALID_SUBID) {
        if (bgSub == INVALID_SUBID) {
            return null;
            return null;
@@ -1484,24 +1484,24 @@ public final class BluetoothPhoneService extends Service {
        Call call = null;
        Call call = null;
        if (isActive) {
        if (isActive) {
            if (mBluetoothDsda.getTotalCallsOnSub(bgSub) < 2 ) {
            if (mBluetoothDsda.getTotalCallsOnSub(bgSub) < 2 ) {
                if (callsManager.hasActiveOrHoldingCall(Long.toString(activeSub)))
                if (callsManager.hasActiveOrHoldingCall(Integer.toString(activeSub)))
                    call = callsManager.getFirstCallWithStateUsingSubId(
                    call = callsManager.getFirstCallWithStateUsingSubId(
                            Long.toString(activeSub), CallState.ACTIVE, CallState.ON_HOLD);
                            Integer.toString(activeSub), CallState.ACTIVE, CallState.ON_HOLD);
            }
            }
        } else {
        } else {
            if (mBluetoothDsda.getTotalCallsOnSub(bgSub) == 1) {
            if (mBluetoothDsda.getTotalCallsOnSub(bgSub) == 1) {
                if (callsManager.hasActiveOrHoldingCall(Long.toString(bgSub)))
                if (callsManager.hasActiveOrHoldingCall(Integer.toString(bgSub)))
                    call = callsManager.getFirstCallWithStateUsingSubId(
                    call = callsManager.getFirstCallWithStateUsingSubId(
                            Long.toString(bgSub), CallState.ACTIVE, CallState.ON_HOLD);
                            Integer.toString(bgSub), CallState.ACTIVE, CallState.ON_HOLD);
            }
            }
        }
        }
        return call;
        return call;
    }
    }


    private long getOtherActiveSub(long activeSub) {
    private int getOtherActiveSub(int activeSub) {
        boolean subSwitched = false;
        boolean subSwitched = false;
        for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
        for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
            long[] subId = SubscriptionManager.getSubId(i);
            int[] subId = SubscriptionManager.getSubId(i);
            if (subId[0] != activeSub) {
            if (subId[0] != activeSub) {
                Log.i(TAG, "other Sub: " + subId[0]);
                Log.i(TAG, "other Sub: " + subId[0]);
                return subId[0];
                return subId[0];
+0 −1
Original line number Original line Diff line number Diff line
@@ -406,7 +406,6 @@ final class Call implements CreateConnectionResponse {
                getChildCalls().size(),
                getChildCalls().size(),
                getParentCall() != null,
                getParentCall() != null,
                Connection.capabilitiesToString(getConnectionCapabilities()),
                Connection.capabilitiesToString(getConnectionCapabilities()),
                PhoneCapabilities.toString(getCallCapabilities()),
                mIsActiveSub,
                mIsActiveSub,
                mTargetPhoneAccountHandle,
                mTargetPhoneAccountHandle,
                getCallSubstate());
                getCallSubstate());
+3 −2
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.AsyncTask;
import android.provider.CallLog.Calls;
import android.provider.CallLog.Calls;
import android.telecom.CallState;
import android.telecom.CallState;
import android.telecom.Connection;
import android.telecom.DisconnectCause;
import android.telecom.DisconnectCause;
import android.telecom.PhoneAccountHandle;
import android.telecom.PhoneAccountHandle;
import android.telecom.VideoProfile;
import android.telecom.VideoProfile;
@@ -145,8 +146,8 @@ final class CallLogManager extends CallsManagerListenerBase {
        final int presentation = getPresentation(call);
        final int presentation = getPresentation(call);
        final PhoneAccountHandle accountHandle = call.getTargetPhoneAccount();
        final PhoneAccountHandle accountHandle = call.getTargetPhoneAccount();


        int volteCapabilities = call.getCallCapabilities() & PhoneCapabilities.VoLTE;
        int volteCapabilities = call.getConnectionCapabilities() & Connection.CAPABILITY_VoLTE;
        Log.d(TAG, "callCapabilities: " + call.getCallCapabilities()
        Log.d(TAG, "callCapabilities: " + call.getConnectionCapabilities()
                + "volteCapability: " + volteCapabilities);
                + "volteCapability: " + volteCapabilities);
        if (volteCapabilities != 0){
        if (volteCapabilities != 0){
            switch (callLogType) {
            switch (callLogType) {
+3 −3
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.telecom;
package com.android.server.telecom;


import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.net.Uri;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
@@ -38,7 +39,6 @@ import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;


import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Connection;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.util.BlacklistUtils;
import com.android.internal.telephony.util.BlacklistUtils;
@@ -659,7 +659,7 @@ public final class CallsManager extends Call.ListenerBase {
            if (activeCall != null && activeCall != call &&
            if (activeCall != null && activeCall != call &&
                    (activeCall.isActive() ||
                    (activeCall.isActive() ||
                    activeCall.getState() == CallState.DIALING)) {
                    activeCall.getState() == CallState.DIALING)) {
                if (0 == (activeCall.getConnectionCapabilities() & Connection.HOLD)) {
                if (0 == (activeCall.getConnectionCapabilities() & Connection.CAPABILITY_HOLD)) {
                    // This call does not support hold.  If it is from a different connection
                    // This call does not support hold.  If it is from a different connection
                    // service, then disconnect it, otherwise allow the connection service to
                    // service, then disconnect it, otherwise allow the connection service to
                    // figure out the right states.
                    // figure out the right states.
@@ -1694,7 +1694,7 @@ public final class CallsManager extends Call.ListenerBase {
                return true;
                return true;
            }
            }
            // Try to hold the live call before attempting the new outgoing call.
            // Try to hold the live call before attempting the new outgoing call.
            if (liveCall.can(PhoneCapabilities.HOLD)) {
            if (liveCall.can(Connection.CAPABILITY_HOLD)) {
                liveCall.hold();
                liveCall.hold();
                return true;
                return true;
            }
            }
Loading