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

Commit 86ec41e2 authored by Olivier Gaillard's avatar Olivier Gaillard Committed by Android (Google) Code Review
Browse files

Merge "Do not pull data if the local service is not initialized."

parents a8042d0f 44a60a99
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -898,6 +898,10 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
    private void pullBinderCallsStats(int tagId, List<StatsLogEventWrapper> pulledData) {
        BinderCallsStatsService.Internal binderStats =
                LocalServices.getService(BinderCallsStatsService.Internal.class);
        if (binderStats == null) {
            return;
        }

        List<ExportedCallStat> callStats = binderStats.getExportedCallStats();
        long elapsedNanos = SystemClock.elapsedRealtimeNanos();
        for (ExportedCallStat callStat : callStats) {
@@ -922,6 +926,10 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
    private void pullBinderCallsStatsExceptions(int tagId, List<StatsLogEventWrapper> pulledData) {
        BinderCallsStatsService.Internal binderStats =
                LocalServices.getService(BinderCallsStatsService.Internal.class);
        if (binderStats == null) {
            return;
        }

        ArrayMap<String, Integer> exceptionStats = binderStats.getExportedExceptionStats();
        long elapsedNanos = SystemClock.elapsedRealtimeNanos();
        for (Entry<String, Integer> entry : exceptionStats.entrySet()) {