Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99ced9d authored by Nathan Harold's avatar Nathan Harold Committed by Gerrit Code Review
Browse files

Merge "Access Identity and SignalStrength from CellInfo"

parents 36ce625c 7b3f7a44
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.telephony;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;

@@ -124,6 +125,14 @@ public abstract class CellInfo implements Parcelable {
        mTimeStamp = timeStamp;
    }

    /** @hide */
    @NonNull
    public abstract CellIdentity getCellIdentity();

    /** @hide */
    @NonNull
    public abstract CellSignalStrength getCellSignalStrength();

    /**
     * Gets the connection status of this cell.
     *
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public final class CellInfoCdma extends CellInfo implements Parcelable {
        this.mCellSignalStrengthCdma = ci.mCellSignalStrengthCdma.copy();
    }

    @Override
    public CellIdentityCdma getCellIdentity() {
        return mCellIdentityCdma;
    }
@@ -53,6 +54,7 @@ public final class CellInfoCdma extends CellInfo implements Parcelable {
        mCellIdentityCdma = cid;
    }

    @Override
    public CellSignalStrengthCdma getCellSignalStrength() {
        return mCellSignalStrengthCdma;
    }
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public final class CellInfoGsm extends CellInfo implements Parcelable {
        this.mCellSignalStrengthGsm = ci.mCellSignalStrengthGsm.copy();
    }

    @Override
    public CellIdentityGsm getCellIdentity() {
        return mCellIdentityGsm;
    }
@@ -53,6 +54,7 @@ public final class CellInfoGsm extends CellInfo implements Parcelable {
        mCellIdentityGsm = cid;
    }

    @Override
    public CellSignalStrengthGsm getCellSignalStrength() {
        return mCellSignalStrengthGsm;
    }
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public final class CellInfoLte extends CellInfo implements Parcelable {
        this.mCellSignalStrengthLte = ci.mCellSignalStrengthLte.copy();
    }

    @Override
    public CellIdentityLte getCellIdentity() {
        if (DBG) log("getCellIdentity: " + mCellIdentityLte);
        return mCellIdentityLte;
@@ -55,6 +56,7 @@ public final class CellInfoLte extends CellInfo implements Parcelable {
        mCellIdentityLte = cid;
    }

    @Override
    public CellSignalStrengthLte getCellSignalStrength() {
        if (DBG) log("getCellSignalStrength: " + mCellSignalStrengthLte);
        return mCellSignalStrengthLte;
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ public final class CellInfoTdscdma extends CellInfo implements Parcelable {
        this.mCellSignalStrengthTdscdma = ci.mCellSignalStrengthTdscdma.copy();
    }

    @Override
    public CellIdentityTdscdma getCellIdentity() {
        return mCellIdentityTdscdma;
    }
@@ -56,6 +57,7 @@ public final class CellInfoTdscdma extends CellInfo implements Parcelable {
        mCellIdentityTdscdma = cid;
    }

    @Override
    public CellSignalStrengthTdscdma getCellSignalStrength() {
        return mCellSignalStrengthTdscdma;
    }
Loading