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

Commit ff8e7622 authored by Rhed Jao's avatar Rhed Jao Committed by Automerger Merge Worker
Browse files

Deletes temporary files from thread pool when report is cancel am: e96bcd52...

Deletes temporary files from thread pool when report is cancel am: e96bcd52 am: a6b7489d am: d85153fc

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

Change-Id: I52438ab164e7198e70e67d4898b404040d4832e4
parents 75110133 d85153fc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -100,6 +100,10 @@ void DumpPool::waitForTask(const std::string& task_name, const std::string& titl
    }
}

void DumpPool::deleteTempFiles() {
    deleteTempFiles(tmp_root_);
}

void DumpPool::setLogDuration(bool log_duration) {
    log_duration_ = log_duration;
}
+5 −0
Original line number Diff line number Diff line
@@ -134,6 +134,11 @@ class DumpPool {
     */
    void waitForTask(const std::string& task_name, const std::string& title, int out_fd);

    /*
     * Deletes temporary files created by DumpPool.
     */
    void deleteTempFiles();

    static const std::string PREFIX_TMPFILE_NAME;

  private:
+9 −0
Original line number Diff line number Diff line
@@ -2689,6 +2689,15 @@ void Dumpstate::Cancel() {
    }
    tombstone_data_.clear();
    anr_data_.clear();

    // Instead of shutdown the pool, we delete temporary files directly since
    // shutdown blocking the call.
    if (dump_pool_) {
        dump_pool_->deleteTempFiles();
    }
    if (zip_entry_tasks_) {
        zip_entry_tasks_->run(/*do_cancel =*/ true);
    }
}

/*