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

Commit 4187c9ed authored by Malcolm Chen's avatar Malcolm Chen Committed by Automerger Merge Worker
Browse files

Don't send data enable change if subId is not valid. am: a33d5799 am: 3575c651 am: 649a6a73

Change-Id: Ib2002fa1421bcfab84024cd4ed611120098c4ec0
parents 05ac6fee 649a6a73
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -200,15 +200,19 @@ public class MultiSimSettingController extends Handler {
     * Notify MOBILE_DATA of a subscription is changed.
     */
    public void notifyUserDataEnabled(int subId, boolean enable) {
        if (SubscriptionManager.isValidSubscriptionId(subId)) {
            obtainMessage(EVENT_USER_DATA_ENABLED, subId, enable ? 1 : 0).sendToTarget();
        }
    }

    /**
     * Notify DATA_ROAMING of a subscription is changed.
     */
    public void notifyRoamingDataEnabled(int subId, boolean enable) {
        if (SubscriptionManager.isValidSubscriptionId(subId)) {
            obtainMessage(EVENT_ROAMING_DATA_ENABLED, subId, enable ? 1 : 0).sendToTarget();
        }
    }

    /**
     * Notify that, for the first time after boot, SIMs are initialized.