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

Commit c76c5529 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Update annotations for UiccCardInfo APIs"

parents 2886d307 28911517
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -43072,7 +43072,7 @@ package android.telephony {
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getSubscriberId();
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getSubscriberId();
    method public String getTypeAllocationCode();
    method public String getTypeAllocationCode();
    method public String getTypeAllocationCode(int);
    method public String getTypeAllocationCode(int);
    method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo();
    method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @NonNull public java.util.List<android.telephony.UiccCardInfo> getUiccCardsInfo();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVisualVoicemailPackageName();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVisualVoicemailPackageName();
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailAlphaTag();
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailAlphaTag();
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber();
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public String getVoiceMailNumber();
@@ -43241,8 +43241,8 @@ package android.telephony {
  public final class UiccCardInfo implements android.os.Parcelable {
  public final class UiccCardInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public int getCardId();
    method public int getCardId();
    method public String getEid();
    method @Nullable public String getEid();
    method public String getIccId();
    method @Nullable public String getIccId();
    method public int getSlotIndex();
    method public int getSlotIndex();
    method public boolean isEuicc();
    method public boolean isEuicc();
    method public boolean isRemovable();
    method public boolean isRemovable();
+1 −0
Original line number Original line Diff line number Diff line
@@ -3203,6 +3203,7 @@ public class TelephonyManager {
     * the caller does not have adequate permissions for that card.
     * the caller does not have adequate permissions for that card.
     */
     */
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @NonNull
    public List<UiccCardInfo> getUiccCardsInfo() {
    public List<UiccCardInfo> getUiccCardsInfo() {
        try {
        try {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
+7 −2
Original line number Original line Diff line number Diff line
@@ -15,6 +15,8 @@
 */
 */
package android.telephony;
package android.telephony;


import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;


@@ -104,6 +106,7 @@ public final class UiccCardInfo implements Parcelable {
     * Note that this field may be omitted if the caller does not have the correct permissions
     * Note that this field may be omitted if the caller does not have the correct permissions
     * (see {@link TelephonyManager#getUiccCardsInfo()}).
     * (see {@link TelephonyManager#getUiccCardsInfo()}).
     */
     */
    @Nullable
    public String getEid() {
    public String getEid() {
        if (!mIsEuicc) {
        if (!mIsEuicc) {
            return null;
            return null;
@@ -117,6 +120,7 @@ public final class UiccCardInfo implements Parcelable {
     * Note that this field may be omitted if the caller does not have the correct permissions
     * Note that this field may be omitted if the caller does not have the correct permissions
     * (see {@link TelephonyManager#getUiccCardsInfo()}).
     * (see {@link TelephonyManager#getUiccCardsInfo()}).
     */
     */
    @Nullable
    public String getIccId() {
    public String getIccId() {
        return mIccId;
        return mIccId;
    }
    }
@@ -129,11 +133,12 @@ public final class UiccCardInfo implements Parcelable {
    }
    }


    /**
    /**
     * Returns a copy of the UiccCardinfo with the clears the EID and ICCID set to null. These
     * Returns a copy of the UiccCardinfo with the EID and ICCID set to null. These values are
     * values are generally private and require carrier privileges to view.
     * generally private and require carrier privileges to view.
     *
     *
     * @hide
     * @hide
     */
     */
    @NonNull
    public UiccCardInfo getUnprivileged() {
    public UiccCardInfo getUnprivileged() {
        return new UiccCardInfo(mIsEuicc, mCardId, null, null, mSlotIndex, mIsRemovable);
        return new UiccCardInfo(mIsEuicc, mCardId, null, null, mSlotIndex, mIsRemovable);
    }
    }