diff options
| author | 2017-12-20 18:09:09 +0900 | |
|---|---|---|
| committer | 2018-01-25 08:51:06 +0000 | |
| commit | 47f644e774a13c81bf8bda5166e65cd5c5171ef3 (patch) | |
| tree | c9c8bfec1e0ace62e63654412fc251e2a03a26c1 | |
| parent | ced274e88d1232fd9f886a2a191ae4cf88481b03 (diff) | |
dumpstate: disable vibration when -q option is set
Current dumpstate -q option is valid only for start timing
but end timing is not cared
It should disable the vibration for both case
Change-Id: Ia3cee01771c85a9ad4fa4b79084c072aa5d12dd0
| -rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 51942dd483..a641dbb9db 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1365,7 +1365,7 @@ static void ShowUsageAndExit(int exitCode = 1) { " -p: capture screenshot to filename.png (requires -o)\n" " -z: generate zipped file (requires -o)\n" " -s: write output to control socket (for init)\n" - " -S: write file location to control socket (for init; requires -o and -z)" + " -S: write file location to control socket (for init; requires -o and -z)\n" " -q: disable vibrate\n" " -B: send broadcast when finished (requires -o)\n" " -P: send broadcast when started and update system properties on " @@ -1941,9 +1941,11 @@ int main(int argc, char *argv[]) { } /* vibrate a few but shortly times to let user know it's finished */ - for (int i = 0; i < 3; i++) { - Vibrate(75); - usleep((75 + 50) * 1000); + if (do_vibrate) { + for (int i = 0; i < 3; i++) { + Vibrate(75); + usleep((75 + 50) * 1000); + } } /* tell activity manager we're done */ |