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

Commit 048dee57 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Log the service component name in the service_request_event_reported"

parents ccbab300 96d8935a
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1272,7 +1272,8 @@ public final class ActiveServices {
                : (wasStartRequested || !r.getConnections().isEmpty()
                ? SERVICE_REQUEST_EVENT_REPORTED__PROC_START_TYPE__PROCESS_START_TYPE_HOT
                : SERVICE_REQUEST_EVENT_REPORTED__PROC_START_TYPE__PROCESS_START_TYPE_WARM),
                getShortProcessNameForStats(callingUid, callingProcessName));
                getShortProcessNameForStats(callingUid, callingProcessName),
                getShortServiceNameForStats(r));

        if (r.startRequested && addToStarting) {
            boolean first = smap.mStartingBackground.size() == 0;
@@ -1311,6 +1312,11 @@ public final class ActiveServices {
        return processName;
    }

    private @Nullable String getShortServiceNameForStats(@NonNull ServiceRecord r) {
        final ComponentName cn = r.getComponentName();
        return cn != null ? cn.getShortClassName() : null;
    }

    private void stopServiceLocked(ServiceRecord service, boolean enqueueOomAdj) {
        try {
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "stopServiceLocked()");
@@ -3488,7 +3494,8 @@ public final class ActiveServices {
                    : (wasStartRequested || hadConnections
                    ? SERVICE_REQUEST_EVENT_REPORTED__PROC_START_TYPE__PROCESS_START_TYPE_HOT
                    : SERVICE_REQUEST_EVENT_REPORTED__PROC_START_TYPE__PROCESS_START_TYPE_WARM),
                    getShortProcessNameForStats(callingUid, callerApp.processName));
                    getShortProcessNameForStats(callingUid, callerApp.processName),
                    getShortServiceNameForStats(s));

            if (DEBUG_SERVICE) Slog.v(TAG_SERVICE, "Bind " + s + " with " + b
                    + ": received=" + b.intent.received