Merge "Remove one foregrond service restriction." into rvc-dev am: af003c1009
Change-Id: I071f7899ab5ff5f5c482d9e562523231509d79c0
This commit is contained in:
@@ -1438,7 +1438,6 @@ public final class OomAdjuster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int capabilityFromFGS = 0; // capability from foreground service.
|
int capabilityFromFGS = 0; // capability from foreground service.
|
||||||
boolean procStateFromFGSClient = false;
|
|
||||||
for (int is = app.services.size() - 1;
|
for (int is = app.services.size() - 1;
|
||||||
is >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|
is >= 0 && (adj > ProcessList.FOREGROUND_APP_ADJ
|
||||||
|| schedGroup == ProcessList.SCHED_GROUP_BACKGROUND
|
|| schedGroup == ProcessList.SCHED_GROUP_BACKGROUND
|
||||||
@@ -1561,10 +1560,6 @@ public final class OomAdjuster {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clientProcState == PROCESS_STATE_FOREGROUND_SERVICE) {
|
|
||||||
procStateFromFGSClient = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cr.hasFlag(Context.BIND_INCLUDE_CAPABILITIES)) {
|
if (cr.hasFlag(Context.BIND_INCLUDE_CAPABILITIES)) {
|
||||||
capability |= client.curCapability;
|
capability |= client.curCapability;
|
||||||
}
|
}
|
||||||
@@ -2012,12 +2007,9 @@ public final class OomAdjuster {
|
|||||||
} else if (!ActivityManager.isProcStateBackground(procState)) {
|
} else if (!ActivityManager.isProcStateBackground(procState)) {
|
||||||
// procState higher than PROCESS_STATE_BOUND_FOREGROUND_SERVICE implicitly has
|
// procState higher than PROCESS_STATE_BOUND_FOREGROUND_SERVICE implicitly has
|
||||||
// camera/microphone capability
|
// camera/microphone capability
|
||||||
if (procState == PROCESS_STATE_FOREGROUND_SERVICE && procStateFromFGSClient) {
|
//TODO: remove this line when enforcing the feature.
|
||||||
// if the FGS state is passed down from client, do not grant implicit capabilities.
|
|
||||||
} else {
|
|
||||||
capability |= PROCESS_CAPABILITY_ALL_IMPLICIT;
|
capability |= PROCESS_CAPABILITY_ALL_IMPLICIT;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// TOP process has all capabilities.
|
// TOP process has all capabilities.
|
||||||
if (procState <= PROCESS_STATE_TOP) {
|
if (procState <= PROCESS_STATE_TOP) {
|
||||||
|
|||||||
Reference in New Issue
Block a user