am 58299755: Merge "Plumb through StatusHints change notifications" into lmp-dev

* commit '58299755075aa3c32c413b54824f3a46321da49f':
  Plumb through StatusHints change notifications
This commit is contained in:
Evan Charlton
2014-07-17 20:20:09 +00:00
committed by Android Git Automerger
4 changed files with 30 additions and 5 deletions

View File

@@ -28068,6 +28068,7 @@ package android.telecomm {
method public android.telecomm.GatewayInfo getGatewayInfo();
method public android.net.Uri getHandle();
method public int getHandlePresentation();
method public android.telecomm.StatusHints getStatusHints();
method public int getVideoState();
}
@@ -28463,6 +28464,7 @@ package android.telecomm {
field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
field public static final java.lang.String EXTRA_EMERGENCY_CALL_BACK_NUMBER = "android.telecomm.extra.EMERGENCY_CALL_BACK_NUMBER";
field public static final java.lang.String EXTRA_INCOMING_CALL_EXTRAS = "android.intent.extra.INCOMING_CALL_EXTRAS";
field public static final java.lang.String EXTRA_PHONE_ACCOUNT = "android.intent.extra.PHONE_ACCOUNT";
field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";

View File

@@ -79,6 +79,7 @@ public final class Call {
private final long mConnectTimeMillis;
private final GatewayInfo mGatewayInfo;
private final int mVideoState;
private final StatusHints mStatusHints;
/**
* @return The handle (e.g., phone number) to which the {@code Call} is currently
@@ -165,6 +166,13 @@ public final class Call {
return mVideoState;
}
/*
* @return The current {@link android.telecomm.StatusHints}, or null if none has been set.
*/
public StatusHints getStatusHints() {
return mStatusHints;
}
@Override
public boolean equals(Object o) {
if (o instanceof Details) {
@@ -181,7 +189,8 @@ public final class Call {
Objects.equals(mDisconnectCauseMsg, d.mDisconnectCauseMsg) &&
Objects.equals(mConnectTimeMillis, d.mConnectTimeMillis) &&
Objects.equals(mGatewayInfo, d.mGatewayInfo) &&
Objects.equals(mVideoState, d.mVideoState);
Objects.equals(mVideoState, d.mVideoState) &&
Objects.equals(mStatusHints, d.mStatusHints);
}
return false;
}
@@ -199,7 +208,8 @@ public final class Call {
Objects.hashCode(mDisconnectCauseMsg) +
Objects.hashCode(mConnectTimeMillis) +
Objects.hashCode(mGatewayInfo) +
Objects.hashCode(mVideoState);
Objects.hashCode(mVideoState) +
Objects.hashCode(mStatusHints);
}
/** {@hide} */
@@ -214,7 +224,8 @@ public final class Call {
String disconnectCauseMsg,
long connectTimeMillis,
GatewayInfo gatewayInfo,
int videoState) {
int videoState,
StatusHints statusHints) {
mHandle = handle;
mHandlePresentation = handlePresentation;
mCallerDisplayName = callerDisplayName;
@@ -226,6 +237,7 @@ public final class Call {
mConnectTimeMillis = connectTimeMillis;
mGatewayInfo = gatewayInfo;
mVideoState = videoState;
mStatusHints = statusHints;
}
}
@@ -572,7 +584,8 @@ public final class Call {
inCallCall.getDisconnectCauseMsg(),
inCallCall.getConnectTimeMillis(),
inCallCall.getGatewayInfo(),
inCallCall.getVideoState());
inCallCall.getVideoState(),
inCallCall.getStatusHints());
boolean detailsChanged = !Objects.equals(mDetails, details);
if (detailsChanged) {
mDetails = details;

View File

@@ -56,7 +56,7 @@ public abstract class InCallService {
case MSG_UPDATE_CALL:
mPhone.internalUpdateCall((InCallCall) msg.obj);
break;
case MSG_SET_POST_DIAL: {
case MSG_SET_POST_DIAL: {
SomeArgs args = (SomeArgs) msg.obj;
try {
String callId = (String) args.arg1;

View File

@@ -110,6 +110,16 @@ public final class TelecommConstants {
public static final String EXTRA_CONNECTION_SERVICE =
"android.telecomm.extra.CONNECTION_SERVICE";
/**
* The number which emergency services will use to return calls, if necessary. The in-call UI
* will take care of displaying this to the user.
* <p>
* Note that this should only be populated for emergency numbers, and if the number emergency
* services will see is different than the user's known phone number.
*/
public static final String EXTRA_EMERGENCY_CALL_BACK_NUMBER =
"android.telecomm.extra.EMERGENCY_CALL_BACK_NUMBER";
/**
* The dual tone multi-frequency signaling character sent to indicate the dialing system should
* pause for a predefined period.