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

Commit 2729c6f9 authored by Hall Liu's avatar Hall Liu
Browse files

Add methods to check if MMS is always allowed

Bug: 169367013
Test: atest TelephonyManagerTest
Change-Id: Iee25d5328fe68575bf3c9ff03d70720ebc22e8d4
Merged-In: Iee25d5328fe68575bf3c9ff03d70720ebc22e8d4
parent 694ea86d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -365,6 +365,10 @@ public class DataEnabledOverride {
        return mRules.contains(OVERRIDE_RULE_ALLOW_DATA_DURING_VOICE_CALL);
    }

    public boolean isMmsAlwaysAllowed() {
        return mRules.contains(OVERRIDE_RULE_ALWAYS_ALLOW_MMS);
    }

    private boolean canSatisfyAnyRule(@ApnType int apnType,
                                      @Condition int providedConditions) {
        for (OverrideRule rule : mRules) {
+4 −0
Original line number Diff line number Diff line
@@ -300,6 +300,10 @@ public class DataEnabledSettings {
        return mDataEnabledOverride.isDataAllowedInVoiceCall();
    }

    public synchronized boolean isMmsAlwaysAllowed() {
        return mDataEnabledOverride.isMmsAlwaysAllowed();
    }

    public synchronized void setPolicyDataEnabled(boolean enabled) {
        if (mPolicyDataEnabled != enabled) {
            localLog("PolicyDataEnabled", enabled);