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

Commit 9b4265b6 authored by Santos Cordon's avatar Santos Cordon
Browse files

Add extras to Connections/Calls. (3/3)

Two major changes:
1) Add the notion of extras to a Connection.  These extras will be
parceled through to InCallService as Call.getExtras()
2) The previously existing Call.getExtras() has been renamed to
getIntentExtras(). This name better describes the fact that these
particular extras are from the original CALL or INCOMING_CALL intents.

Change-Id: I85358827905abe3fd93b6b901dd78c86bb7d653c
parent 9b8d23fb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -385,6 +385,10 @@ public class Call {
                : getTelecommCall().getDetails().getCallerDisplayName();
    }

    public Bundle getIntentExtras() {
        return mTelecommCall == null ? null : mTelecommCall.getDetails().getIntentExtras();
    }

    public Bundle getExtras() {
        return mTelecommCall == null ? null : mTelecommCall.getDetails().getExtras();
    }
+2 −2
Original line number Diff line number Diff line
@@ -577,7 +577,7 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {

                Bundle extras = null;
                if (call != null) {
                    extras = call.getTelecommCall().getDetails().getExtras();
                    extras = call.getTelecommCall().getDetails().getIntentExtras();
                }
                if (extras == null) {
                    // Initialize the extras bundle to avoid NPE
@@ -613,7 +613,7 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {
            if (pendingAccountSelectionCall != null) {
                showCallCardFragment(false);
                Bundle extras = pendingAccountSelectionCall
                        .getTelecommCall().getDetails().getExtras();
                        .getTelecommCall().getDetails().getIntentExtras();

                final List<PhoneAccountHandle> phoneAccountHandles;
                if (extras != null) {
+2 −2
Original line number Diff line number Diff line
@@ -1127,7 +1127,7 @@ public class InCallPresenter implements CallList.Listener,
     */
    public static boolean isCallWithNoValidAccounts(Call call) {
        if (call != null && !isEmergencyCall(call)) {
            Bundle extras = call.getExtras();
            Bundle extras = call.getIntentExtras();

            if (extras == null) {
                extras = EMPTY_EXTRAS;
@@ -1161,7 +1161,7 @@ public class InCallPresenter implements CallList.Listener,
    private void setDisconnectCauseForMissingAccounts(Call call) {
        android.telecom.Call telecomCall = call.getTelecommCall();

        Bundle extras = telecomCall.getDetails().getExtras();
        Bundle extras = telecomCall.getDetails().getIntentExtras();
        // Initialize the extras bundle to avoid NPE
        if (extras == null) {
            extras = new Bundle();