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

Commit 5340687b authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Include IMS service state when determining GSM/CDMA Phone service state." into lmp-dev

parents 5b2302a7 e84571be
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -285,9 +285,22 @@ public class CDMAPhone extends PhoneBase {

    @Override
    public ServiceState getServiceState() {
        if (mSST == null || mSST.mSS.getState() != ServiceState.STATE_IN_SERVICE) {
            if (mImsPhone != null &&
                    mImsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
                return mImsPhone.getServiceState();
            }
        }

        if (mSST != null) {
            return mSST.mSS;
        } else {
            // avoid potential NPE in EmergencyCallHelper during Phone switch
            return new ServiceState();
        }
    }


    @Override
    public CallTracker getCallTracker() {
        return mCT;
+7 −0
Original line number Diff line number Diff line
@@ -290,6 +290,13 @@ public class GSMPhone extends PhoneBase {
    @Override
    public ServiceState
    getServiceState() {
        if (mSST == null || mSST.mSS.getState() != ServiceState.STATE_IN_SERVICE) {
            if (mImsPhone != null &&
                    mImsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
                return mImsPhone.getServiceState();
            }
        }

        if (mSST != null) {
            return mSST.mSS;
        } else {