Merge "Propagates voice call radio technology to connection" am: 5405d09204
am: 8a456bad23
Change-Id: I1f00192c5019b30b68c25d31cf40f3edec53416c
This commit is contained in:
@@ -41580,6 +41580,7 @@ package android.telecom {
|
||||
field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecom.extra.CALL_BACK_NUMBER";
|
||||
field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
|
||||
field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
|
||||
field public static final java.lang.String EXTRA_CALL_NETWORK_TYPE = "android.telecom.extra.CALL_NETWORK_TYPE";
|
||||
field public static final java.lang.String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";
|
||||
field public static final java.lang.String EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME = "android.telecom.extra.CHANGE_DEFAULT_DIALER_PACKAGE_NAME";
|
||||
field public static final java.lang.String EXTRA_INCOMING_CALL_ADDRESS = "android.telecom.extra.INCOMING_CALL_ADDRESS";
|
||||
|
||||
@@ -22,6 +22,8 @@ import android.annotation.SystemApi;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import android.telecom.Connection.VideoProvider;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.ArraySet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -572,6 +574,20 @@ public abstract class Conference extends Conferenceable {
|
||||
return mUnmodifiableChildConnections.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates RIL voice radio technology used for current conference after its creation.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void updateCallRadioTechAfterCreation() {
|
||||
final Connection primaryConnection = getPrimaryConnection();
|
||||
if (primaryConnection != null) {
|
||||
setCallRadioTech(primaryConnection.getCallRadioTech());
|
||||
} else {
|
||||
Log.w(this, "No primary connection found while updateCallRadioTechAfterCreation");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* @deprecated Use {@link #setConnectionTime}.
|
||||
@@ -651,6 +667,37 @@ public abstract class Conference extends Conferenceable {
|
||||
return mConnectionStartElapsedRealTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets RIL voice radio technology used for current conference.
|
||||
*
|
||||
* @param vrat the RIL voice radio technology used for current conference,
|
||||
* see {@code RIL_RADIO_TECHNOLOGY_*} in {@link android.telephony.ServiceState}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final void setCallRadioTech(@ServiceState.RilRadioTechnology int vrat) {
|
||||
putExtra(TelecomManager.EXTRA_CALL_NETWORK_TYPE,
|
||||
ServiceState.rilRadioTechnologyToNetworkType(vrat));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns RIL voice radio technology used for current conference.
|
||||
*
|
||||
* @return the RIL voice radio technology used for current conference,
|
||||
* see {@code RIL_RADIO_TECHNOLOGY_*} in {@link android.telephony.ServiceState}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final @ServiceState.RilRadioTechnology int getCallRadioTech() {
|
||||
int voiceNetworkType = TelephonyManager.NETWORK_TYPE_UNKNOWN;
|
||||
Bundle extras = getExtras();
|
||||
if (extras != null) {
|
||||
voiceNetworkType = extras.getInt(TelecomManager.EXTRA_CALL_NETWORK_TYPE,
|
||||
TelephonyManager.NETWORK_TYPE_UNKNOWN);
|
||||
}
|
||||
return ServiceState.networkTypeToRilRadioTechnology(voiceNetworkType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inform this Conference that the state of its audio output has been changed externally.
|
||||
*
|
||||
|
||||
@@ -38,6 +38,8 @@ import android.os.Message;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.ArraySet;
|
||||
import android.view.Surface;
|
||||
|
||||
@@ -1884,6 +1886,24 @@ public abstract class Connection extends Conferenceable {
|
||||
return mConnectElapsedTimeMillis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns RIL voice radio technology used for current connection.
|
||||
*
|
||||
* @return the RIL voice radio technology used for current connection,
|
||||
* see {@code RIL_RADIO_TECHNOLOGY_*} in {@link android.telephony.ServiceState}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final @ServiceState.RilRadioTechnology int getCallRadioTech() {
|
||||
int voiceNetworkType = TelephonyManager.NETWORK_TYPE_UNKNOWN;
|
||||
Bundle extras = getExtras();
|
||||
if (extras != null) {
|
||||
voiceNetworkType = extras.getInt(TelecomManager.EXTRA_CALL_NETWORK_TYPE,
|
||||
TelephonyManager.NETWORK_TYPE_UNKNOWN);
|
||||
}
|
||||
return ServiceState.networkTypeToRilRadioTechnology(voiceNetworkType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The status hints for this connection.
|
||||
*/
|
||||
@@ -2317,6 +2337,26 @@ public abstract class Connection extends Conferenceable {
|
||||
mConnectElapsedTimeMillis = connectElapsedTimeMillis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets RIL voice radio technology used for current connection.
|
||||
*
|
||||
* @param vrat the RIL Voice Radio Technology used for current connection,
|
||||
* see {@code RIL_RADIO_TECHNOLOGY_*} in {@link android.telephony.ServiceState}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final void setCallRadioTech(@ServiceState.RilRadioTechnology int vrat) {
|
||||
putExtra(TelecomManager.EXTRA_CALL_NETWORK_TYPE,
|
||||
ServiceState.rilRadioTechnologyToNetworkType(vrat));
|
||||
// Propagates the call radio technology to its parent {@link android.telecom.Conference}
|
||||
// This action only covers non-IMS CS conference calls.
|
||||
// For IMS PS call conference call, it can be updated via its host connection
|
||||
// {@link #Listener.onExtrasChanged} event.
|
||||
if (getConference() != null) {
|
||||
getConference().setCallRadioTech(vrat);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the label and icon status to display in the in-call UI.
|
||||
*
|
||||
|
||||
@@ -316,6 +316,15 @@ public class TelecomManager {
|
||||
public static final String EXTRA_CALL_TECHNOLOGY_TYPE =
|
||||
"android.telecom.extra.CALL_TECHNOLOGY_TYPE";
|
||||
|
||||
/**
|
||||
* Optional extra for communicating the call network technology used by a
|
||||
* {@link android.telecom.Connection} to Telecom and InCallUI.
|
||||
*
|
||||
* @see {@code NETWORK_TYPE_*} in {@link android.telephony.TelephonyManager}.
|
||||
*/
|
||||
public static final String EXTRA_CALL_NETWORK_TYPE =
|
||||
"android.telecom.extra.CALL_NETWORK_TYPE";
|
||||
|
||||
/**
|
||||
* An optional {@link android.content.Intent#ACTION_CALL} intent extra denoting the
|
||||
* package name of the app specifying an alternative gateway for the call.
|
||||
|
||||
@@ -245,7 +245,8 @@ public final class ImsCallProfile implements Parcelable {
|
||||
* constants, the values passed for the {@link #EXTRA_CALL_RAT_TYPE} should be strings (e.g.
|
||||
* "14" vs (int) 14).
|
||||
* Note: This is used by {@link com.android.internal.telephony.imsphone.ImsPhoneConnection#
|
||||
* updateWifiStateFromExtras(Bundle)} to determine whether to set the
|
||||
* updateImsCallRatFromExtras(Bundle)} to determine whether to set the
|
||||
* {@link android.telecom.TelecomManager#EXTRA_CALL_NETWORK_TYPE} extra value and
|
||||
* {@link android.telecom.Connection#PROPERTY_WIFI} property on a connection.
|
||||
*/
|
||||
public static final String EXTRA_CALL_RAT_TYPE = "CallRadioTech";
|
||||
|
||||
Reference in New Issue
Block a user