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

Commit 2136c994 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add traces for activity create/resume/pause/stop/destroy" into sc-dev am: 0290ef23

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13405908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id43652e7b192f64055ea4871d3f05c85e8ebdf2c
parents 414f0f91 0290ef23
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -7881,6 +7881,10 @@ public class Activity extends ContextThemeWrapper

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    final void performCreate(Bundle icicle, PersistableBundle persistentState) {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_WINDOW_MANAGER)) {
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "performCreate:"
                    + mComponent.getClassName());
        }
        dispatchActivityPreCreated(icicle);
        mCanEnterPictureInPicture = true;
        // initialize mIsInMultiWindowMode and mIsInPictureInPictureMode before onCreate
@@ -7903,6 +7907,7 @@ public class Activity extends ContextThemeWrapper
        mFragments.dispatchActivityCreated();
        mActivityTransitionState.setEnterActivityOptions(this, getActivityOptions());
        dispatchActivityPostCreated(icicle);
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
    }

    final void performNewIntent(@NonNull Intent intent) {
@@ -8008,6 +8013,10 @@ public class Activity extends ContextThemeWrapper
    }

    final void performResume(boolean followedByPause, String reason) {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_WINDOW_MANAGER)) {
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "performResume:"
                    + mComponent.getClassName());
        }
        dispatchActivityPreResumed();
        performRestart(true /* start */, reason);

@@ -8059,9 +8068,14 @@ public class Activity extends ContextThemeWrapper
                " did not call through to super.onPostResume()");
        }
        dispatchActivityPostResumed();
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
    }

    final void performPause() {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_WINDOW_MANAGER)) {
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "performPause:"
                    + mComponent.getClassName());
        }
        dispatchActivityPrePaused();
        mDoReportFullyDrawn = false;
        mFragments.dispatchPause();
@@ -8077,6 +8091,7 @@ public class Activity extends ContextThemeWrapper
                    " did not call through to super.onPause()");
        }
        dispatchActivityPostPaused();
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
    }

    final void performUserLeaving() {
@@ -8085,6 +8100,10 @@ public class Activity extends ContextThemeWrapper
    }

    final void performStop(boolean preserveWindow, String reason) {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_WINDOW_MANAGER)) {
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "performStop:"
                    + mComponent.getClassName());
        }
        mDoReportFullyDrawn = false;
        mFragments.doLoaderStop(mChangingConfigurations /*retain*/);

@@ -8130,9 +8149,14 @@ public class Activity extends ContextThemeWrapper
            dispatchActivityPostStopped();
        }
        mResumed = false;
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
    }

    final void performDestroy() {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_WINDOW_MANAGER)) {
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "performDestroy:"
                    + mComponent.getClassName());
        }
        dispatchActivityPreDestroyed();
        mDestroyed = true;
        mWindow.destroy();
@@ -8145,6 +8169,7 @@ public class Activity extends ContextThemeWrapper
            mVoiceInteractor.detachActivity();
        }
        dispatchActivityPostDestroyed();
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
    }

    final void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode,