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

Commit 2d27fca5 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-43...

release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444 snap-temp-L17300000097872583

Change-Id: I45ea2da805c769313ae204c97e4218b02c73b95d
parents 3dd81d11 c0cfe7a5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -144,10 +144,12 @@ static const CommandOptions AS_ROOT_20 = CommandOptions::WithTimeout(20).AsRoot(
 * Returns a vector of dump fds under |dir_path| with a given |file_prefix|.
 * The returned vector is sorted by the mtimes of the dumps. If |limit_by_mtime|
 * is set, the vector only contains files that were written in the last 30 minutes.
 * If |limit_by_count| is set, the vector only contains the ten latest files.
 */
static std::vector<DumpData>* GetDumpFds(const std::string& dir_path,
                                         const std::string& file_prefix,
                                         bool limit_by_mtime) {
                                         bool limit_by_mtime,
                                         bool limit_by_count = true) {
    const time_t thirty_minutes_ago = ds.now_ - 60 * 30;

    std::unique_ptr<std::vector<DumpData>> dump_data(new std::vector<DumpData>());
@@ -190,6 +192,10 @@ static std::vector<DumpData>* GetDumpFds(const std::string& dir_path,

    std::sort(dump_data->begin(), dump_data->end());

    if (limit_by_count && dump_data->size() > 10) {
        dump_data->erase(dump_data->begin() + 10, dump_data->end());
    }

    return dump_data.release();
}

+0 −6
Original line number Diff line number Diff line
@@ -97,18 +97,12 @@ void ThermalServiceDaemon::getThermalHal() {
}

void ThermalServiceDaemon::thermalCallbackStartup() {
    status_t err;

    // HIDL IThermalCallback startup
    // Need at least 2 threads in thread pool since we wait for dead HAL
    // to come back on the binder death notification thread and we need
    // another thread for the incoming service now available call.
    configureRpcThreadpool(2, false /* callerWillJoin */);
    mThermalCallback = new ThermalCallback();
    err = mThermalCallback->registerAsService();
    ALOGE_IF(err != OK, "Cannot register %s: %d",
        IThermalCallback::descriptor, err);

    // Lookup Thermal HAL and register our ThermalCallback.
    getThermalHal();
}
Loading