From ef9bf465647404bd9b0c00e446a7faec2eef45a3 Mon Sep 17 00:00:00 2001 From: davidycchen Date: Mon, 3 Feb 2020 10:46:58 +0800 Subject: [PATCH] sunfish:dumpstate: change the order of touch information Change touch ITO test to the last test item because ITO test will trigger touch hardware reset which may affect the rawdata value of other test items. Test: trigger bugreport and check the touch information is correct in dumpstate. Bug: 147336072 Change-Id: Ie9d5c98d6dac3d8dc80ef9a494884eab272f64cc Signed-off-by: davidycchen --- dumpstate/DumpstateDevice.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index 79d2ecac..36e0040e 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -268,12 +268,6 @@ static void DumpTouch(int fd) { "echo 15 00 > %s/stm_fts_cmd && cat %s/stm_fts_cmd", touch_spi_path, touch_spi_path); RunCommandToFd(fd, "Self Raw", {"/vendor/bin/sh", "-c", cmd}); - - // ITO raw data - snprintf(cmd, sizeof(cmd), - "echo 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd", - touch_spi_path, touch_spi_path); - RunCommandToFd(fd, "ITO Raw", {"/vendor/bin/sh", "-c", cmd}); } if (!access("/proc/fts/driver_test", R_OK)) { @@ -314,6 +308,15 @@ static void DumpTouch(int fd) { "echo 34 > /proc/fts/driver_test && " "cat /proc/fts/driver_test"}); } + + snprintf(cmd, sizeof(cmd), "%s/stm_fts_cmd", touch_spi_path); + if (!access(cmd, R_OK)) { + // ITO raw data + snprintf(cmd, sizeof(cmd), + "echo 01 > %s/stm_fts_cmd && cat %s/stm_fts_cmd", + touch_spi_path, touch_spi_path); + RunCommandToFd(fd, "ITO Raw", {"/vendor/bin/sh", "-c", cmd}); + } } static void DumpDisplay(int fd) {