dumpstate: change touch output data format

Bug: 144326854
Test: check bugreport output data
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: I0b240e1488a8319c9472a68bf82476b71614c881
This commit is contained in:
Super Liu
2020-06-08 13:53:34 +08:00
committed by Cyan_Hsieh
parent 9f4c9b3752
commit ac3ffc70ec

View File

@@ -404,6 +404,13 @@ static void DumpTouch(int fd) {
touch_spi_path, touch_spi_path);
RunCommandToFd(fd, "Force Touch Active", {"/vendor/bin/sh", "-c", cmd});
//Change data format from portrait to landscape
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"set_print_format,1",
touch_spi_path, touch_spi_path);
RunCommandToFd(fd, "Print Format", {"/vendor/bin/sh", "-c", cmd});
//Firmware info
snprintf(cmd, sizeof(cmd), "%s/fw_version", touch_spi_path);
DumpFileToFd(fd, "LSI firmware version", cmd);
@@ -475,6 +482,14 @@ static void DumpTouch(int fd) {
touch_spi_path, touch_spi_path);
RunCommandToFd(fd, "TYPE_NOI_P2P_MAX", {"/vendor/bin/sh", "-c", cmd});
//Change data format back to default(portrait)
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"set_print_format,0",
touch_spi_path, touch_spi_path);
RunCommandToFd(fd, "Print Format", {"/vendor/bin/sh", "-c", cmd});
//Disable: force touch active
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",