diff options
| author | 2015-11-25 17:07:47 -0800 | |
|---|---|---|
| committer | 2015-11-25 17:07:47 -0800 | |
| commit | 37c2839f70293d72b504cb0b84ad81d9419ad8bc (patch) | |
| tree | c859845d81674ce72d6f123f13ab0a7f4caa9479 | |
| parent | b6350870f007bed02fd3641fd2daa18467a71a2f (diff) | |
Promoting a function from Gsm/Cdma CellLocation classes to parent class
Bug: 25793157
Change-Id: Iee247ceb45df90aeba26c0b68471ef857284b245
3 files changed, 9 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java index f9a222f22640..5bcaa6e74531 100644 --- a/telephony/java/android/telephony/CellLocation.java +++ b/telephony/java/android/telephony/CellLocation.java @@ -81,6 +81,12 @@ public abstract class CellLocation { public abstract boolean isEmpty(); /** + * Invalidate this object. The location area code and the cell id are set to -1. + * @hide + */ + public abstract void setStateInvalid(); + + /** * Return a new CellLocation object representing an unknown * location, or null for unknown/none phone radio types. * diff --git a/telephony/java/android/telephony/cdma/CdmaCellLocation.java b/telephony/java/android/telephony/cdma/CdmaCellLocation.java index 6cfae6a79b4e..7c10569f3376 100644 --- a/telephony/java/android/telephony/cdma/CdmaCellLocation.java +++ b/telephony/java/android/telephony/cdma/CdmaCellLocation.java @@ -123,6 +123,7 @@ public class CdmaCellLocation extends CellLocation { /** * Invalidate this object. The cell location data is set to invalid values. */ + @Override public void setStateInvalid() { this.mBaseStationId = -1; this.mBaseStationLatitude = INVALID_LAT_LONG; @@ -134,7 +135,7 @@ public class CdmaCellLocation extends CellLocation { /** * Set the cell location data. */ - public void setCellLocationData(int baseStationId, int baseStationLatitude, + public void setCellLocationData(int baseStationId, int baseStationLatitude, int baseStationLongitude) { // The following values have to be written in the correct sequence this.mBaseStationId = baseStationId; diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java index a3889b223b52..171780239edf 100644 --- a/telephony/java/android/telephony/gsm/GsmCellLocation.java +++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java @@ -72,6 +72,7 @@ public class GsmCellLocation extends CellLocation { /** * Invalidate this object. The location area code and the cell id are set to -1. */ + @Override public void setStateInvalid() { mLac = -1; mCid = -1; |