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

Commit 8daf6380 authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Revert "Don't assume 3GPP as active app on CDMA with LTE device"" into oc-mr1-dev

parents e5fd3f20 fedc3ad8
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -167,17 +167,31 @@ public class IccCardProxy extends Handler implements IccCard {
     */
    private void updateQuietMode() {
        synchronized (mLock) {
            boolean oldQuietMode = mQuietMode;
            boolean newQuietMode;
            int cdmaSource = Phone.CDMA_SUBSCRIPTION_UNKNOWN;
            boolean isLteOnCdmaMode = TelephonyManager.getLteOnCdmaModeStatic()
                    == PhoneConstants.LTE_ON_CDMA_TRUE;
            if (mCurrentAppType == UiccController.APP_FAM_3GPP) {
                newQuietMode = false;
                if (DBG) log("updateQuietMode: 3GPP subscription -> newQuietMode=" + newQuietMode);
            } else {
                if (isLteOnCdmaMode) {
                    log("updateQuietMode: is cdma/lte device, force IccCardProxy into 3gpp mode");
                    mCurrentAppType = UiccController.APP_FAM_3GPP;
                }
                cdmaSource = mCdmaSSM != null ?
                        mCdmaSSM.getCdmaSubscriptionSource() : Phone.CDMA_SUBSCRIPTION_UNKNOWN;

                newQuietMode = (cdmaSource == Phone.CDMA_SUBSCRIPTION_NV)
                        && (mCurrentAppType == UiccController.APP_FAM_3GPP2);
                        && (mCurrentAppType == UiccController.APP_FAM_3GPP2)
                        && !isLteOnCdmaMode;
                if (DBG) {
                    log("updateQuietMode: cdmaSource=" + cdmaSource
                            + " mCurrentAppType=" + mCurrentAppType
                            + " isLteOnCdmaMode=" + isLteOnCdmaMode
                            + " newQuietMode=" + newQuietMode);
                }
            }

            if (mQuietMode == false && newQuietMode == true) {
@@ -198,7 +212,8 @@ public class IccCardProxy extends Handler implements IccCard {
            }
            if (DBG) {
                log("updateQuietMode: QuietMode is " + mQuietMode + " (app_type="
                    + mCurrentAppType + " cdmaSource=" + cdmaSource + ")");
                    + mCurrentAppType + " isLteOnCdmaMode=" + isLteOnCdmaMode
                    + " cdmaSource=" + cdmaSource + ")");
            }
            mInitialized = true;
            sendMessage(obtainMessage(EVENT_ICC_CHANGED));