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

Commit b66f43a6 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "[Settings] Modified the return value." am: a25060af

Change-Id: Ifaceec53b56745c8f49382a89825055d61e9c596
parents 74642a98 a25060af
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -340,7 +340,10 @@ public class DataEnabledOverride {
    }

    /**
     * Set allowing mobile data during voice call.
     * Set allowing mobile data during voice call. This is used for allowing data on the non-default
     * data SIM. When a voice call is placed on the non-default data SIM on DSDS devices, users will
     * not be able to use mobile data. By calling this API, data will be temporarily enabled on the
     * non-default data SIM during the life cycle of the voice call.
     *
     * @param allow {@code true} if allowing using data during voice call, {@code false} if
     * disallowed.
+9 −2
Original line number Diff line number Diff line
@@ -264,16 +264,23 @@ public class DataEnabledSettings {
    }

    /**
     * Set allowing mobile data during voice call.
     * Set allowing mobile data during voice call. This is used for allowing data on the non-default
     * data SIM. When a voice call is placed on the non-default data SIM on DSDS devices, users will
     * not be able to use mobile data. By calling this API, data will be temporarily enabled on the
     * non-default data SIM during the life cycle of the voice call.
     *
     * @param allow {@code true} if allowing using data during voice call, {@code false} if
     * disallowed
     *
     * @return {@code false} if the setting is changed.
     * @return {@code true} if operation is successful. otherwise {@code false}.
     */
    public synchronized boolean setAllowDataDuringVoiceCall(boolean allow) {
        localLog("setAllowDataDuringVoiceCall", allow);
        if (allow == isDataAllowedInVoiceCall()) {
            return true;
        }
        mDataEnabledOverride.setDataAllowedInVoiceCall(allow);

        boolean changed = SubscriptionController.getInstance()
                .setDataEnabledOverrideRules(mPhone.getSubId(), mDataEnabledOverride.getRules());
        if (changed) {