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

Commit 4168656e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MSIM: Backup preferred data subId only if DDS switch manually"

parents 3d36b795 0d8d0960
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -558,12 +558,16 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
            public boolean onItemSelected(int pos, Object value) {
                final long subId = value == null ? 0 : ((SubInfoRecord)value).subId;

                Log.d(TAG,"calling setCallback: " + simPref.getKey() + "subId: " + subId);
                Log.d(TAG,"calling setCallback: " + simPref.getKey() + "subId: " + subId +
                        " defaultSubId: " + SubscriptionManager.getDefaultDataSubId());
                if (simPref.getKey().equals(KEY_CELLULAR_DATA)) {
                    if (SubscriptionManager.getDefaultDataSubId() != subId) {
                        SubscriptionManager.setDefaultDataSubId(subId);
                        Log.d(TAG,"subAvailableSize: "+ subAvailableSize);
                        if(subAvailableSize > 1) {
                            setUserPrefDataSubIdInDb(subId);
                        }
                   }
                } else if (simPref.getKey().equals(KEY_CALLS)) {
                    //subId 0 is meant for "Ask First"/"Prompt" option as per AOSP
                    if (subId == 0) {