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

Commit 713b4f65 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Parse -1 as WARNING_DISABLED in NetworkPolicyManager." into nyc-mr1-dev

parents 5db4e723 da71ca08
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1442,8 +1442,14 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
                + "; generating default policy");

        // Build default mobile policy, and assume usage cycle starts today
        final long warningBytes = mContext.getResources().getInteger(
                com.android.internal.R.integer.config_networkPolicyDefaultWarning) * MB_IN_BYTES;
        final int dataWarningConfig = mContext.getResources().getInteger(
                com.android.internal.R.integer.config_networkPolicyDefaultWarning);
        final long warningBytes;
        if (dataWarningConfig == WARNING_DISABLED) {
            warningBytes = WARNING_DISABLED;
        } else {
            warningBytes = dataWarningConfig * MB_IN_BYTES;
        }

        final Time time = new Time();
        time.setToNow();