diff options
author | jsh <jsh@google.com> | 2010-08-04 14:35:44 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-08-04 14:35:44 -0700 |
commit | 0b4e3ad356c6e4f2f4152d02de7a4dc395825bba (patch) | |
tree | b552a4a67c85c018d202acf0581f61decbc3db48 /telephony/java/android | |
parent | ac8e7060e09cc8eecc3f959691185bf156939404 (diff) | |
parent | 82cadee3ca830315c617dfdbf3a8eef207c58436 (diff) | |
download | frameworks_base-0b4e3ad356c6e4f2f4152d02de7a4dc395825bba.zip frameworks_base-0b4e3ad356c6e4f2f4152d02de7a4dc395825bba.tar.gz frameworks_base-0b4e3ad356c6e4f2f4152d02de7a4dc395825bba.tar.bz2 |
am 82cadee3: Merge "Add support for PSC of serving cell." into gingerbread
Merge commit '82cadee3ca830315c617dfdbf3a8eef207c58436' into gingerbread-plus-aosp
* commit '82cadee3ca830315c617dfdbf3a8eef207c58436':
Add support for PSC of serving cell.
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/gsm/GsmCellLocation.java | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java index fa1f985..c4204fa 100644 --- a/telephony/java/android/telephony/gsm/GsmCellLocation.java +++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java @@ -25,6 +25,7 @@ import android.telephony.CellLocation; public class GsmCellLocation extends CellLocation { private int mLac; private int mCid; + private int mPsc; /** * Empty constructor. Initializes the LAC and CID to -1. @@ -32,6 +33,7 @@ public class GsmCellLocation extends CellLocation { public GsmCellLocation() { mLac = -1; mCid = -1; + mPsc = -1; } /** @@ -40,6 +42,7 @@ public class GsmCellLocation extends CellLocation { public GsmCellLocation(Bundle bundle) { mLac = bundle.getInt("lac", mLac); mCid = bundle.getInt("cid", mCid); + mPsc = bundle.getInt("psc", mPsc); } /** @@ -57,11 +60,20 @@ public class GsmCellLocation extends CellLocation { } /** + * @return primary scrambling code for UMTS, -1 if unknown or GSM + * @hide + */ + public int getPsc() { + return mPsc; + } + + /** * Invalidate this object. The location area code and the cell id are set to -1. */ public void setStateInvalid() { mLac = -1; mCid = -1; + mPsc = -1; } /** @@ -72,6 +84,14 @@ public class GsmCellLocation extends CellLocation { mCid = cid; } + /** + * Set the primary scrambling code. + * @hide + */ + public void setPsc(int psc) { + mPsc = psc; + } + @Override public int hashCode() { return mLac ^ mCid; @@ -91,12 +111,13 @@ public class GsmCellLocation extends CellLocation { return false; } - return equalsHandlesNulls(mLac, s.mLac) && equalsHandlesNulls(mCid, s.mCid); + return equalsHandlesNulls(mLac, s.mLac) && equalsHandlesNulls(mCid, s.mCid) + && equalsHandlesNulls(mPsc, s.mPsc); } @Override public String toString() { - return "["+ mLac + "," + mCid + "]"; + return "["+ mLac + "," + mCid + "," + mPsc + "]"; } /** @@ -118,12 +139,13 @@ public class GsmCellLocation extends CellLocation { public void fillInNotifierBundle(Bundle m) { m.putInt("lac", mLac); m.putInt("cid", mCid); + m.putInt("psc", mPsc); } /** * @hide */ public boolean isEmpty() { - return (mLac == -1 && mCid == -1); + return (mLac == -1 && mCid == -1 && mPsc == -1); } } |