diff options
author | Robert Greenwalt <robdroid@android.com> | 2009-10-08 21:15:52 -0700 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2009-10-09 00:54:31 -0700 |
commit | 98e0b146b80670b52805b4b210ef5582dad6bb68 (patch) | |
tree | ea52741b3360ca06cd1d5697c38cd0c50be9e0f4 /telephony/java/android/telephony/ServiceState.java | |
parent | 1184313cbea3b34a4596a90be7081551d36f251a (diff) | |
download | frameworks_base-98e0b146b80670b52805b4b210ef5582dad6bb68.zip frameworks_base-98e0b146b80670b52805b4b210ef5582dad6bb68.tar.gz frameworks_base-98e0b146b80670b52805b4b210ef5582dad6bb68.tar.bz2 |
Make PhoneStateListeners not call TelephonyManager
Since the StatusBarPolicy is run in the System Process and shouldn't therefore call into
the Telephony process we decided to make sure all the needed info was passed along with the
original notifications.
bug: 2173053
Diffstat (limited to 'telephony/java/android/telephony/ServiceState.java')
-rw-r--r-- | telephony/java/android/telephony/ServiceState.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 06b5c26..48a40fa 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -120,6 +120,8 @@ public class ServiceState implements Parcelable { private int mSystemId; private int mCdmaRoamingIndicator; private int mCdmaDefaultRoamingIndicator; + private int mCdmaEriIconIndex; + private int mCdmaEriIconMode; /** * Create a new ServiceState from a intent notifier Bundle @@ -166,6 +168,8 @@ public class ServiceState implements Parcelable { mSystemId = s.mSystemId; mCdmaRoamingIndicator = s.mCdmaRoamingIndicator; mCdmaDefaultRoamingIndicator = s.mCdmaDefaultRoamingIndicator; + mCdmaEriIconIndex = s.mCdmaEriIconIndex; + mCdmaEriIconMode = s.mCdmaEriIconMode; } /** @@ -184,6 +188,8 @@ public class ServiceState implements Parcelable { mSystemId = in.readInt(); mCdmaRoamingIndicator = in.readInt(); mCdmaDefaultRoamingIndicator = in.readInt(); + mCdmaEriIconIndex = in.readInt(); + mCdmaEriIconMode = in.readInt(); } public void writeToParcel(Parcel out, int flags) { @@ -199,6 +205,8 @@ public class ServiceState implements Parcelable { out.writeInt(mSystemId); out.writeInt(mCdmaRoamingIndicator); out.writeInt(mCdmaDefaultRoamingIndicator); + out.writeInt(mCdmaEriIconIndex); + out.writeInt(mCdmaEriIconMode); } public int describeContents() { @@ -254,6 +262,20 @@ public class ServiceState implements Parcelable { } /** + * @hide + */ + public int getCdmaEriIconIndex() { + return this.mCdmaEriIconIndex; + } + + /** + * @hide + */ + public int getCdmaEriIconMode() { + return this.mCdmaEriIconMode; + } + + /** * Get current registered operator name in long alphanumeric format * * In GSM/UMTS, long format can be upto 16 characters long @@ -412,8 +434,11 @@ public class ServiceState implements Parcelable { mSystemId = -1; mCdmaRoamingIndicator = -1; mCdmaDefaultRoamingIndicator = -1; + mCdmaEriIconIndex = -1; + mCdmaEriIconMode = -1; } + // TODO - can't this be combined with the above func.. public void setStateOff() { mState = STATE_POWER_OFF; mRoaming = false; @@ -427,6 +452,8 @@ public class ServiceState implements Parcelable { mSystemId = -1; mCdmaRoamingIndicator = -1; mCdmaDefaultRoamingIndicator = -1; + mCdmaEriIconIndex = -1; + mCdmaEriIconMode = -1; } public void setState(int state) { @@ -451,6 +478,20 @@ public class ServiceState implements Parcelable { this.mCdmaDefaultRoamingIndicator = roaming; } + /** + * @hide + */ + public void setCdmaEriIconIndex(int index) { + this.mCdmaEriIconIndex = index; + } + + /** + * @hide + */ + public void setCdmaEriIconMode(int mode) { + this.mCdmaEriIconMode = mode; + } + public void setOperatorName(String longName, String shortName, String numeric) { mOperatorAlphaLong = longName; mOperatorAlphaShort = shortName; |