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

Commit 96f1e8d7 authored by fenglu's avatar fenglu Committed by Android Partner Code Review
Browse files

Merge "LCE feature enhancement" into m-wireless-dev

parents f36c0f3c 8b2f761d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2048,4 +2048,9 @@ public interface Phone {
     * @return {@code true} if video call is present, false otherwise.
     */
    public boolean isVideoCallPresent();

    /**
     * Returns the status of Link Capacity Estimation (LCE) service.
     */
    public int getLceStatus();
}
+12 −0
Original line number Diff line number Diff line
@@ -2365,10 +2365,22 @@ public abstract class PhoneBase extends Handler implements Phone {
        return false;
    }

    @Override
    public int getLceStatus() {
        return mLceStatus;
    }

    /**
     * Starts LCE service after radio becomes available.
     * LCE service state may get destroyed on the modem when radio becomes unavailable.
     */
    public void startLceAfterRadioIsAvailable() {
        if (mIsTheCurrentActivePhone) {
            mCi.startLceService(DEFAULT_REPORT_INTERVAL_MS, LCE_PULL_MODE,
                obtainMessage(EVENT_CONFIG_LCE));
        }
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("PhoneBase: subId=" + getSubId());
        pw.println(" mPhoneId=" + mPhoneId);
+8 −0
Original line number Diff line number Diff line
@@ -1550,6 +1550,14 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.isVideoEnabled();
    }

    /**
     * Returns the status of Link Capacity Estimation (LCE) service.
     */
    @Override
    public int getLceStatus() {
        return mActivePhone.getLceStatus();
    }

    /**
     * @return true if we are in the emergency call back mode. This is a period where
     * the phone should be using as little power as possible and be ready to receive an
+1 −0
Original line number Diff line number Diff line
@@ -1199,6 +1199,7 @@ public class CDMAPhone extends PhoneBase {

                mCi.getDeviceIdentity(obtainMessage(EVENT_GET_DEVICE_IDENTITY_DONE));
                mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY));
                startLceAfterRadioIsAvailable();
            }
            break;

+1 −0
Original line number Diff line number Diff line
@@ -1437,6 +1437,7 @@ public class GSMPhone extends PhoneBase {
                mCi.getIMEI(obtainMessage(EVENT_GET_IMEI_DONE));
                mCi.getIMEISV(obtainMessage(EVENT_GET_IMEISV_DONE));
                mCi.getRadioCapability(obtainMessage(EVENT_GET_RADIO_CAPABILITY));
                startLceAfterRadioIsAvailable();
            }
            break;