Merge "Add interfact to get phone ID from UiccSlotInfo"
am: 909e9d3e49
Change-Id: I610ad9785c419c864a604c2a330e07e56b6a19f2
This commit is contained in:
@@ -4187,22 +4187,19 @@ package android.telephony {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class UiccSlotInfo implements android.os.Parcelable {
|
public class UiccSlotInfo implements android.os.Parcelable {
|
||||||
ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int);
|
ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int, int);
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
method public java.lang.String getCardId();
|
method public java.lang.String getCardId();
|
||||||
method public int getCardStateInfo();
|
method public int getCardStateInfo();
|
||||||
method public boolean getIsActive();
|
method public boolean getIsActive();
|
||||||
method public boolean getIsEuicc();
|
method public boolean getIsEuicc();
|
||||||
|
method public int getLogicalSlotIdx();
|
||||||
method public void writeToParcel(android.os.Parcel, int);
|
method public void writeToParcel(android.os.Parcel, int);
|
||||||
field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1
|
field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1
|
||||||
field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3
|
field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3
|
||||||
field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2
|
field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2
|
||||||
field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4
|
field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4
|
||||||
field public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR;
|
field public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR;
|
||||||
field public final java.lang.String cardId;
|
|
||||||
field public final int cardStateInfo;
|
|
||||||
field public final boolean isActive;
|
|
||||||
field public final boolean isEuicc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class VisualVoicemailService extends android.app.Service {
|
public abstract class VisualVoicemailService extends android.app.Service {
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ public class UiccSlotInfo implements Parcelable {
|
|||||||
/** Card state restricted. */
|
/** Card state restricted. */
|
||||||
public static final int CARD_STATE_INFO_RESTRICTED = 4;
|
public static final int CARD_STATE_INFO_RESTRICTED = 4;
|
||||||
|
|
||||||
public final boolean isActive;
|
private final boolean mIsActive;
|
||||||
public final boolean isEuicc;
|
private final boolean mIsEuicc;
|
||||||
public final String cardId;
|
private final String mCardId;
|
||||||
public final @CardStateInfo int cardStateInfo;
|
private final @CardStateInfo int mCardStateInfo;
|
||||||
|
private final int mLogicalSlotIdx;
|
||||||
|
|
||||||
public static final Creator<UiccSlotInfo> CREATOR = new Creator<UiccSlotInfo>() {
|
public static final Creator<UiccSlotInfo> CREATOR = new Creator<UiccSlotInfo>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -73,18 +74,20 @@ public class UiccSlotInfo implements Parcelable {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private UiccSlotInfo(Parcel in) {
|
private UiccSlotInfo(Parcel in) {
|
||||||
isActive = in.readByte() != 0;
|
mIsActive = in.readByte() != 0;
|
||||||
isEuicc = in.readByte() != 0;
|
mIsEuicc = in.readByte() != 0;
|
||||||
cardId = in.readString();
|
mCardId = in.readString();
|
||||||
cardStateInfo = in.readInt();
|
mCardStateInfo = in.readInt();
|
||||||
|
mLogicalSlotIdx = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
dest.writeByte((byte) (isActive ? 1 : 0));
|
dest.writeByte((byte) (mIsActive ? 1 : 0));
|
||||||
dest.writeByte((byte) (isEuicc ? 1 : 0));
|
dest.writeByte((byte) (mIsEuicc ? 1 : 0));
|
||||||
dest.writeString(cardId);
|
dest.writeString(mCardId);
|
||||||
dest.writeInt(cardStateInfo);
|
dest.writeInt(mCardStateInfo);
|
||||||
|
dest.writeInt(mLogicalSlotIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -93,28 +96,33 @@ public class UiccSlotInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UiccSlotInfo(boolean isActive, boolean isEuicc, String cardId,
|
public UiccSlotInfo(boolean isActive, boolean isEuicc, String cardId,
|
||||||
@CardStateInfo int cardStateInfo) {
|
@CardStateInfo int cardStateInfo, int logicalSlotIdx) {
|
||||||
this.isActive = isActive;
|
this.mIsActive = isActive;
|
||||||
this.isEuicc = isEuicc;
|
this.mIsEuicc = isEuicc;
|
||||||
this.cardId = cardId;
|
this.mCardId = cardId;
|
||||||
this.cardStateInfo = cardStateInfo;
|
this.mCardStateInfo = cardStateInfo;
|
||||||
|
this.mLogicalSlotIdx = logicalSlotIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getIsActive() {
|
public boolean getIsActive() {
|
||||||
return isActive;
|
return mIsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getIsEuicc() {
|
public boolean getIsEuicc() {
|
||||||
return isEuicc;
|
return mIsEuicc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCardId() {
|
public String getCardId() {
|
||||||
return cardId;
|
return mCardId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@CardStateInfo
|
@CardStateInfo
|
||||||
public int getCardStateInfo() {
|
public int getCardStateInfo() {
|
||||||
return cardStateInfo;
|
return mCardStateInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLogicalSlotIdx() {
|
||||||
|
return mLogicalSlotIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -127,32 +135,36 @@ public class UiccSlotInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UiccSlotInfo that = (UiccSlotInfo) obj;
|
UiccSlotInfo that = (UiccSlotInfo) obj;
|
||||||
return (isActive == that.isActive)
|
return (mIsActive == that.mIsActive)
|
||||||
&& (isEuicc == that.isEuicc)
|
&& (mIsEuicc == that.mIsEuicc)
|
||||||
&& (cardId == that.cardId)
|
&& (mCardId == that.mCardId)
|
||||||
&& (cardStateInfo == that.cardStateInfo);
|
&& (mCardStateInfo == that.mCardStateInfo)
|
||||||
|
&& (mLogicalSlotIdx == that.mLogicalSlotIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = 31 * result + (isActive ? 1 : 0);
|
result = 31 * result + (mIsActive ? 1 : 0);
|
||||||
result = 31 * result + (isEuicc ? 1 : 0);
|
result = 31 * result + (mIsEuicc ? 1 : 0);
|
||||||
result = 31 * result + Objects.hashCode(cardId);
|
result = 31 * result + Objects.hashCode(mCardId);
|
||||||
result = 31 * result + cardStateInfo;
|
result = 31 * result + mCardStateInfo;
|
||||||
|
result = 31 * result + mLogicalSlotIdx;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "UiccSlotInfo (isActive="
|
return "UiccSlotInfo (mIsActive="
|
||||||
+ isActive
|
+ mIsActive
|
||||||
+ ", isEuicc="
|
+ ", mIsEuicc="
|
||||||
+ isEuicc
|
+ mIsEuicc
|
||||||
+ ", cardId="
|
+ ", mCardId="
|
||||||
+ cardId
|
+ mCardId
|
||||||
+ ", cardState="
|
+ ", cardState="
|
||||||
+ cardStateInfo
|
+ mCardStateInfo
|
||||||
|
+ ", phoneId="
|
||||||
|
+ mLogicalSlotIdx
|
||||||
+ ")";
|
+ ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user