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

Commit 4823aece authored by Nancy Chen's avatar Nancy Chen Committed by Android (Google) Code Review
Browse files

Merge "API changes in GatewayInfo, Response, and PropertyPresentation (1/4)" into lmp-dev

parents 26a40198 9d568c01
Loading
Loading
Loading
Loading
+8 −17
Original line number Diff line number Diff line
@@ -28320,9 +28320,9 @@ package android.telecomm {
  public class GatewayInfo implements android.os.Parcelable {
    method public int describeContents();
    method public android.net.Uri getGatewayHandle();
    method public android.net.Uri getGatewayAddress();
    method public java.lang.String getGatewayProviderPackageName();
    method public android.net.Uri getOriginalHandle();
    method public android.net.Uri getOriginalAddress();
    method public boolean isEmpty();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator CREATOR;
@@ -28383,14 +28383,6 @@ package android.telecomm {
    field public static final int SWAP_CONFERENCE = 8; // 0x8
  }
  public class PropertyPresentation {
    ctor public PropertyPresentation();
    field public static final int ALLOWED = 1; // 0x1
    field public static final int PAYPHONE = 4; // 0x4
    field public static final int RESTRICTED = 2; // 0x2
    field public static final int UNKNOWN = 3; // 0x3
  }
  public final class RemoteConference {
    method public final void addCallback(android.telecomm.RemoteConference.Callback);
    method public void disconnect();
@@ -28465,11 +28457,6 @@ package android.telecomm {
    method public void onStatusHintsChanged(android.telecomm.RemoteConnection, android.telecomm.StatusHints);
  }
  public abstract interface Response {
    method public abstract void onError(IN, int, java.lang.String);
    method public abstract void onResult(IN, OUT...);
  }
  public final class StatusHints implements android.os.Parcelable {
    ctor public StatusHints(android.content.ComponentName, java.lang.CharSequence, int, android.os.Bundle);
    method public int describeContents();
@@ -28506,8 +28493,12 @@ 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_PHONE_ACCOUNT_HANDLE = "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.intent.extra.PHONE_ACCOUNT_HANDLE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
    field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
    field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
  }
}
+2 −2
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public final class Call {

        /**
         * @return The presentation requirements for the handle. See
         * {@link PropertyPresentation} for valid values.
         * {@link TelecommManager} for valid values.
         */
        public int getHandlePresentation() {
            return mHandlePresentation;
@@ -123,7 +123,7 @@ public final class Call {

        /**
         * @return The presentation requirements for the caller display name. See
         * {@link PropertyPresentation} for valid values.
         * {@link TelecommManager} for valid values.
         */
        public int getCallerDisplayNamePresentation() {
            return mCallerDisplayNamePresentation;
+8 −7
Original line number Diff line number Diff line
@@ -492,7 +492,8 @@ public abstract class Connection {
    }

    /**
     * @return The {@link PropertyPresentation} which controls how the handle is shown.
     * @return The presentation requirements for the handle.
     *         See {@link TelecommManager} for valid values.
     */
    public final int getHandlePresentation() {
        return mHandlePresentation;
@@ -506,8 +507,8 @@ public abstract class Connection {
    }

    /**
     * @return The {@link PropertyPresentation} which controls how the caller display name is
     *         shown.
     * @return The presentation requirements for the handle.
     *         See {@link TelecommManager} for valid values.
     */
    public final int getCallerDisplayNamePresentation() {
        return mCallerDisplayNamePresentation;
@@ -664,8 +665,8 @@ public abstract class Connection {
     * Sets the value of the {@link #getHandle()} property.
     *
     * @param handle The new handle.
     * @param presentation The {@link PropertyPresentation} which controls how the handle is
     *         shown.
     * @param presentation The presentation requirements for the handle.
     *        See {@link TelecommManager} for valid values.
     */
    public final void setHandle(Uri handle, int presentation) {
        Log.d(this, "setHandle %s", handle);
@@ -680,8 +681,8 @@ public abstract class Connection {
     * Sets the caller display name (CNAP).
     *
     * @param callerDisplayName The new display name.
     * @param presentation The {@link PropertyPresentation} which controls how the name is
     *         shown.
     * @param presentation The presentation requirements for the handle.
     *        See {@link TelecommManager} for valid values.
     */
    public final void setCallerDisplayName(String callerDisplayName, int presentation) {
        Log.d(this, "setCallerDisplayName %s", callerDisplayName);
+18 −16
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.telecomm;

import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -33,14 +34,15 @@ import android.text.TextUtils;
public class GatewayInfo implements Parcelable {

    private final String mGatewayProviderPackageName;
    private final Uri mGatewayHandle;
    private final Uri mOriginalHandle;
    private final Uri mGatewayAddress;
    private final Uri mOriginalAddress;

    /** @hide */
    public GatewayInfo(String packageName, Uri gatewayUri, Uri originalHandle) {
    @SystemApi
    public GatewayInfo(String packageName, Uri gatewayUri, Uri originalAddress) {
        mGatewayProviderPackageName = packageName;
        mGatewayHandle = gatewayUri;
        mOriginalHandle = originalHandle;
        mGatewayAddress = gatewayUri;
        mOriginalAddress = originalAddress;
    }

    /**
@@ -51,21 +53,21 @@ public class GatewayInfo implements Parcelable {
    }

    /**
     * Gateway provider handle to use when actually placing the call.
     * Gateway provider address to use when actually placing the call.
     */
    public Uri getGatewayHandle() {
        return mGatewayHandle;
    public Uri getGatewayAddress() {
        return mGatewayAddress;
    }

    /**
     * The actual call handle that the user is trying to connect to via the gateway.
     * The actual call address that the user is trying to connect to via the gateway.
     */
    public Uri getOriginalHandle() {
        return mOriginalHandle;
    public Uri getOriginalAddress() {
        return mOriginalAddress;
    }

    public boolean isEmpty() {
        return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayHandle == null;
        return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayAddress == null;
    }

    /** Implement the Parcelable interface */
@@ -76,8 +78,8 @@ public class GatewayInfo implements Parcelable {
        public GatewayInfo createFromParcel(Parcel source) {
            String gatewayPackageName = source.readString();
            Uri gatewayUri = Uri.CREATOR.createFromParcel(source);
            Uri originalHandle = Uri.CREATOR.createFromParcel(source);
            return new GatewayInfo(gatewayPackageName, gatewayUri, originalHandle);
            Uri originalAddress = Uri.CREATOR.createFromParcel(source);
            return new GatewayInfo(gatewayPackageName, gatewayUri, originalAddress);
        }

        @Override
@@ -100,7 +102,7 @@ public class GatewayInfo implements Parcelable {
    @Override
    public void writeToParcel(Parcel destination, int flags) {
        destination.writeString(mGatewayProviderPackageName);
        mGatewayHandle.writeToParcel(destination, 0);
        mOriginalHandle.writeToParcel(destination, 0);
        mGatewayAddress.writeToParcel(destination, 0);
        mOriginalAddress.writeToParcel(destination, 0);
    }
}
+7 −2
Original line number Diff line number Diff line
@@ -153,7 +153,9 @@ public final class ParcelableCall implements Parcelable {
        return mHandle;
    }

    /** The {@link PropertyPresentation} which controls how the handle is shown. */
    /**
     * The presentation requirements for the handle. See {@link TelecommManager} for valid values.
     */
    public int getHandlePresentation() {
        return mHandlePresentation;
    }
@@ -163,7 +165,10 @@ public final class ParcelableCall implements Parcelable {
        return mCallerDisplayName;
    }

    /** The {@link PropertyPresentation} which controls how the caller display name is shown. */
    /**
     * The presentation requirements for the caller display name.
     * See {@link TelecommManager} for valid values.
     */
    public int getCallerDisplayNamePresentation() {
        return mCallerDisplayNamePresentation;
    }
Loading