Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1a7dd7c authored by Gavin Corkery's avatar Gavin Corkery Committed by Automerger Merge Worker
Browse files

Merge "Increase meminfo dumpsys timeout" into sc-dev am: b058a604

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15243093

Change-Id: I195194ef9734a6e5ad3ab4be555e5254887e7cf4
parents 3a84371b b058a604
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1241,8 +1241,15 @@ static Dumpstate::RunStatus RunDumpsysTextByPriority(const std::string& title, i
        if (status == OK) {
            dumpsys.writeDumpHeader(STDOUT_FILENO, service, priority);
            std::chrono::duration<double> elapsed_seconds;
            if (priority == IServiceManager::DUMP_FLAG_PRIORITY_HIGH &&
                service == String16("meminfo")) {
                // Use a longer timeout for meminfo, since 30s is not always enough.
                status = dumpsys.writeDump(STDOUT_FILENO, service, 60s,
                                           /* as_proto = */ false, elapsed_seconds, bytes_written);
            } else {
                status = dumpsys.writeDump(STDOUT_FILENO, service, service_timeout,
                                           /* as_proto = */ false, elapsed_seconds, bytes_written);
            }
            dumpsys.writeDumpFooter(STDOUT_FILENO, service, elapsed_seconds);
            bool dump_complete = (status == OK);
            dumpsys.stopDumpThread(dump_complete);