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

Commit 7e3260e3 authored by Junda Liu's avatar Junda Liu
Browse files

Add logging to check cdma subscription source.

Bug: b/17935642
Change-Id: I8e3d7d14288d01ead0cad92bf8269aae5f5de518
parent e3dbfb6b
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;
    }