diff options
author | Nancy Chen <nancychen@google.com> | 2014-10-23 19:49:25 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-23 19:49:25 +0000 |
commit | 9016ecab3be175dace3e1ad3e1c8558fef1a4720 (patch) | |
tree | c6d495e43f388c6912012a5495af76d14a466e3a /telephony/java | |
parent | b977ade1e40393f661722d8eec636d10c7541588 (diff) | |
parent | 0145e17db742dff963ea581bc944f99358d2dace (diff) | |
download | frameworks_base-9016ecab3be175dace3e1ad3e1c8558fef1a4720.zip frameworks_base-9016ecab3be175dace3e1ad3e1c8558fef1a4720.tar.gz frameworks_base-9016ecab3be175dace3e1ad3e1c8558fef1a4720.tar.bz2 |
am 0145e17d: Merge "Add getter methods in SubInfoRecord for UI. Adapt PhoneAccount." into lmp-sprout-dev
* commit '0145e17db742dff963ea581bc944f99358d2dace':
Add getter methods in SubInfoRecord for UI. Adapt PhoneAccount.
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/android/telephony/SubInfoRecord.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubInfoRecord.java index b9de871..f2df079 100644 --- a/telephony/java/android/telephony/SubInfoRecord.java +++ b/telephony/java/android/telephony/SubInfoRecord.java @@ -16,6 +16,7 @@ package android.telephony; +import android.graphics.drawable.BitmapDrawable; import android.os.Parcel; import android.os.Parcelable; @@ -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) { |