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

Commit b574fca2 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Update threshold state used for deciding if the app is in foreground."

parents 16162138 74aec848
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.os.RemoteException;
import android.os.UserHandle;
import android.telephony.SubscriptionPlan;
import android.util.DebugUtils;
import android.util.Pair;

@@ -329,7 +328,7 @@ public class NetworkPolicyManager {
     * to access network when the device is idle or in battery saver mode. Otherwise, false.
     */
    public static boolean isProcStateAllowedWhileIdleOrPowerSaveMode(int procState) {
        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
        return procState <= ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
    }

    /**
@@ -337,7 +336,7 @@ public class NetworkPolicyManager {
     * to access network when the device is in data saver mode. Otherwise, false.
     */
    public static boolean isProcStateAllowedWhileOnRestrictBackground(int procState) {
        return procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
        return procState <= ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
    }

    public static String resolveNetworkId(WifiConfiguration config) {