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

Commit fe945d18 authored by Howard Ro's avatar Howard Ro Committed by Android (Google) Code Review
Browse files

Merge "Resolve segfault when running send-broadcast command while...

Merge "Resolve segfault when running send-broadcast command while statscompanion service is not connected"
parents 834e4084 4d889e63
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -320,9 +320,15 @@ status_t StatsService::cmd_trigger_broadcast(FILE* out, Vector<String8>& args) {
        return UNKNOWN_ERROR;
    }
    auto receiver = mConfigManager->GetConfigReceiver(ConfigKey(uid, name));
    auto sc = getStatsCompanionService();
    sp<IStatsCompanionService> sc = getStatsCompanionService();
    if (sc != nullptr) {
        sc->sendBroadcast(String16(receiver.first.c_str()), String16(receiver.second.c_str()));
    ALOGD("StatsService::trigger broadcast succeeded to %s, %s", args[1].c_str(), args[2].c_str());
        ALOGD("StatsService::trigger broadcast succeeded to %s, %s", args[1].c_str(),
              args[2].c_str());
    } else {
        ALOGD("Could not access statsCompanion");
    }

    return NO_ERROR;
}