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

Commit 2ca561b6 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Add and revise traces in window manager

- Change internal traces to window manager tag (excluding
  ActivityMetricsLogger because it may be used by existing parser).
- Add traces for the main operations of activity on server side.
- Give a name for the Runnable which runs in animation thread
  (the trace tag of "android.anim" looper is enabled) so it is
  easier to understand the action from trace.

Bug: 131727899
Test: 1. adb shell atrace --async_start wm
      2. Launch and finish an activity
      3. Check output of "adb shell atrace --async_stop"

Change-Id: Ic68d907dff61b203cfc5f6dbf1c713b52affec58
parent 166b7cbb
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ import static android.app.WindowConfiguration.windowingModeToString;
import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;
import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;
import static android.content.pm.ActivityInfo.FLAG_RESUME_WHILE_PAUSING;
import static android.content.pm.ActivityInfo.FLAG_RESUME_WHILE_PAUSING;
import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD;
import static android.view.Display.FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
@@ -4342,7 +4342,7 @@ class ActivityStack extends ConfigurationContainer {
            return;
            return;
        }
        }


        Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "stack.resize_" + mStackId);
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "stack.resize_" + mStackId);
        mService.deferWindowLayout();
        mService.deferWindowLayout();
        try {
        try {
            // Update override configurations of all tasks in the stack.
            // Update override configurations of all tasks in the stack.
@@ -4368,7 +4368,7 @@ class ActivityStack extends ConfigurationContainer {
            }
            }
        } finally {
        } finally {
            mService.continueWindowLayout();
            mService.continueWindowLayout();
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
    }
    }


+7 −7
Original line number Original line Diff line number Diff line
@@ -44,7 +44,7 @@ import static android.graphics.Rect.copyOrNull;
import static android.os.PowerManager.PARTIAL_WAKE_LOCK;
import static android.os.PowerManager.PARTIAL_WAKE_LOCK;
import static android.os.Process.INVALID_UID;
import static android.os.Process.INVALID_UID;
import static android.os.Process.SYSTEM_UID;
import static android.os.Process.SYSTEM_UID;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.Display.TYPE_VIRTUAL;
import static android.view.Display.TYPE_VIRTUAL;
@@ -690,7 +690,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
    ResolveInfo resolveIntent(Intent intent, String resolvedType, int userId, int flags,
    ResolveInfo resolveIntent(Intent intent, String resolvedType, int userId, int flags,
            int filterCallingUid) {
            int filterCallingUid) {
        try {
        try {
            Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "resolveIntent");
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resolveIntent");
            int modifiedFlags = flags
            int modifiedFlags = flags
                    | PackageManager.MATCH_DEFAULT_ONLY | ActivityManagerService.STOCK_PM_FLAGS;
                    | PackageManager.MATCH_DEFAULT_ONLY | ActivityManagerService.STOCK_PM_FLAGS;
            if (intent.isWebIntent()
            if (intent.isWebIntent()
@@ -711,7 +711,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                Binder.restoreCallingIdentity(token);
                Binder.restoreCallingIdentity(token);
            }
            }
        } finally {
        } finally {
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
    }
    }


@@ -1629,7 +1629,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
            mPendingTempOtherTaskInsetBounds = copyOrNull(tempOtherTaskInsetBounds);
            mPendingTempOtherTaskInsetBounds = copyOrNull(tempOtherTaskInsetBounds);
        }
        }


        Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "am.resizeDockedStack");
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resizeDockedStack");
        mService.deferWindowLayout();
        mService.deferWindowLayout();
        try {
        try {
            // Don't allow re-entry while resizing. E.g. due to docked stack detaching.
            // Don't allow re-entry while resizing. E.g. due to docked stack detaching.
@@ -1695,7 +1695,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        } finally {
        } finally {
            mAllowDockedStackResize = true;
            mAllowDockedStackResize = true;
            mService.continueWindowLayout();
            mService.continueWindowLayout();
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
    }
    }


@@ -1717,7 +1717,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
            return;
            return;
        }
        }


        Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "am.resizePinnedStack");
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resizePinnedStack");
        mService.deferWindowLayout();
        mService.deferWindowLayout();
        try {
        try {
            Rect insetBounds = null;
            Rect insetBounds = null;
@@ -1739,7 +1739,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                    !DEFER_RESUME);
                    !DEFER_RESUME);
        } finally {
        } finally {
            mService.continueWindowLayout();
            mService.continueWindowLayout();
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
    }
    }


+52 −38
Original line number Original line Diff line number Diff line
@@ -770,13 +770,13 @@ class ActivityStarter {
        boolean restrictedBgActivity = false;
        boolean restrictedBgActivity = false;
        if (!abort) {
        if (!abort) {
            try {
            try {
                Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER,
                Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER,
                        "shouldAbortBackgroundActivityStart");
                        "shouldAbortBackgroundActivityStart");
                restrictedBgActivity = shouldAbortBackgroundActivityStart(callingUid,
                restrictedBgActivity = shouldAbortBackgroundActivityStart(callingUid,
                        callingPid, callingPackage, realCallingUid, realCallingPid, callerApp,
                        callingPid, callingPackage, realCallingUid, realCallingPid, callerApp,
                        originatingPendingIntent, allowBackgroundActivityStart, intent);
                        originatingPendingIntent, allowBackgroundActivityStart, intent);
            } finally {
            } finally {
                Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
                Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
            }
            }
        }
        }


@@ -1401,29 +1401,48 @@ class ActivityStarter {
        final ActivityStack startedActivityStack;
        final ActivityStack startedActivityStack;
        try {
        try {
            mService.deferWindowLayout();
            mService.deferWindowLayout();
            result = startActivityUnchecked(r, sourceRecord, voiceSession, voiceInteractor,
            Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "startActivityInner");
            result = startActivityInner(r, sourceRecord, voiceSession, voiceInteractor,
                    startFlags, doResume, options, inTask, outActivity, restrictedBgActivity);
                    startFlags, doResume, options, inTask, outActivity, restrictedBgActivity);
        } finally {
        } finally {
            final ActivityStack currentStack = r.getActivityStack();
            Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
            startedActivityStack = currentStack != null ? currentStack : mTargetStack;
            startedActivityStack = handleStartResult(r, result);
            mService.continueWindowLayout();
        }

        postStartActivityProcessing(r, result, startedActivityStack);

        return result;
    }

    /**
     * If the start result is success, ensure that the configuration of the started activity matches
     * the current display. Otherwise clean up unassociated containers to avoid leakage.
     *
     * @return the stack where the successful started activity resides.
     */
    private @Nullable ActivityStack handleStartResult(@NonNull ActivityRecord started, int result) {
        final ActivityStack currentStack = started.getActivityStack();
        ActivityStack startedActivityStack = currentStack != null ? currentStack : mTargetStack;


        if (ActivityManager.isStartResultSuccessful(result)) {
        if (ActivityManager.isStartResultSuccessful(result)) {
            if (startedActivityStack != null) {
            if (startedActivityStack != null) {
                    // If there is no state change (e.g. a resumed activity is reparented to
                // If there is no state change (e.g. a resumed activity is reparented to top of
                    // top of another display) to trigger a visibility/configuration checking,
                // another display) to trigger a visibility/configuration checking, we have to
                    // we have to update the configuration for changing to different display.
                // update the configuration for changing to different display.
                    final ActivityRecord currentTop =
                final ActivityRecord currentTop = startedActivityStack.topRunningActivityLocked();
                            startedActivityStack.topRunningActivityLocked();
                if (currentTop != null && currentTop.shouldUpdateConfigForDisplayChanged()) {
                if (currentTop != null && currentTop.shouldUpdateConfigForDisplayChanged()) {
                    mRootActivityContainer.ensureVisibilityAndConfig(
                    mRootActivityContainer.ensureVisibilityAndConfig(
                            currentTop, currentTop.getDisplayId(),
                            currentTop, currentTop.getDisplayId(),
                            true /* markFrozenIfConfigChanged */, false /* deferResume */);
                            true /* markFrozenIfConfigChanged */, false /* deferResume */);
                }
                }
            }
            }
            } else {
            return startedActivityStack;
                // If we are not able to proceed, disassociate the activity from the task.
        }
                // Leaving an activity in an incomplete state can lead to issues, such as

                // performing operations without a window container.
        // If we are not able to proceed, disassociate the activity from the task. Leaving an
        // activity in an incomplete state can lead to issues, such as performing operations
        // without a window container.
        final ActivityStack stack = mStartActivity.getActivityStack();
        final ActivityStack stack = mStartActivity.getActivityStack();
        if (stack != null) {
        if (stack != null) {
            mStartActivity.finishIfPossible("startActivity", true /* oomAdj */);
            mStartActivity.finishIfPossible("startActivity", true /* oomAdj */);
@@ -1434,14 +1453,9 @@ class ActivityStarter {
                && startedActivityStack.numActivities() == 0
                && startedActivityStack.numActivities() == 0
                && !startedActivityStack.isActivityTypeHome()) {
                && !startedActivityStack.isActivityTypeHome()) {
            startedActivityStack.remove();
            startedActivityStack.remove();
            startedActivityStack = null;
        }
        }
            }
        return startedActivityStack;
            mService.continueWindowLayout();
        }

        postStartActivityProcessing(r, result, startedActivityStack);

        return result;
    }
    }


    /**
    /**
@@ -1469,7 +1483,7 @@ class ActivityStarter {
    }
    }


    // Note: This method should only be called from {@link startActivity}.
    // Note: This method should only be called from {@link startActivity}.
    private int startActivityUnchecked(final ActivityRecord r, ActivityRecord sourceRecord,
    private int startActivityInner(final ActivityRecord r, ActivityRecord sourceRecord,
            IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
            IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
            int startFlags, boolean doResume, ActivityOptions options, TaskRecord inTask,
            int startFlags, boolean doResume, ActivityOptions options, TaskRecord inTask,
            ActivityRecord[] outActivity, boolean restrictedBgActivity) {
            ActivityRecord[] outActivity, boolean restrictedBgActivity) {
@@ -1592,7 +1606,7 @@ class ActivityStarter {
                // accordingly.
                // accordingly.
                if (mTargetStack.isFocusable()
                if (mTargetStack.isFocusable()
                        && !mRootActivityContainer.isTopDisplayFocusedStack(mTargetStack)) {
                        && !mRootActivityContainer.isTopDisplayFocusedStack(mTargetStack)) {
                    mTargetStack.moveToFront("startActivityUnchecked");
                    mTargetStack.moveToFront("startActivityInner");
                }
                }
                mRootActivityContainer.resumeFocusedStacksTopActivities(
                mRootActivityContainer.resumeFocusedStacksTopActivities(
                        mTargetStack, mStartActivity, mOptions);
                        mTargetStack, mStartActivity, mOptions);
@@ -1873,7 +1887,7 @@ class ActivityStarter {
                    mTargetStack = computeStackFocus(mSourceRecord, false /* newTask */,
                    mTargetStack = computeStackFocus(mSourceRecord, false /* newTask */,
                            mLaunchFlags, mOptions);
                            mLaunchFlags, mOptions);
                    mTargetStack.addTask(targetTask,
                    mTargetStack.addTask(targetTask,
                            !mLaunchTaskBehind /* toTop */, "startActivityUnchecked");
                            !mLaunchTaskBehind /* toTop */, "complyActivityFlags");
                }
                }
            }
            }
        } else if ((mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) == 0 && !mAddingToTask
        } else if ((mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) == 0 && !mAddingToTask
+24 −7
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ import static android.os.FactoryTest.FACTORY_TEST_LOW_LEVEL;
import static android.os.FactoryTest.FACTORY_TEST_OFF;
import static android.os.FactoryTest.FACTORY_TEST_OFF;
import static android.os.Process.FIRST_APPLICATION_UID;
import static android.os.Process.FIRST_APPLICATION_UID;
import static android.os.Process.SYSTEM_UID;
import static android.os.Process.SYSTEM_UID;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.provider.Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT;
import static android.provider.Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RTL;
import static android.provider.Settings.Global.DEVELOPMENT_FORCE_RTL;
@@ -1606,6 +1606,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            }
            }


            final long origId = Binder.clearCallingIdentity();
            final long origId = Binder.clearCallingIdentity();
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "finishActivity");
            try {
            try {
                boolean res;
                boolean res;
                final boolean finishWithRootActivity =
                final boolean finishWithRootActivity =
@@ -1633,6 +1634,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                }
                }
                return res;
                return res;
            } finally {
            } finally {
                Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
                Binder.restoreCallingIdentity(origId);
                Binder.restoreCallingIdentity(origId);
            }
            }
        }
        }
@@ -1667,6 +1669,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        try {
        try {
            WindowProcessController proc = null;
            WindowProcessController proc = null;
            synchronized (mGlobalLock) {
            synchronized (mGlobalLock) {
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "activityIdle");
                ActivityStack stack = ActivityRecord.getStackLocked(token);
                ActivityStack stack = ActivityRecord.getStackLocked(token);
                if (stack == null) {
                if (stack == null) {
                    return;
                    return;
@@ -1681,6 +1684,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                }
                }
            }
            }
        } finally {
        } finally {
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
            Binder.restoreCallingIdentity(origId);
            Binder.restoreCallingIdentity(origId);
        }
        }
    }
    }
@@ -1707,10 +1711,12 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
    public final void activityPaused(IBinder token) {
    public final void activityPaused(IBinder token) {
        final long origId = Binder.clearCallingIdentity();
        final long origId = Binder.clearCallingIdentity();
        synchronized (mGlobalLock) {
        synchronized (mGlobalLock) {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "activityPaused");
            ActivityStack stack = ActivityRecord.getStackLocked(token);
            ActivityStack stack = ActivityRecord.getStackLocked(token);
            if (stack != null) {
            if (stack != null) {
                stack.activityPausedLocked(token, false);
                stack.activityPausedLocked(token, false);
            }
            }
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
        Binder.restoreCallingIdentity(origId);
        Binder.restoreCallingIdentity(origId);
    }
    }
@@ -1731,6 +1737,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        int restartingUid = 0;
        int restartingUid = 0;
        final ActivityRecord r;
        final ActivityRecord r;
        synchronized (mGlobalLock) {
        synchronized (mGlobalLock) {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "activityStopped");
            r = ActivityRecord.isInStackLocked(token);
            r = ActivityRecord.isInStackLocked(token);
            if (r != null) {
            if (r != null) {
                if (r.attachedToProcess()
                if (r.attachedToProcess()
@@ -1742,6 +1749,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                }
                }
                r.activityStoppedLocked(icicle, persistentState, description);
                r.activityStoppedLocked(icicle, persistentState, description);
            }
            }
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }


        if (restartingName != null) {
        if (restartingName != null) {
@@ -1763,12 +1771,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "ACTIVITY DESTROYED: " + token);
        if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "ACTIVITY DESTROYED: " + token);
        synchronized (mGlobalLock) {
        synchronized (mGlobalLock) {
            final long origId = Binder.clearCallingIdentity();
            final long origId = Binder.clearCallingIdentity();
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "activityDestroyed");
            try {
            try {
                final ActivityRecord activity = ActivityRecord.forTokenLocked(token);
                final ActivityRecord activity = ActivityRecord.forTokenLocked(token);
                if (activity != null) {
                if (activity != null) {
                    activity.destroyed("activityDestroyed");
                    activity.destroyed("activityDestroyed");
                }
                }
            } finally {
            } finally {
                Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
                Binder.restoreCallingIdentity(origId);
                Binder.restoreCallingIdentity(origId);
            }
            }
        }
        }
@@ -5506,8 +5516,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
    void startProcessAsync(ActivityRecord activity, boolean knownToBeDead, boolean isTop,
    void startProcessAsync(ActivityRecord activity, boolean knownToBeDead, boolean isTop,
            String hostingType) {
            String hostingType) {
        try {
        try {
            if (Trace.isTagEnabled(TRACE_TAG_ACTIVITY_MANAGER)) {
            if (Trace.isTagEnabled(TRACE_TAG_WINDOW_MANAGER)) {
                Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "dispatchingStartProcess:"
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "dispatchingStartProcess:"
                        + activity.processName);
                        + activity.processName);
            }
            }
            // Post message to start process to avoid possible deadlock of calling into AMS with the
            // Post message to start process to avoid possible deadlock of calling into AMS with the
@@ -5517,7 +5527,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    isTop, hostingType, activity.intent.getComponent());
                    isTop, hostingType, activity.intent.getComponent());
            mH.sendMessage(m);
            mH.sendMessage(m);
        } finally {
        } finally {
            Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        }
        }
    }
    }


@@ -5670,11 +5680,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {


    private void updateResumedAppTrace(@Nullable ActivityRecord resumed) {
    private void updateResumedAppTrace(@Nullable ActivityRecord resumed) {
        if (mTracedResumedActivity != null) {
        if (mTracedResumedActivity != null) {
            Trace.asyncTraceEnd(TRACE_TAG_ACTIVITY_MANAGER,
            Trace.asyncTraceEnd(TRACE_TAG_WINDOW_MANAGER,
                    constructResumedTraceName(mTracedResumedActivity.packageName), 0);
                    constructResumedTraceName(mTracedResumedActivity.packageName), 0);
        }
        }
        if (resumed != null) {
        if (resumed != null) {
            Trace.asyncTraceBegin(TRACE_TAG_ACTIVITY_MANAGER,
            Trace.asyncTraceBegin(TRACE_TAG_WINDOW_MANAGER,
                    constructResumedTraceName(resumed.packageName), 0);
                    constructResumedTraceName(resumed.packageName), 0);
        }
        }
        mTracedResumedActivity = resumed;
        mTracedResumedActivity = resumed;
@@ -6773,7 +6783,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        @Override
        @Override
        public boolean attachApplication(WindowProcessController wpc) throws RemoteException {
        public boolean attachApplication(WindowProcessController wpc) throws RemoteException {
            synchronized (mGlobalLockWithoutBoost) {
            synchronized (mGlobalLockWithoutBoost) {
                if (Trace.isTagEnabled(TRACE_TAG_WINDOW_MANAGER)) {
                    Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "attachApplication:" + wpc.mName);
                }
                try {
                    return mRootActivityContainer.attachApplication(wpc);
                    return mRootActivityContainer.attachApplication(wpc);
                } finally {
                    Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
                }
            }
            }
        }
        }


+4 −2
Original line number Original line Diff line number Diff line
@@ -2283,7 +2283,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        }
        }
    }
    }


    private final Runnable mAddStartingWindow = new Runnable() {
    private class AddStartingWindow implements Runnable {


        @Override
        @Override
        public void run() {
        public void run() {
@@ -2343,7 +2343,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
                        AppWindowToken.this);
                        AppWindowToken.this);
            }
            }
        }
        }
    };
    }

    private final AddStartingWindow mAddStartingWindow = new AddStartingWindow();


    private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning,
    private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning,
            boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents,
            boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents,
Loading