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

Commit e9fdaf55 authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge \"Add a few trace points for animation loading.\" into nyc-mr1-dev

am: 8e3b57aa

Change-Id: I05cd897ef70f7eef70fd3f361ec7564b6e837302
parents ad2bf7df 8e3b57aa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3003,8 +3003,8 @@ public class WindowManagerService extends IWindowManager.Stub
        if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
            transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
        }
        if (win.isWinVisibleLw() && !winAnimator.isAnimationSet()
                && winAnimator.applyAnimationLocked(transit, false)) {
        if (win.isWinVisibleLw() && (winAnimator.isAnimationSet() ||
                winAnimator.applyAnimationLocked(transit, false))) {
            focusMayChange = isDefaultDisplay;
            win.mAnimatingExit = true;
            win.mWinAnimator.mAnimating = true;
@@ -3170,6 +3170,7 @@ public class WindowManagerService extends IWindowManager.Stub
        // frozen, there is no reason to animate and it can cause strange
        // artifacts when we unfreeze the display if some different animation
        // is running.
        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "WM#applyAnimationLocked");
        if (okToDisplay()) {
            DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
            final int width = displayInfo.appWidth;
@@ -3221,6 +3222,7 @@ public class WindowManagerService extends IWindowManager.Stub
        } else {
            atoken.mAppAnimator.clearAnimation();
        }
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);

        return atoken.mAppAnimator.animation != null;
    }
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import android.graphics.RectF;
import android.graphics.Region;
import android.os.Debug;
import android.os.RemoteException;
import android.os.Trace;
import android.util.Slog;
import android.view.DisplayInfo;
import android.view.MagnificationSpec;
@@ -1863,6 +1864,7 @@ class WindowStateAnimator {
        // frozen, there is no reason to animate and it can cause strange
        // artifacts when we unfreeze the display if some different animation
        // is running.
        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "WSA#applyAnimationLocked");
        if (mService.okToDisplay()) {
            int anim = mPolicy.selectAnimationLw(mWin, transit);
            int attr = -1;
@@ -1902,6 +1904,8 @@ class WindowStateAnimator {
        } else {
            clearAnimation();
        }
        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);

        if (mWin.mAttrs.type == TYPE_INPUT_METHOD) {
            mService.adjustForImeIfNeeded(mWin.mDisplayContent);
            if (isEntrance) {
+5 −0
Original line number Diff line number Diff line
@@ -1074,6 +1074,8 @@ class WindowSurfacePlacer {
        if (!transitionGoodToGo(appsCount)) {
            return 0;
        }
        Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "AppTransitionReady");

        if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "**** GOOD TO GO");
        int transit = mService.mAppTransition.getAppTransition();
        if (mService.mSkipAppTransitionAnimation) {
@@ -1207,6 +1209,9 @@ class WindowSurfacePlacer {
                true /*updateInputWindows*/);
        mService.mFocusMayChange = false;
        mService.notifyActivityDrawnForKeyguard();

        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);

        return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG;
    }