Commit 71f11a59 authored by Jia's avatar Jia Committed by Commit Bot

[On-device adaptive brightness] Remove trailing whitespace.

This cl removes white space when we read ALS path and spec from command line.

Bug: 881215
Change-Id: I8a7373439793d0d3cd697c41ae882bbb10e7b455
Reviewed-on: https://chromium-review.googlesource.com/c/1328543
Commit-Queue: Jia Meng <jiameng@chromium.org>
Reviewed-by: default avatarDan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606765}
parent eaddcb28
......@@ -60,7 +60,7 @@ bool VerifyAlsConfig() {
}
const std::vector<base::StringPiece> num_steps = base::SplitStringPiece(
output, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
output, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
return num_steps.size() == 7;
}
......@@ -80,6 +80,8 @@ std::string GetAlsPath() {
return "";
}
base::TrimWhitespaceASCII(output, base::TRIM_ALL, &output);
if (exit_code != 0 || output.empty()) {
LOG(ERROR) << "Missing ambient light path";
return "";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment