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

Commit f0925cb9 authored by Roman Birg's avatar Roman Birg
Browse files

Subscription updater: don't turn data off if we've never set a deafult



In the case of an MSIM device that has only had 1 SIM and then you swap
the sim to another slot, the data will turn off, but it's the same SIM
and should not.

Ticket: CYNGNOS-3132
Change-Id: I77ed8c22663aa10d211e6f4de06b791c1a8f0971
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
(cherry picked from commit 90501cb1)
parent 525a40fa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -771,7 +771,11 @@ public class SubscriptionInfoUpdater extends Handler {
                            Settings.Global.MULTI_SIM_DATA_CALL_SUBSCRIPTION,
                            SubscriptionManager.INVALID_SUBSCRIPTION_ID);

                    if (realStoredDataSub != SubscriptionManager.getDefaultDataSubId()) {
                    if (realStoredDataSub != SubscriptionManager.INVALID_SUBSCRIPTION_ID &&
                            realStoredDataSub != SubscriptionManager.getDefaultDataSubId()) {
                        logd("switching data off; real stored sub: " + realStoredDataSub
                                + ", and we think the default sub id is now: "
                                + SubscriptionManager.getDefaultDataSubId());
                        PhoneFactory.getDefaultPhone().setDataEnabled(false);
                    }