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

Commit cbd84af3 authored by Craig Mautner's avatar Craig Mautner
Browse files

Cherry pick task movement changes from aosp

The following cherry picks from aosp contain code that keep windows
tracking the task movement.

https://android-review.googlesource.com/#/c/111380/
https://android-review.googlesource.com/#/c/109930

Maybe fixes bug 15729183.

Change-Id: Ida69fe365b06025d119e32b22a8d04958cdbabf3
parent 265e3da0
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -60,6 +60,12 @@ class Task {
        return removed;
        return removed;
    }
    }


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

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