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

Commit f581d088 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
Merged-In: I47a7b11f5f5167bcdce39f647c3a6424cd10fb44
parent be2a0894
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2349,8 +2349,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);
        }
@@ -2380,8 +2384,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);
        }