Loading telephony/java/android/telephony/NeighboringCellInfo.java +38 −5 Original line number Diff line number Diff line Loading @@ -16,16 +16,16 @@ package android.telephony; import android.os.Parcel; import android.os.Parcelable; import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN; import static android.telephony.TelephonyManager.NETWORK_TYPE_EDGE; import static android.telephony.TelephonyManager.NETWORK_TYPE_GPRS; import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS; import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN; import android.os.Parcel; import android.os.Parcelable; /** Loading Loading @@ -100,6 +100,39 @@ public class NeighboringCellInfo implements Parcelable mCid = cid; } /** @hide */ public NeighboringCellInfo(final CellInfoGsm info) { mNetworkType = TelephonyManager.NETWORK_TYPE_GPRS; mRssi = info.getCellSignalStrength().getAsuLevel(); if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI; mLac = info.getCellIdentity().getLac(); if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID; mCid = info.getCellIdentity().getCid(); if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID; mPsc = UNKNOWN_CID; } /** @hide */ public NeighboringCellInfo(final CellInfoWcdma info) { mNetworkType = TelephonyManager.NETWORK_TYPE_UMTS; mRssi = info.getCellSignalStrength().getAsuLevel(); if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI; mLac = info.getCellIdentity().getLac(); if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID; mCid = info.getCellIdentity().getCid(); if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID; mPsc = info.getCellIdentity().getPsc(); if (mPsc == Integer.MAX_VALUE) mPsc = UNKNOWN_CID; } /** * Initialize the object from rssi, location string, and radioType * radioType is one of following Loading telephony/java/android/telephony/TelephonyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1544,7 +1544,7 @@ public class TelephonyManager { * @return List of NeighboringCellInfo or null if info unavailable. * * @deprecated Use {@link #getAllCellInfo} which returns a superset of the information * from NeighboringCellInfo. * from NeighboringCellInfo, including LTE cell information. */ @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) Loading Loading
telephony/java/android/telephony/NeighboringCellInfo.java +38 −5 Original line number Diff line number Diff line Loading @@ -16,16 +16,16 @@ package android.telephony; import android.os.Parcel; import android.os.Parcelable; import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN; import static android.telephony.TelephonyManager.NETWORK_TYPE_EDGE; import static android.telephony.TelephonyManager.NETWORK_TYPE_GPRS; import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA; import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS; import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN; import android.os.Parcel; import android.os.Parcelable; /** Loading Loading @@ -100,6 +100,39 @@ public class NeighboringCellInfo implements Parcelable mCid = cid; } /** @hide */ public NeighboringCellInfo(final CellInfoGsm info) { mNetworkType = TelephonyManager.NETWORK_TYPE_GPRS; mRssi = info.getCellSignalStrength().getAsuLevel(); if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI; mLac = info.getCellIdentity().getLac(); if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID; mCid = info.getCellIdentity().getCid(); if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID; mPsc = UNKNOWN_CID; } /** @hide */ public NeighboringCellInfo(final CellInfoWcdma info) { mNetworkType = TelephonyManager.NETWORK_TYPE_UMTS; mRssi = info.getCellSignalStrength().getAsuLevel(); if (mRssi == Integer.MAX_VALUE) mRssi = UNKNOWN_RSSI; mLac = info.getCellIdentity().getLac(); if (mLac == Integer.MAX_VALUE) mLac = UNKNOWN_CID; mCid = info.getCellIdentity().getCid(); if (mCid == Integer.MAX_VALUE) mCid = UNKNOWN_CID; mPsc = info.getCellIdentity().getPsc(); if (mPsc == Integer.MAX_VALUE) mPsc = UNKNOWN_CID; } /** * Initialize the object from rssi, location string, and radioType * radioType is one of following Loading
telephony/java/android/telephony/TelephonyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1544,7 +1544,7 @@ public class TelephonyManager { * @return List of NeighboringCellInfo or null if info unavailable. * * @deprecated Use {@link #getAllCellInfo} which returns a superset of the information * from NeighboringCellInfo. * from NeighboringCellInfo, including LTE cell information. */ @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) Loading