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

Commit 5aabe6bd authored by Kevin Jeon's avatar Kevin Jeon Committed by Android (Google) Code Review
Browse files

Merge "Remove code related to stolen trace sessions" into aosp-main-future

parents 6ee0eb75 b738940c
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -76,8 +76,6 @@ public class TracingServiceProxy extends SystemService {
    // Keep this in sync with the definitions in TraceService
    private static final String INTENT_ACTION_NOTIFY_SESSION_STOPPED =
            "com.android.traceur.NOTIFY_SESSION_STOPPED";
    private static final String INTENT_ACTION_NOTIFY_SESSION_STOLEN =
            "com.android.traceur.NOTIFY_SESSION_STOLEN";

    private static final int REPORT_BEGIN =
            TRACING_SERVICE_REPORT_EVENT__EVENT__TRACING_SERVICE_REPORT_BEGIN;
@@ -97,13 +95,12 @@ public class TracingServiceProxy extends SystemService {

    private final ITracingServiceProxy.Stub mTracingServiceProxy = new ITracingServiceProxy.Stub() {
        /**
         * Notifies system tracing app that a tracing session has ended. If a session is repurposed
         * for use in a bugreport, sessionStolen can be set to indicate that tracing has ended but
         * there is no buffer available to dump.
         * Notifies system tracing app that a tracing session has ended. sessionStolen is ignored,
         * as trace sessions are no longer stolen and are always cloned instead.
         */
        @Override
        public void notifyTraceSessionEnded(boolean sessionStolen) {
            TracingServiceProxy.this.notifyTraceur(sessionStolen);
        public void notifyTraceSessionEnded(boolean sessionStolen /* unused */) {
            TracingServiceProxy.this.notifyTraceur();
        }

        @Override
@@ -132,7 +129,7 @@ public class TracingServiceProxy extends SystemService {
        }
    }

    private void notifyTraceur(boolean sessionStolen) {
    private void notifyTraceur() {
        final Intent intent = new Intent();

        try {
@@ -141,11 +138,7 @@ public class TracingServiceProxy extends SystemService {
                    PackageManager.MATCH_SYSTEM_ONLY);

            intent.setClassName(info.packageName, TRACING_APP_ACTIVITY);
            if (sessionStolen) {
                intent.setAction(INTENT_ACTION_NOTIFY_SESSION_STOLEN);
            } else {
            intent.setAction(INTENT_ACTION_NOTIFY_SESSION_STOPPED);
            }

            final long identity = Binder.clearCallingIdentity();
            try {