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

Commit 2c50098c authored by chaviw's avatar chaviw
Browse files

Allow stacks in split screen to show on lock screen.

The change in ag/3345710 prevented all non full screen stacks from
showing on lock screen. Instead allow split screen and full screen
stack to show on lock screen. Split screen stacks will become full
screen when shown on lock screen.

Fixes: 70919978
Test: Put an app into split screen. Lock screen. Receive a phone call.
      Screen will now properly turn on and show dialer in full screen.

Change-Id: I3759cb4b68a7bdad478b5b603b19140965a24b61
parent 03033385
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -556,10 +556,10 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> {
        return stack == getTopStack();
    }

    boolean isTopFullscreenStack(ActivityStack stack) {
    boolean isTopNotPinnedStack(ActivityStack stack) {
        for (int i = mStacks.size() - 1; i >= 0; --i) {
            final ActivityStack current = mStacks.get(i);
            if (current.getWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
            if (!current.inPinnedWindowingMode()) {
                return current == stack;
            }
        }
+6 −4
Original line number Diff line number Diff line
@@ -2730,12 +2730,14 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
    }

    /**
     * @return true if the activity contains windows that have
     *         {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} set or if the activity has set
     *         {@link #mShowWhenLocked}.
     * @return true if the activity windowing mode is not
     *         {@link android.app.WindowConfiguration#WINDOWING_MODE_PINNED} and activity contains
     *         windows that have {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} set or if the activity
     *         has set {@link #mShowWhenLocked}.
     *         Multi-windowing mode will be exited if true is returned.
     */
    boolean canShowWhenLocked() {
        return !inMultiWindowMode() && (mShowWhenLocked
        return !inPinnedWindowingMode() && (mShowWhenLocked
                || service.mWindowManager.containsShowWhenLockedWindow(appToken));
    }

+2 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.server.am;

import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY;
import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SPLIT_SCREEN;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
@@ -144,7 +143,6 @@ import com.android.internal.app.IVoiceInteractor;
import com.android.internal.os.BatteryStatsImpl;
import com.android.server.Watchdog;
import com.android.server.am.ActivityManagerService.ItemMatcher;
import com.android.server.am.EventLogTags;
import com.android.server.wm.ConfigurationContainer;
import com.android.server.wm.StackWindowController;
import com.android.server.wm.StackWindowListener;
@@ -1811,7 +1809,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
            boolean behindFullscreenActivity = !stackShouldBeVisible;
            boolean resumeNextActivity = mStackSupervisor.isFocusedStack(this)
                    && (isInStackLocked(starting) == null);
            final boolean isTopFullscreenStack = getDisplay().isTopFullscreenStack(this);
            final boolean isTopNotPinnedStack = getDisplay().isTopNotPinnedStack(this);
            for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
                final TaskRecord task = mTaskHistory.get(taskNdx);
                final ArrayList<ActivityRecord> activities = task.mActivities;
@@ -1833,7 +1831,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai

                    // Now check whether it's really visible depending on Keyguard state.
                    final boolean reallyVisible = checkKeyguardVisibility(r,
                            visibleIgnoringKeyguard, isTop && isTopFullscreenStack);
                            visibleIgnoringKeyguard, isTop && isTopNotPinnedStack);
                    if (visibleIgnoringKeyguard) {
                        behindFullscreenActivity = updateBehindFullscreen(!stackShouldBeVisible,
                                behindFullscreenActivity, r);