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

Commit e9d2dd6b authored by Shuichi.Noguchi's avatar Shuichi.Noguchi
Browse files

Fix issue with PiP callbacks not being handled

For secondary users, stopping primary user process
is not necessary anymore since PiP is managed
in the primary user's SystemUI process,
this logic was prevening the relaunching of the activity.

Test: Launch PiP from a secondary user on TV device,
      restart the activity and ensure that it is brought
      to fullscreen.

Change-Id: I3a0658c9f55f85771b92a71a1ddeb0f9d544e869
parent 2610ad05
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -600,9 +600,7 @@ public class PipManager implements BasePipManager {
        @Override
        public void onTaskStackChanged() {
            if (DEBUG) Log.d(TAG, "onTaskStackChanged()");
            if (!checkCurrentUserId(mContext, DEBUG)) {
                return;
            }

            if (getState() != STATE_NO_PIP) {
                boolean hasPip = false;

@@ -637,9 +635,7 @@ public class PipManager implements BasePipManager {
        @Override
        public void onActivityPinned(String packageName, int taskId) {
            if (DEBUG) Log.d(TAG, "onActivityPinned()");
            if (!checkCurrentUserId(mContext, DEBUG)) {
                return;
            }

            StackInfo stackInfo = getPinnedStackInfo();
            if (stackInfo == null) {
                Log.w(TAG, "Cannot find pinned stack");
@@ -664,9 +660,7 @@ public class PipManager implements BasePipManager {
        @Override
        public void onPinnedActivityRestartAttempt(boolean clearedTask) {
            if (DEBUG) Log.d(TAG, "onPinnedActivityRestartAttempt()");
            if (!checkCurrentUserId(mContext, DEBUG)) {
                return;
            }

            // If PIPed activity is launched again by Launcher or intent, make it fullscreen.
            movePipToFullscreen();
        }
@@ -674,9 +668,7 @@ public class PipManager implements BasePipManager {
        @Override
        public void onPinnedStackAnimationEnded() {
            if (DEBUG) Log.d(TAG, "onPinnedStackAnimationEnded()");
            if (!checkCurrentUserId(mContext, DEBUG)) {
                return;
            }

            switch (getState()) {
                case STATE_PIP_MENU:
                    showPipMenu();