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

Commit 53cea237 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Rename Context.BIND_ALLOW_NETWORK_ACCESS.

Bug: 177641226
Test: treehugger
Change-Id: I12796e19e3d18450f332a410ec04bc1486727709
parent 5db986d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ public final class JobServiceContext implements ServiceConnection {
                if (job.shouldTreatAsExpeditedJob()) {
                    bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
                            | Context.BIND_ALMOST_PERCEPTIBLE
                            | Context.BIND_ALLOW_NETWORK_ACCESS
                            | Context.BIND_BYPASS_POWER_NETWORK_RESTRICTIONS
                            | Context.BIND_NOT_APP_COMPONENT_USAGE;
                } else {
                    bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ public abstract class Context {
     *
     * @hide
     */
    public static final int BIND_ALLOW_NETWORK_ACCESS = 0x00020000;
    public static final int BIND_BYPASS_POWER_NETWORK_RESTRICTIONS = 0x00020000;

    /**
     * Flag for {@link #bindService}: allow background foreground service starts from the bound
+2 −1
Original line number Diff line number Diff line
@@ -1997,7 +1997,8 @@ public final class OomAdjuster {
                        // in this case unless they explicitly request it.
                        if ((cstate.getCurCapability() & PROCESS_CAPABILITY_NETWORK) != 0) {
                            if (clientProcState <= PROCESS_STATE_BOUND_FOREGROUND_SERVICE) {
                                if ((cr.flags & Context.BIND_ALLOW_NETWORK_ACCESS) != 0) {
                                if ((cr.flags & Context.BIND_BYPASS_POWER_NETWORK_RESTRICTIONS)
                                        != 0) {
                                    capability |= PROCESS_CAPABILITY_NETWORK;
                                }
                            } else {