Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -28486,6 +28486,9 @@ package android.telephony { ctor public SubInfoRecord(); ctor public SubInfoRecord(long, java.lang.String, int, java.lang.String, int, int, java.lang.String, int, int, int[], int, int); method public int describeContents(); method public int getColor(); method public android.graphics.drawable.BitmapDrawable getIconDrawable(); method public java.lang.String getLabel(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator CREATOR; field public int color; telecomm/java/android/telecom/PhoneAccount.java +27 −0 Original line number Diff line number Diff line Loading @@ -108,11 +108,17 @@ public class PhoneAccount implements Parcelable { */ public static final String SCHEME_SIP = "sip"; /** * Indicating no color is set. */ public static final int NO_COLOR = -1; private final PhoneAccountHandle mAccountHandle; private final Uri mAddress; private final Uri mSubscriptionAddress; private final int mCapabilities; private final int mIconResId; private final int mColor; private final CharSequence mLabel; private final CharSequence mShortDescription; private final List<String> mSupportedUriSchemes; Loading @@ -123,6 +129,7 @@ public class PhoneAccount implements Parcelable { private Uri mSubscriptionAddress; private int mCapabilities; private int mIconResId; private int mColor = NO_COLOR; private CharSequence mLabel; private CharSequence mShortDescription; private List<String> mSupportedUriSchemes = new ArrayList<String>(); Loading @@ -144,6 +151,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = phoneAccount.getSubscriptionAddress(); mCapabilities = phoneAccount.getCapabilities(); mIconResId = phoneAccount.getIconResId(); mColor = phoneAccount.getColor(); mLabel = phoneAccount.getLabel(); mShortDescription = phoneAccount.getShortDescription(); mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes()); Loading @@ -169,6 +177,11 @@ public class PhoneAccount implements Parcelable { return this; } public Builder setColor(int value) { this.mColor = value; return this; } public Builder setShortDescription(CharSequence value) { this.mShortDescription = value; return this; Loading Loading @@ -222,6 +235,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress, mCapabilities, mIconResId, mColor, mLabel, mShortDescription, mSupportedUriSchemes); Loading @@ -234,6 +248,7 @@ public class PhoneAccount implements Parcelable { Uri subscriptionAddress, int capabilities, int iconResId, int color, CharSequence label, CharSequence shortDescription, List<String> supportedUriSchemes) { Loading @@ -242,6 +257,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = subscriptionAddress; mCapabilities = capabilities; mIconResId = iconResId; mColor = color; mLabel = label; mShortDescription = shortDescription; mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes); Loading Loading @@ -370,6 +386,15 @@ public class PhoneAccount implements Parcelable { return mIconResId; } /** * A highlight color to use in displaying information about this {@code PhoneAccount}. * * @return A hexadecimal color value. */ public int getColor() { return mColor; } /** * An icon to represent this {@code PhoneAccount} in a user interface. * Loading Loading @@ -413,6 +438,7 @@ public class PhoneAccount implements Parcelable { out.writeParcelable(mSubscriptionAddress, 0); out.writeInt(mCapabilities); out.writeInt(mIconResId); out.writeInt(mColor); out.writeCharSequence(mLabel); out.writeCharSequence(mShortDescription); out.writeList(mSupportedUriSchemes); Loading @@ -439,6 +465,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = in.readParcelable(getClass().getClassLoader()); mCapabilities = in.readInt(); mIconResId = in.readInt(); mColor = in.readInt(); mLabel = in.readCharSequence(); mShortDescription = in.readCharSequence(); Loading telephony/java/android/telephony/SubInfoRecord.java +26 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.telephony; import android.graphics.drawable.BitmapDrawable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -107,6 +108,31 @@ public class SubInfoRecord implements Parcelable { this.mnc = mnc; } /** * Returns the string displayed to the user that identifies this subscription */ public String getLabel() { return this.displayName; } /** * Return the icon used to identify this SIM. * TODO: return the correct drawable. */ public BitmapDrawable getIconDrawable() { return new BitmapDrawable(); } /** * Return the color to be used for when displaying to the user. This is the value of the color. * ex: 0x00ff00 */ public int getColor() { // Note: This color is currently an index into a list of drawables, but this is soon to // change. return this.color; } public static final Parcelable.Creator<SubInfoRecord> CREATOR = new Parcelable.Creator<SubInfoRecord>() { @Override public SubInfoRecord createFromParcel(Parcel source) { Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -28486,6 +28486,9 @@ package android.telephony { ctor public SubInfoRecord(); ctor public SubInfoRecord(long, java.lang.String, int, java.lang.String, int, int, java.lang.String, int, int, int[], int, int); method public int describeContents(); method public int getColor(); method public android.graphics.drawable.BitmapDrawable getIconDrawable(); method public java.lang.String getLabel(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator CREATOR; field public int color;
telecomm/java/android/telecom/PhoneAccount.java +27 −0 Original line number Diff line number Diff line Loading @@ -108,11 +108,17 @@ public class PhoneAccount implements Parcelable { */ public static final String SCHEME_SIP = "sip"; /** * Indicating no color is set. */ public static final int NO_COLOR = -1; private final PhoneAccountHandle mAccountHandle; private final Uri mAddress; private final Uri mSubscriptionAddress; private final int mCapabilities; private final int mIconResId; private final int mColor; private final CharSequence mLabel; private final CharSequence mShortDescription; private final List<String> mSupportedUriSchemes; Loading @@ -123,6 +129,7 @@ public class PhoneAccount implements Parcelable { private Uri mSubscriptionAddress; private int mCapabilities; private int mIconResId; private int mColor = NO_COLOR; private CharSequence mLabel; private CharSequence mShortDescription; private List<String> mSupportedUriSchemes = new ArrayList<String>(); Loading @@ -144,6 +151,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = phoneAccount.getSubscriptionAddress(); mCapabilities = phoneAccount.getCapabilities(); mIconResId = phoneAccount.getIconResId(); mColor = phoneAccount.getColor(); mLabel = phoneAccount.getLabel(); mShortDescription = phoneAccount.getShortDescription(); mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes()); Loading @@ -169,6 +177,11 @@ public class PhoneAccount implements Parcelable { return this; } public Builder setColor(int value) { this.mColor = value; return this; } public Builder setShortDescription(CharSequence value) { this.mShortDescription = value; return this; Loading Loading @@ -222,6 +235,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress, mCapabilities, mIconResId, mColor, mLabel, mShortDescription, mSupportedUriSchemes); Loading @@ -234,6 +248,7 @@ public class PhoneAccount implements Parcelable { Uri subscriptionAddress, int capabilities, int iconResId, int color, CharSequence label, CharSequence shortDescription, List<String> supportedUriSchemes) { Loading @@ -242,6 +257,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = subscriptionAddress; mCapabilities = capabilities; mIconResId = iconResId; mColor = color; mLabel = label; mShortDescription = shortDescription; mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes); Loading Loading @@ -370,6 +386,15 @@ public class PhoneAccount implements Parcelable { return mIconResId; } /** * A highlight color to use in displaying information about this {@code PhoneAccount}. * * @return A hexadecimal color value. */ public int getColor() { return mColor; } /** * An icon to represent this {@code PhoneAccount} in a user interface. * Loading Loading @@ -413,6 +438,7 @@ public class PhoneAccount implements Parcelable { out.writeParcelable(mSubscriptionAddress, 0); out.writeInt(mCapabilities); out.writeInt(mIconResId); out.writeInt(mColor); out.writeCharSequence(mLabel); out.writeCharSequence(mShortDescription); out.writeList(mSupportedUriSchemes); Loading @@ -439,6 +465,7 @@ public class PhoneAccount implements Parcelable { mSubscriptionAddress = in.readParcelable(getClass().getClassLoader()); mCapabilities = in.readInt(); mIconResId = in.readInt(); mColor = in.readInt(); mLabel = in.readCharSequence(); mShortDescription = in.readCharSequence(); Loading
telephony/java/android/telephony/SubInfoRecord.java +26 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.telephony; import android.graphics.drawable.BitmapDrawable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -107,6 +108,31 @@ public class SubInfoRecord implements Parcelable { this.mnc = mnc; } /** * Returns the string displayed to the user that identifies this subscription */ public String getLabel() { return this.displayName; } /** * Return the icon used to identify this SIM. * TODO: return the correct drawable. */ public BitmapDrawable getIconDrawable() { return new BitmapDrawable(); } /** * Return the color to be used for when displaying to the user. This is the value of the color. * ex: 0x00ff00 */ public int getColor() { // Note: This color is currently an index into a list of drawables, but this is soon to // change. return this.color; } public static final Parcelable.Creator<SubInfoRecord> CREATOR = new Parcelable.Creator<SubInfoRecord>() { @Override public SubInfoRecord createFromParcel(Parcel source) { Loading