Merge "Rename Context.BIND_ALLOW_NETWORK_ACCESS." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ef688bbdf5
@@ -280,7 +280,7 @@ public final class JobServiceContext implements ServiceConnection {
|
|||||||
if (job.shouldTreatAsExpeditedJob()) {
|
if (job.shouldTreatAsExpeditedJob()) {
|
||||||
bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
|
bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
|
||||||
| Context.BIND_ALMOST_PERCEPTIBLE
|
| Context.BIND_ALMOST_PERCEPTIBLE
|
||||||
| Context.BIND_ALLOW_NETWORK_ACCESS
|
| Context.BIND_BYPASS_POWER_NETWORK_RESTRICTIONS
|
||||||
| Context.BIND_NOT_APP_COMPONENT_USAGE;
|
| Context.BIND_NOT_APP_COMPONENT_USAGE;
|
||||||
} else {
|
} else {
|
||||||
bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
|
bindFlags = Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ public abstract class Context {
|
|||||||
*
|
*
|
||||||
* @hide
|
* @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
|
* Flag for {@link #bindService}: allow background foreground service starts from the bound
|
||||||
|
|||||||
@@ -1997,7 +1997,8 @@ public final class OomAdjuster {
|
|||||||
// in this case unless they explicitly request it.
|
// in this case unless they explicitly request it.
|
||||||
if ((cstate.getCurCapability() & PROCESS_CAPABILITY_NETWORK) != 0) {
|
if ((cstate.getCurCapability() & PROCESS_CAPABILITY_NETWORK) != 0) {
|
||||||
if (clientProcState <= PROCESS_STATE_BOUND_FOREGROUND_SERVICE) {
|
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;
|
capability |= PROCESS_CAPABILITY_NETWORK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user