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

Commit a44a1861 authored by Amit Mahajan's avatar Amit Mahajan Committed by Gerrit Code Review
Browse files

Merge "Fix isUnmeteredUseOnly check."

parents a8d6af4e b5f5961c
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -1310,15 +1310,13 @@ public class DataConnection extends StateMachine {
        }

        // If data is enabled, this data connection can't be for unmetered used only because
        // everyone should be able to use it.
        // everyone should be able to use it if:
        // 1. Device is not roaming, or
        // 2. Device is roaming and data roaming is turned on
        if (mPhone.getDataEnabledSettings().isDataEnabled()) {
            if (!mPhone.getServiceState().getDataRoaming() || mDct.getDataRoamingEnabled()) {
                return false;
            }

        // If the device is roaming and data roaming it turned on, then this data connection can't
        // be for unmetered use only.
        if (mDct.getDataRoamingEnabled() && mPhone.getServiceState().getDataRoaming()) {
            return false;
        }

        // The data connection can only be unmetered used only if all attached APN contexts