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

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

Merge "IMS Call Extras Feature"

parents a7ec07aa 5d150432
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony;
import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.telephony.Rlog;

/**
@@ -120,6 +121,15 @@ public abstract class Call {
        return mState;
    }

    /**
    * getExtras
    * @return Call Extras. Subclasses of Call that support call extras need
    *         to override this method to return the extras.
    */
    public Bundle getExtras() {
        return null;
    }

    /**
     * isIdle
     *
+18 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.telephony;

import android.os.Bundle;
import android.os.SystemClock;
import android.telephony.Rlog;
import android.util.Log;
@@ -257,6 +258,23 @@ public abstract class Connection {
        }
    }

    /**
     * Get the extras for the connection's call.
     *
     * Returns getCall().getExtras()
     */
    public Bundle getExtras() {
        Call c;

        c = getCall();

        if (c == null) {
            return null;
        } else {
            return c.getExtras();
        }
    }

    /**
     * isAlive()
     *
+21 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.telephony.imsphone;

import android.os.Bundle;
import android.telephony.Rlog;
import android.telephony.DisconnectCause;

@@ -24,6 +25,7 @@ import com.android.internal.telephony.CallStateException;
import com.android.internal.telephony.Connection;
import com.android.internal.telephony.Phone;
import com.android.ims.ImsCall;
import com.android.ims.ImsCallProfile;
import com.android.ims.ImsException;
import com.android.ims.ImsStreamMediaProfile;

@@ -36,6 +38,7 @@ public class ImsPhoneCall extends Call {
    /*************************** Instance Variables **************************/

    private static final String LOG_TAG = "ImsPhoneCall";
    private static final boolean DBG = false;

    /*package*/ ImsPhoneCallTracker mOwner;

@@ -100,6 +103,24 @@ public class ImsPhoneCall extends Call {
        return mState.toString();
    }

    @Override
    public Bundle getExtras() {
        Bundle imsCallExtras = null;
        ImsCall call = getImsCall();
        ImsCallProfile callProfile;

        if (call != null) {
            callProfile = call.getCallProfile();
            if (callProfile != null) {
                imsCallExtras = callProfile.mCallExtras;
            }
        }
        if (imsCallExtras == null) {
            if (DBG) Rlog.d(LOG_TAG, "ImsCall extras are null.");
        }
        return imsCallExtras;
    }

    //***** Called from ImsPhoneConnection

    /*package*/ void