gps: Reduce gps log in bugreport

Since the lhd traffic log is disabled, currently the GPS log in
bugreport can record ~45 min ( (1.5 min per file) * 30 ) GPS track,
which is 15 min longer than expected.

To get smaller bugreport, we reduce the log count to 20.
(~= 30 min GPS track)

Bug: 200916523
Test: adb bugreport and check gps log count
Change-Id: Ic3969949968a30a77a4c6092eeea73d5053f906b
This commit is contained in:
Shinru Han 2021-09-24 18:40:56 +08:00
parent 16610baab7
commit bd41d508db

View file

@ -195,7 +195,7 @@ void dumpGpsLogs(int fd, std::string destDir) {
const std::string gpsLogDir = GPS_LOG_DIRECTORY;
const std::string gpsTmpLogDir = gpsLogDir + "/.tmp";
const std::string gpsDestDir = destDir + "/gps";
int maxFileNum = android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 30);
int maxFileNum = android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
RunCommandToFd(fd, "MKDIR GPS LOG", {"/vendor/bin/mkdir", "-p", gpsDestDir.c_str()},
CommandOptions::WithTimeout(2).Build());