Merge "fix swapped min / max in priority parsing"

This commit is contained in:
Treehugger Robot 2016-11-13 04:44:43 +00:00 committed by Gerrit Code Review
commit 557359863c

View file

@ -357,8 +357,8 @@ bool Service::ParseGroup(const std::vector<std::string>& args, std::string* err)
bool Service::ParsePriority(const std::vector<std::string>& args, std::string* err) {
priority_ = 0;
if (!ParseInt(args[1], &priority_,
static_cast<int>(ANDROID_PRIORITY_LOWEST),
static_cast<int>(ANDROID_PRIORITY_HIGHEST))) {
static_cast<int>(ANDROID_PRIORITY_HIGHEST), // highest is negative
static_cast<int>(ANDROID_PRIORITY_LOWEST))) {
*err = StringPrintf("process priority value must be range %d - %d",
ANDROID_PRIORITY_HIGHEST, ANDROID_PRIORITY_LOWEST);
return false;