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

Commit a16e792a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Consider the lock-task mode while using FLAG_ACTIVITY_TASK_ON_HOME"...

Merge "Consider the lock-task mode while using FLAG_ACTIVITY_TASK_ON_HOME" into sc-v2-dev am: e171c540 am: f9b94121

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16197051

Change-Id: I962f3b7e9e86585d55d9d31b983fae4150400b47
parents 39c38f9b f9b94121
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1112,7 +1112,11 @@ class Task extends TaskFragment {
        if (inMultiWindowMode() || !hasChild()) return false;
        if (intent != null) {
            final int returnHomeFlags = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME;
            return intent != null && (intent.getFlags() & returnHomeFlags) == returnHomeFlags;
            final Task task = getDisplayArea() != null ? getDisplayArea().getRootHomeTask() : null;
            final boolean isLockTaskModeViolation = task != null
                    && mAtmService.getLockTaskController().isLockTaskModeViolation(task);
            return (intent.getFlags() & returnHomeFlags) == returnHomeFlags
                    && !isLockTaskModeViolation;
        }
        final Task bottomTask = getBottomMostTask();
        return bottomTask != this && bottomTask.returnsToHomeRootTask();