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

Commit e3ec9da3 authored by Andrew Lee's avatar Andrew Lee Committed by Android (Google) Code Review
Browse files

Merge "Add VideoState member variable to InCallCall." into lmp-dev

parents 5a554fb5 85f5d426
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28219,6 +28219,7 @@ package android.telecomm {
    method public java.lang.String getId();
    method public android.telecomm.CallState getState();
    method public android.telecomm.StatusHints getStatusHints();
    method public int getVideoState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator CREATOR;
  }
+10 −4
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public final class Call {
        private final String mDisconnectCauseMsg;
        private final long mConnectTimeMillis;
        private final GatewayInfo mGatewayInfo;
        private final int mVideoState;

        /**
         * @return The handle (e.g., phone number) to which the {@code Call} is currently
@@ -167,7 +168,8 @@ public final class Call {
                        Objects.equals(mDisconnectCauseCode, d.mDisconnectCauseCode) &&
                        Objects.equals(mDisconnectCauseMsg, d.mDisconnectCauseMsg) &&
                        Objects.equals(mConnectTimeMillis, d.mConnectTimeMillis) &&
                        Objects.equals(mGatewayInfo, d.mGatewayInfo);
                        Objects.equals(mGatewayInfo, d.mGatewayInfo) &&
                        Objects.equals(mVideoState, d.mVideoState);
            }
            return false;
        }
@@ -184,7 +186,8 @@ public final class Call {
                    Objects.hashCode(mDisconnectCauseCode) +
                    Objects.hashCode(mDisconnectCauseMsg) +
                    Objects.hashCode(mConnectTimeMillis) +
                    Objects.hashCode(mGatewayInfo);
                    Objects.hashCode(mGatewayInfo) +
                    Objects.hashCode(mVideoState);
        }

        /** {@hide} */
@@ -198,7 +201,8 @@ public final class Call {
                int disconnectCauseCode,
                String disconnectCauseMsg,
                long connectTimeMillis,
                GatewayInfo gatewayInfo) {
                GatewayInfo gatewayInfo,
                int videoState) {
            mHandle = handle;
            mHandlePresentation = handlePresentation;
            mCallerDisplayName = callerDisplayName;
@@ -209,6 +213,7 @@ public final class Call {
            mDisconnectCauseMsg = disconnectCauseMsg;
            mConnectTimeMillis = connectTimeMillis;
            mGatewayInfo = gatewayInfo;
            mVideoState = videoState;
        }
    }

@@ -545,7 +550,8 @@ public final class Call {
                inCallCall.getDisconnectCauseCode(),
                inCallCall.getDisconnectCauseMsg(),
                inCallCall.getConnectTimeMillis(),
                inCallCall.getGatewayInfo());
                inCallCall.getGatewayInfo(),
                inCallCall.getVideoState());
        boolean detailsChanged = !Objects.equals(mDetails, details);
        if (detailsChanged) {
            mDetails = details;
+16 −2
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ public final class InCallCall implements Parcelable {
    private final String mParentCallId;
    private final List<String> mChildCallIds;
    private final StatusHints mStatusHints;
    private final int mVideoState;

    /** @hide */
    public InCallCall(
@@ -69,7 +70,8 @@ public final class InCallCall implements Parcelable {
            ICallVideoProvider callVideoProvider,
            String parentCallId,
            List<String> childCallIds,
            StatusHints statusHints) {
            StatusHints statusHints,
            int videoState) {
        mId = id;
        mState = state;
        mDisconnectCauseCode = disconnectCauseCode;
@@ -87,6 +89,7 @@ public final class InCallCall implements Parcelable {
        mParentCallId = parentCallId;
        mChildCallIds = childCallIds;
        mStatusHints = statusHints;
        mVideoState = videoState;
    }

    /** The unique ID of the call. */
@@ -204,6 +207,14 @@ public final class InCallCall implements Parcelable {
        return mStatusHints;
    }

    /**
     * The video state.
     * @return The video state of the call.
     */
    public int getVideoState() {
        return mVideoState;
    }

    /** Responsible for creating InCallCall objects for deserialized Parcels. */
    public static final Parcelable.Creator<InCallCall> CREATOR =
            new Parcelable.Creator<InCallCall> () {
@@ -230,10 +241,12 @@ public final class InCallCall implements Parcelable {
            List<String> childCallIds = new ArrayList<>();
            source.readList(childCallIds, classLoader);
            StatusHints statusHints = source.readParcelable(classLoader);
            int videoState = source.readInt();
            return new InCallCall(id, state, disconnectCauseCode, disconnectCauseMsg,
                    cannedSmsResponses, capabilities, connectTimeMillis, handle, handlePresentation,
                    callerDisplayName, callerDisplayNamePresentation, gatewayInfo,
                    account, callVideoProvider, parentCallId, childCallIds, statusHints);
                    account, callVideoProvider, parentCallId, childCallIds, statusHints,
                    videoState);
        }

        @Override
@@ -269,6 +282,7 @@ public final class InCallCall implements Parcelable {
        destination.writeString(mParentCallId);
        destination.writeList(mChildCallIds);
        destination.writeParcelable(mStatusHints, 0);
        destination.writeInt(mVideoState);
    }

    @Override