Promoting a function from Gsm/Cdma CellLocation classes to parent class

Bug: 25793157
Change-Id: Iee247ceb45df90aeba26c0b68471ef857284b245
This commit is contained in:
Amit Mahajan
2015-11-25 17:07:47 -08:00
parent b6350870f0
commit 37c2839f70
3 changed files with 9 additions and 1 deletions

View File

@@ -80,6 +80,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.

View File

@@ -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;

View File

@@ -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;