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

Commit 0eabb4e2 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

am: e9fdaf55

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


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

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

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

        Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);

        return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG;
        return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG;
    }
    }