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

Commit fe9a318c authored by Mateusz Cicheński's avatar Mateusz Cicheński Committed by Android (Google) Code Review
Browse files

Merge "Send onActivityUnpinned when Activity is force killed or crashed" into main

parents c9c3b047 2647253a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2234,10 +2234,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
            mService.getTaskChangeNotificationController().notifyActivityUnpinned();
        }
        mWindowManager.mPolicy.setPipVisibilityLw(inPip);
        if (task.getSurfaceControl() != null) {
            mWmService.mTransactionFactory.get()
                    .setTrustedOverlay(task.getSurfaceControl(), inPip)
                    .apply();
        }
    }

    void executeAppTransitionForAllDisplay() {
        for (int displayNdx = getChildCount() - 1; displayNdx >= 0; --displayNdx) {
+11 −5
Original line number Diff line number Diff line
@@ -1162,11 +1162,17 @@ class Task extends TaskFragment {
                forAllActivities(oldParentTask::cleanUpActivityReferences);
            }

            if (oldParent.inPinnedWindowingMode()
                    && (newParent == null || !newParent.inPinnedWindowingMode())) {
            if (newParent == null || !newParent.inPinnedWindowingMode()) {
                if (oldParent.inPinnedWindowingMode()) {
                    // Notify if a task from the root pinned task is being removed
                    // (or moved depending on the mode).
                    mRootWindowContainer.notifyActivityPipModeChanged(this, null);
                } else if (inPinnedWindowingMode()) {
                    // The task in pinned mode is removed, even though the old parent was not pinned
                    // The task was most likely force killed or crashed
                    Slog.e(TAG, "Pinned task is removed t=" + this);
                    mRootWindowContainer.notifyActivityPipModeChanged(this, null);
                }
            }
        }