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

Commit 9dde78f7 authored by tingna_sung's avatar tingna_sung
Browse files

Avoid to skip app window due to un-assigned sending to bottom state while app window sort



should assign value of WindowToken.sendingToBottom according to the state of this token is moved to top or bottom
to avoid app window is skiped incorrectly due to sending to bottom state is un-assigned while app window sort
and finding focus window.

Change-Id: I190838d1d01ca229155d5176930178ab41335556
Signed-off-by: default avatartingna_sung <tingna_sung@htc.com>
parent 4cd671e4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -52,6 +52,12 @@ class Task {
        return false;
    }

    void setSendingToBottom(boolean toBottom) {
        for (int appTokenNdx = 0; appTokenNdx < mAppTokens.size(); appTokenNdx++) {
            mAppTokens.get(appTokenNdx).sendingToBottom = toBottom;
        }
    }

    @Override
    public String toString() {
        return "{taskId=" + taskId + " appTokens=" + mAppTokens + "}";
+6 −0
Original line number Diff line number Diff line
@@ -4806,6 +4806,9 @@ public class WindowManagerService extends IWindowManager.Stub
                    displayContent.moveHomeStackBox(isHomeStackTask);
                }
                stack.moveTaskToTop(task);
                if (mAppTransition.isTransitionSet()) {
                    task.setSendingToBottom(false);
                }
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
@@ -4824,6 +4827,9 @@ public class WindowManagerService extends IWindowManager.Stub
                }
                final TaskStack stack = task.mStack;
                stack.moveTaskToBottom(task);
                if (mAppTransition.isTransitionSet()) {
                    task.setSendingToBottom(true);
                }
                moveStackWindowsLocked(stack.getDisplayContent());
            }
        } finally {