Merge "Propagates voice call radio technology to connection"
am: 5405d09204
Change-Id: I244839f759f40066565111dae91bbe07692e3ebf
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user