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

Commit 18037f14 authored by Kevin Ma's avatar Kevin Ma Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "DO NOT MERGE Fix race condition between binder...

Merge "Revert "Revert "DO NOT MERGE Fix race condition between binder deaths""" into klp-modular-dev
parents f202365e 8174879e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -245,6 +245,15 @@ class AppWindowToken extends WindowToken {
        return false;
    }

    void removeAllWindows() {
        for (int winNdx = allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
            WindowState win = allAppWindows.get(winNdx);
            if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) Slog.w(WindowManagerService.TAG,
                    "removeAllWindows: removing win=" + win);
            win.mService.removeWindowLocked(win.mSession, win);
        }
    }

    @Override
    void dump(PrintWriter pw, String prefix) {
        super.dump(pw, prefix);
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ public class TaskStack {
                final ArrayList<WindowState> windows = activities.get(activityNdx).allAppWindows;
                for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
                    final WindowStateAnimator winAnimator = windows.get(winNdx).mWinAnimator;
                    if (winAnimator.isAnimating() && !winAnimator.isDummyAnimation()) {
                    if (winAnimator.isAnimating() || winAnimator.mWin.mExiting) {
                        return true;
                    }
                }
+3 −1
Original line number Diff line number Diff line
@@ -3540,7 +3540,7 @@ public class WindowManagerService extends IWindowManager.Stub
                return;
            }
            final Task oldTask = mTaskIdToTask.get(atoken.groupId);
            removeAppFromTaskLocked(atoken);
            oldTask.removeAppToken(atoken);

            atoken.groupId = groupId;
            Task newTask = mTaskIdToTask.get(groupId);
@@ -4562,6 +4562,8 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    void removeAppFromTaskLocked(AppWindowToken wtoken) {
        wtoken.removeAllWindows();

        final Task task = mTaskIdToTask.get(wtoken.groupId);
        if (task != null) {
            if (!task.removeAppToken(wtoken)) {