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

Commit 4932ebda authored by Junda Liu's avatar Junda Liu Committed by Android (Google) Code Review
Browse files

Merge "Add logging to check cdma subscription source." into lmp-mr1-dev

parents d0700efd 7e3260e3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -269,6 +269,8 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        Settings.Global.putInt(mPhone.getContext().getContentResolver(),
                Settings.Global.CDMA_SUBSCRIPTION_MODE,
                source );
        log("Read from settings: " + Settings.Global.getInt(mPhone.getContext().getContentResolver(),
                    Settings.Global.CDMA_SUBSCRIPTION_MODE, -1));
    }

    private void getSubscriptionInfoAndStartPollingThreads() {
@@ -533,6 +535,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        log("Subscription Source : " + newSubscriptionSource);
        mIsSubscriptionFromRuim =
            (newSubscriptionSource == CdmaSubscriptionSourceManager.SUBSCRIPTION_FROM_RUIM);
        log("isFromRuim: " + mIsSubscriptionFromRuim);
        saveCdmaSubscriptionSource(newSubscriptionSource);
        if (!mIsSubscriptionFromRuim) {
            // NV is ready when subscription source is NV
+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ public class CdmaSubscriptionSourceManager extends Handler {
        mCi.registerForCdmaSubscriptionChanged(this, EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, null);
        mCi.registerForOn(this, EVENT_RADIO_ON, null);
        int subscriptionSource = getDefault(context);
        log("cdmaSSM constructor: " + subscriptionSource);
        mCdmaSubscriptionSource.set(subscriptionSource);
        mCi.registerForSubscriptionStatusChanged(this, EVENT_SUBSCRIPTION_STATUS_CHANGED, null);
    }
@@ -150,6 +151,7 @@ public class CdmaSubscriptionSourceManager extends Handler {
     * @return CDMA subscription source value
     */
    public int getCdmaSubscriptionSource() {
        log("getcdmasubscriptionSource: " + mCdmaSubscriptionSource.get());
        return mCdmaSubscriptionSource.get();
    }

@@ -162,6 +164,7 @@ public class CdmaSubscriptionSourceManager extends Handler {
        // Get the default value from the Settings
        int subscriptionSource = Settings.Global.getInt(context.getContentResolver(),
                Settings.Global.CDMA_SUBSCRIPTION_MODE, PREFERRED_CDMA_SUBSCRIPTION);
        Rlog.d(LOG_TAG, "subscriptionSource from settings: " + subscriptionSource);
        return subscriptionSource;
    }