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

Commit a1642b86 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix notifyTaskDisplayChanged is called every time onDisplayChanged is triggered." into main

parents 8e3ebe58 04b85038
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2790,11 +2790,15 @@ class Task extends TaskFragment {

    @Override
    void onDisplayChanged(DisplayContent dc) {
        final int lastDisplayId = getDisplayId();
        super.onDisplayChanged(dc);
        if (isLeafTask()) {
            final int displayId = (dc != null) ? dc.getDisplayId() : INVALID_DISPLAY;
            mWmService.mAtmService.getTaskChangeNotificationController().notifyTaskDisplayChanged(
                    mTaskId, displayId);
            //Send the callback when the task reparented to another display.
            if (lastDisplayId != displayId) {
                mWmService.mAtmService.getTaskChangeNotificationController()
                        .notifyTaskDisplayChanged(mTaskId, displayId);
            }
        }
        if (isRootTask()) {
            updateSurfaceBounds();