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

Commit 5b49adea authored by Evan Charlton's avatar Evan Charlton
Browse files

Plumb through StatusHints change notifications

When StatusHints are modified, inform listeners. Also expose two
constants for passing optional strings from the CallService to
the in-call UI.

Bug: 13334257
Bug: 13334252

Change-Id: If7fde7c1ca6940cec8b7232469a22900c36dbb17
parent e2e280ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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";
+17 −4
Original line number Diff line number Diff line
@@ -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;
+10 −0
Original line number Diff line number Diff line
@@ -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.
+1 −1

File changed.

Contains only whitespace changes.