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

Commit 9b364b6c authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

Notify SubscriptionInfo change when setOpportunistic or setMetered

Bug: 121396526
Test: manual
Change-Id: I47a7b11f5f5167bcdce39f647c3a6424cd10fb44
parent 60aa3c07
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2308,8 +2308,12 @@ public class SubscriptionController extends ISub.Stub {

        long token = Binder.clearCallingIdentity();
        try {
            return setSubscriptionProperty(subId, SubscriptionManager.IS_OPPORTUNISTIC,
            int ret = setSubscriptionProperty(subId, SubscriptionManager.IS_OPPORTUNISTIC,
                    String.valueOf(opportunistic ? 1 : 0));

            if (ret != 0) notifySubscriptionInfoChanged();

            return ret;
        } finally {
            Binder.restoreCallingIdentity(token);
        }
@@ -2339,8 +2343,12 @@ public class SubscriptionController extends ISub.Stub {

        long token = Binder.clearCallingIdentity();
        try {
            return setSubscriptionProperty(subId, SubscriptionManager.IS_METERED,
            int ret = setSubscriptionProperty(subId, SubscriptionManager.IS_METERED,
                    String.valueOf(isMetered ? 1 : 0));

            if (ret != 0) notifySubscriptionInfoChanged();

            return ret;
        } finally {
            Binder.restoreCallingIdentity(token);
        }