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

Commit 48d8442e authored by Brian Attwell's avatar Brian Attwell Committed by Etan Cohen
Browse files

Unhide telecom APIs needed by Contacts

* Removed @SystemApi and @hide from some telecom classes
  and APIs
* Stopped using explicit @link's to ConnectionService, so
  that I didn't need to unhide ConnectionService
* Added @SystemApi to hidden methods inside classes that
  I removed @SystemApi from.
* Ran update-api. This picked up unrelated Math changes
  from b/11388705.

Unbundling

Bug: 18777272
Bug: 11388705
Change-Id: I218e0c3c0ae515d3deb2d3b67657db45a0bad999
parent 500a98a8
Loading
Loading
Loading
Loading
+88 −0
Original line number Original line Diff line number Diff line
@@ -28166,8 +28166,65 @@ package android.system {
package android.telecom {
package android.telecom {
  public class PhoneAccount implements android.os.Parcelable {
    method public static android.telecom.PhoneAccount.Builder builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
    method public android.graphics.drawable.Drawable createIconDrawable(android.content.Context);
    method public int describeContents();
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public android.net.Uri getAddress();
    method public int getCapabilities();
    method public int getHighlightColor();
    method public android.graphics.Bitmap getIconBitmap();
    method public java.lang.String getIconPackageName();
    method public int getIconResId();
    method public int getIconTint();
    method public java.lang.CharSequence getLabel();
    method public java.lang.CharSequence getShortDescription();
    method public android.net.Uri getSubscriptionAddress();
    method public java.util.List<java.lang.String> getSupportedUriSchemes();
    method public boolean hasCapabilities(int);
    method public boolean supportsUriScheme(java.lang.String);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 16; // 0x10
    field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccount> CREATOR;
    field public static final int NO_HIGHLIGHT_COLOR = 0; // 0x0
    field public static final int NO_ICON_TINT = 0; // 0x0
    field public static final int NO_RESOURCE_ID = -1; // 0xffffffff
    field public static final java.lang.String SCHEME_SIP = "sip";
    field public static final java.lang.String SCHEME_TEL = "tel";
    field public static final java.lang.String SCHEME_VOICEMAIL = "voicemail";
  }
  public static class PhoneAccount.Builder {
    ctor public PhoneAccount.Builder(android.telecom.PhoneAccountHandle, java.lang.CharSequence);
    ctor public PhoneAccount.Builder(android.telecom.PhoneAccount);
    method public android.telecom.PhoneAccount build();
    method public android.telecom.PhoneAccount.Builder setAddress(android.net.Uri);
    method public android.telecom.PhoneAccount.Builder setCapabilities(int);
    method public android.telecom.PhoneAccount.Builder setHighlightColor(int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.content.Context, int);
    method public android.telecom.PhoneAccount.Builder setIcon(java.lang.String, int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.content.Context, int, int);
    method public android.telecom.PhoneAccount.Builder setIcon(java.lang.String, int, int);
    method public android.telecom.PhoneAccount.Builder setIcon(android.graphics.Bitmap);
    method public android.telecom.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);
    method public android.telecom.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri);
    method public android.telecom.PhoneAccount.Builder setSupportedUriSchemes(java.util.List<java.lang.String>);
  }
  public class PhoneAccountHandle implements android.os.Parcelable {
    ctor public PhoneAccountHandle(android.content.ComponentName, java.lang.String);
    method public int describeContents();
    method public android.content.ComponentName getComponentName();
    method public java.lang.String getId();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.PhoneAccountHandle> CREATOR;
  }
  public class TelecomManager {
  public class TelecomManager {
    method public void cancelMissedCallsNotification();
    method public void cancelMissedCallsNotification();
    method public android.telecom.PhoneAccount getPhoneAccount(android.telecom.PhoneAccountHandle);
    method public boolean handleMmi(java.lang.String);
    method public boolean handleMmi(java.lang.String);
    method public boolean isInCall();
    method public boolean isInCall();
    method public void showInCallScreen(boolean);
    method public void showInCallScreen(boolean);
@@ -28176,7 +28233,10 @@ package android.telecom {
    field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
    field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecom.extra.CALL_DISCONNECT_CAUSE";
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
    field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecom.extra.CALL_DISCONNECT_MESSAGE";
    field public static final java.lang.String EXTRA_OUTGOING_CALL_EXTRAS = "android.telecom.extra.OUTGOING_CALL_EXTRAS";
    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final java.lang.String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
    field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
    field public static final java.lang.String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
    field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
    field public static final java.lang.String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
@@ -28185,6 +28245,34 @@ package android.telecom {
    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
  }
  }
  public class VideoProfile implements android.os.Parcelable {
    ctor public VideoProfile(int);
    ctor public VideoProfile(int, int);
    method public int describeContents();
    method public int getQuality();
    method public int getVideoState();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telecom.VideoProfile> CREATOR;
    field public static final int QUALITY_DEFAULT = 4; // 0x4
    field public static final int QUALITY_HIGH = 1; // 0x1
    field public static final int QUALITY_LOW = 3; // 0x3
    field public static final int QUALITY_MEDIUM = 2; // 0x2
  }
  public static class VideoProfile.VideoState {
    ctor public VideoProfile.VideoState();
    method public static boolean isAudioOnly(int);
    method public static boolean isBidirectional(int);
    method public static boolean isPaused(int);
    method public static boolean isReceptionEnabled(int);
    method public static boolean isTransmissionEnabled(int);
    field public static final int AUDIO_ONLY = 0; // 0x0
    field public static final int BIDIRECTIONAL = 3; // 0x3
    field public static final int PAUSED = 4; // 0x4
    field public static final int RX_ENABLED = 2; // 0x2
    field public static final int TX_ENABLED = 1; // 0x1
  }
}
}
package android.telephony {
package android.telephony {
+10 −4
Original line number Original line Diff line number Diff line
@@ -40,15 +40,13 @@ import java.util.MissingResourceException;
/**
/**
 * Represents a distinct method to place or receive a phone call. Apps which can place calls and
 * Represents a distinct method to place or receive a phone call. Apps which can place calls and
 * want those calls to be integrated into the dialer and in-call UI should build an instance of
 * want those calls to be integrated into the dialer and in-call UI should build an instance of
 * this class and register it with the system using {@link TelecomManager#registerPhoneAccount}.
 * this class and register it with the system using {@link TelecomManager}.
 * <p>
 * <p>
 * {@link TelecomManager} uses registered {@link PhoneAccount}s to present the user with
 * {@link TelecomManager} uses registered {@link PhoneAccount}s to present the user with
 * alternative options when placing a phone call. When building a {@link PhoneAccount}, the app
 * alternative options when placing a phone call. When building a {@link PhoneAccount}, the app
 * should supply a valid {@link PhoneAccountHandle} that references the {@link ConnectionService}
 * should supply a valid {@link PhoneAccountHandle} that references the connection service
 * implementation Telecom will use to interact with the app.
 * implementation Telecom will use to interact with the app.
 * @hide
 */
 */
@SystemApi
public class PhoneAccount implements Parcelable {
public class PhoneAccount implements Parcelable {


    /**
    /**
@@ -62,7 +60,9 @@ public class PhoneAccount implements Parcelable {
     * if the user has explicitly selected it to be used as the default connection manager.
     * if the user has explicitly selected it to be used as the default connection manager.
     * <p>
     * <p>
     * See {@link #getCapabilities}
     * See {@link #getCapabilities}
     * @hide
     */
     */
    @SystemApi
    public static final int CAPABILITY_CONNECTION_MANAGER = 0x1;
    public static final int CAPABILITY_CONNECTION_MANAGER = 0x1;


    /**
    /**
@@ -76,6 +76,7 @@ public class PhoneAccount implements Parcelable {
     * <p>
     * <p>
     * {@hide}
     * {@hide}
     */
     */
    @SystemApi
    public static final int CAPABILITY_CALL_PROVIDER = 0x2;
    public static final int CAPABILITY_CALL_PROVIDER = 0x2;


    /**
    /**
@@ -94,6 +95,7 @@ public class PhoneAccount implements Parcelable {
     * See {@link #getCapabilities}
     * See {@link #getCapabilities}
     * @hide
     * @hide
     */
     */
    @SystemApi
    public static final int CAPABILITY_VIDEO_CALLING = 0x8;
    public static final int CAPABILITY_VIDEO_CALLING = 0x8;


    /**
    /**
@@ -111,6 +113,7 @@ public class PhoneAccount implements Parcelable {
     * See {@link #getCapabilities}
     * See {@link #getCapabilities}
     * @hide
     * @hide
     */
     */
    @SystemApi
    public static final int CAPABILITY_MULTI_USER = 0x20;
    public static final int CAPABILITY_MULTI_USER = 0x20;


    /**
    /**
@@ -203,6 +206,7 @@ public class PhoneAccount implements Parcelable {
        }
        }


        /** @hide */
        /** @hide */
        @SystemApi
        public Builder setAccountHandle(PhoneAccountHandle accountHandle) {
        public Builder setAccountHandle(PhoneAccountHandle accountHandle) {
            mAccountHandle = accountHandle;
            mAccountHandle = accountHandle;
            return this;
            return this;
@@ -333,6 +337,7 @@ public class PhoneAccount implements Parcelable {
         * @return The builder.
         * @return The builder.
         * @hide
         * @hide
         */
         */
        @SystemApi
        public Builder addSupportedUriScheme(String uriScheme) {
        public Builder addSupportedUriScheme(String uriScheme) {
            if (!TextUtils.isEmpty(uriScheme) && !mSupportedUriSchemes.contains(uriScheme)) {
            if (!TextUtils.isEmpty(uriScheme) && !mSupportedUriSchemes.contains(uriScheme)) {
                this.mSupportedUriSchemes.add(uriScheme);
                this.mSupportedUriSchemes.add(uriScheme);
@@ -423,6 +428,7 @@ public class PhoneAccount implements Parcelable {
     * @return The builder.
     * @return The builder.
     * @hide
     * @hide
     */
     */
    @SystemApi
    public Builder toBuilder() { return new Builder(this); }
    public Builder toBuilder() { return new Builder(this); }


    /**
    /**
+8 −9
Original line number Original line Diff line number Diff line
@@ -29,16 +29,13 @@ import java.util.Objects;
 * The unique identifier for a {@link PhoneAccount}. A {@code PhoneAccountHandle} is made of two
 * The unique identifier for a {@link PhoneAccount}. A {@code PhoneAccountHandle} is made of two
 * parts:
 * parts:
 * <ul>
 * <ul>
 *  <li>The component name of the associated {@link ConnectionService}.</li>
 *  <li>The component name of the associated connection service.</li>
 *  <li>A string identifier that is unique across {@code PhoneAccountHandle}s with the same
 *  <li>A string identifier that is unique across {@code PhoneAccountHandle}s with the same
 *      component name.</li>
 *      component name.</li>
 * </ul>
 * </ul>
 *
 *
 * See {@link PhoneAccount},
 * See {@link PhoneAccount}, {@link TelecomManager}.
 * {@link TelecomManager#registerPhoneAccount TelecomManager.registerPhoneAccount}.
 * @hide
 */
 */
@SystemApi
public class PhoneAccountHandle implements Parcelable {
public class PhoneAccountHandle implements Parcelable {
    private final ComponentName mComponentName;
    private final ComponentName mComponentName;
    private final String mId;
    private final String mId;
@@ -51,6 +48,7 @@ public class PhoneAccountHandle implements Parcelable {
    }
    }


    /** @hide */
    /** @hide */
    @SystemApi
    public PhoneAccountHandle(
    public PhoneAccountHandle(
            ComponentName componentName,
            ComponentName componentName,
            String id,
            String id,
@@ -61,8 +59,8 @@ public class PhoneAccountHandle implements Parcelable {
    }
    }


    /**
    /**
     * The {@code ComponentName} of the {@link android.telecom.ConnectionService} which is
     * The {@code ComponentName} of the connection service which is responsible for making phone
     * responsible for making phone calls using this {@code PhoneAccountHandle}.
     * calls using this {@code PhoneAccountHandle}.
     *
     *
     * @return A suitable {@code ComponentName}.
     * @return A suitable {@code ComponentName}.
     */
     */
@@ -72,9 +70,9 @@ public class PhoneAccountHandle implements Parcelable {


    /**
    /**
     * A string that uniquely distinguishes this particular {@code PhoneAccountHandle} from all the
     * A string that uniquely distinguishes this particular {@code PhoneAccountHandle} from all the
     * others supported by the {@link ConnectionService} that created it.
     * others supported by the connection service that created it.
     * <p>
     * <p>
     * A {@code ConnectionService} must select identifiers that are stable for the lifetime of
     * A connection service must select identifiers that are stable for the lifetime of
     * their users' relationship with their service, across many Android devices. For example, a
     * their users' relationship with their service, across many Android devices. For example, a
     * good set of identifiers might be the email addresses with which with users registered for
     * good set of identifiers might be the email addresses with which with users registered for
     * their accounts with a particular service. Depending on how a service chooses to operate,
     * their accounts with a particular service. Depending on how a service chooses to operate,
@@ -92,6 +90,7 @@ public class PhoneAccountHandle implements Parcelable {
     * @return the {@link UserHandle} to use when connecting to this PhoneAccount.
     * @return the {@link UserHandle} to use when connecting to this PhoneAccount.
     * @hide
     * @hide
     */
     */
    @SystemApi
    public UserHandle getUserHandle() {
    public UserHandle getUserHandle() {
        return mUserHandle;
        return mUserHandle;
    }
    }
+0 −8
Original line number Original line Diff line number Diff line
@@ -106,7 +106,6 @@ public class TelecomManager {
     * {@link VideoProfile.VideoState#BIDIRECTIONAL},
     * {@link VideoProfile.VideoState#BIDIRECTIONAL},
     * {@link VideoProfile.VideoState#RX_ENABLED},
     * {@link VideoProfile.VideoState#RX_ENABLED},
     * {@link VideoProfile.VideoState#TX_ENABLED}.
     * {@link VideoProfile.VideoState#TX_ENABLED}.
     * @hide
     */
     */
    public static final String EXTRA_START_CALL_WITH_VIDEO_STATE =
    public static final String EXTRA_START_CALL_WITH_VIDEO_STATE =
            "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
            "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
@@ -117,9 +116,7 @@ public class TelecomManager {
     * {@link PhoneAccountHandle} to use when making the call.
     * {@link PhoneAccountHandle} to use when making the call.
     * <p class="note">
     * <p class="note">
     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
     * @hide
     */
     */
    @SystemApi
    public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
    public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
            "android.telecom.extra.PHONE_ACCOUNT_HANDLE";
            "android.telecom.extra.PHONE_ACCOUNT_HANDLE";


@@ -139,10 +136,7 @@ public class TelecomManager {
     * {@link android.content.Intent#ACTION_DIAL} {@code Intent} containing a {@link Bundle}
     * {@link android.content.Intent#ACTION_DIAL} {@code Intent} containing a {@link Bundle}
     * which contains metadata about the call. This {@link Bundle} will be saved into
     * which contains metadata about the call. This {@link Bundle} will be saved into
     * {@code Call.Details}.
     * {@code Call.Details}.
     *
     * @hide
     */
     */
    @SystemApi
    public static final String EXTRA_OUTGOING_CALL_EXTRAS =
    public static final String EXTRA_OUTGOING_CALL_EXTRAS =
            "android.telecom.extra.OUTGOING_CALL_EXTRAS";
            "android.telecom.extra.OUTGOING_CALL_EXTRAS";


@@ -554,9 +548,7 @@ public class TelecomManager {
     *
     *
     * @param account The {@link PhoneAccountHandle}.
     * @param account The {@link PhoneAccountHandle}.
     * @return The {@link PhoneAccount} object.
     * @return The {@link PhoneAccount} object.
     * @hide
     */
     */
    @SystemApi
    public PhoneAccount getPhoneAccount(PhoneAccountHandle account) {
    public PhoneAccount getPhoneAccount(PhoneAccountHandle account) {
        try {
        try {
            if (isServiceConnected()) {
            if (isServiceConnected()) {
+0 −2
Original line number Original line Diff line number Diff line
@@ -21,8 +21,6 @@ import android.os.Parcelable;


/**
/**
 * Represents attributes of video calls.
 * Represents attributes of video calls.
 *
 * {@hide}
 */
 */
public class VideoProfile implements Parcelable {
public class VideoProfile implements Parcelable {
    /**
    /**