Merge "Add support for network identified emergency calls."

am: 108349f8d6

Change-Id: I21ffa931cba06086ca8fd970a0172c282af03b3a
This commit is contained in:
Tyler Gunn
2018-09-24 16:14:14 -07:00
committed by android-build-merger
7 changed files with 54 additions and 2 deletions

View File

@@ -41035,6 +41035,7 @@ package android.telecom {
field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 128; // 0x80
field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
field public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 2048; // 0x800
field public static final int PROPERTY_RTT = 1024; // 0x400
field public static final int PROPERTY_SELF_MANAGED = 256; // 0x100
field public static final int PROPERTY_WIFI = 8; // 0x8

View File

@@ -5048,6 +5048,7 @@ package android.telecom {
method public deprecated android.content.ComponentName getDefaultPhoneApp();
method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage();
method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
method public boolean isInEmergencyCall();
method public boolean isRinging();
method public boolean isTtySupported();
field public static final java.lang.String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT";
@@ -5630,6 +5631,7 @@ package android.telephony.ims {
field public static final java.lang.String EXTRA_CODEC = "Codec";
field public static final java.lang.String EXTRA_DIALSTRING = "dialstring";
field public static final java.lang.String EXTRA_DISPLAY_TEXT = "DisplayText";
field public static final java.lang.String EXTRA_E_CALL = "e_call";
field public static final java.lang.String EXTRA_IS_CALL_PULL = "CallPull";
field public static final java.lang.String EXTRA_OI = "oi";
field public static final java.lang.String EXTRA_OIR = "oir";

View File

@@ -434,8 +434,15 @@ public final class Call {
*/
public static final int PROPERTY_RTT = 0x00000400;
/**
* Indicates that the call has been identified as the network as an emergency call. This
* property may be set for both incoming and outgoing calls which the network identifies as
* emergency calls.
*/
public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 0x00000800;
//******************************************************************************************
// Next PROPERTY value: 0x00000800
// Next PROPERTY value: 0x00001000
//******************************************************************************************
private final String mTelecomCallId;
@@ -601,6 +608,9 @@ public final class Call {
if(hasProperty(properties, PROPERTY_ASSISTED_DIALING_USED)) {
builder.append(" PROPERTY_ASSISTED_DIALING_USED");
}
if (hasProperty(properties, PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL)) {
builder.append(" PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL");
}
builder.append("]");
return builder.toString();
}

View File

@@ -414,6 +414,13 @@ public abstract class Connection extends Conferenceable {
*/
public static final int PROPERTY_ASSISTED_DIALING_USED = 1 << 9;
/**
* Set by the framework to indicate that the network has identified a Connection as an emergency
* call.
* @hide
*/
public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 1 << 10;
//**********************************************************************************************
// Next PROPERTY value: 1<<10
//**********************************************************************************************
@@ -803,6 +810,10 @@ public abstract class Connection extends Conferenceable {
builder.append(isLong ? " PROPERTY_IS_RTT" : " rtt");
}
if (can(properties, PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL)) {
builder.append(isLong ? " PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL" : " ecall");
}
builder.append("]");
return builder.toString();
}

View File

@@ -1884,6 +1884,27 @@ public class TelecomManager {
}
}
/**
* Determines if there is an ongoing emergency call. This can be either an outgoing emergency
* call, as identified by the dialed number, or because a call was identified by the network
* as an emergency call.
* @return {@code true} if there is an ongoing emergency call, {@code false} otherwise.
* @hide
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
public boolean isInEmergencyCall() {
try {
if (isServiceConnected()) {
return getTelecomService().isInEmergencyCall();
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException isInEmergencyCall: " + e);
return false;
}
return false;
}
private ITelecomService getTelecomService() {
if (mTelecomServiceOverride != null) {
return mTelecomServiceOverride;

View File

@@ -279,4 +279,9 @@ interface ITelecomService {
* @see TelecomServiceImpl#acceptHandover
*/
void acceptHandover(in Uri srcAddr, int videoState, in PhoneAccountHandle destAcct);
/**
* @see TelecomServiceImpl#isInEmergencyCall
*/
boolean isInEmergencyCall();
}

View File

@@ -118,7 +118,9 @@ public final class ImsCallProfile implements Parcelable {
*/
public static final String EXTRA_CONFERENCE = "conference";
/**
* @hide
* Boolean extra property set on an {@link ImsCallProfile} to indicate that this call is an
* emergency call. The {@link ImsService} sets this on a call to indicate that the network has
* identified the call as an emergency call.
*/
public static final String EXTRA_E_CALL = "e_call";
/**