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

Commit c860b311 authored by Jeff Chang's avatar Jeff Chang Committed by Automerger Merge Worker
Browse files

Merge "Check lock-task mode if task_on_home is applied" into tm-qpr-dev am:...

Merge "Check lock-task mode if task_on_home is applied" into tm-qpr-dev am: 2016b1dc am: eedcc997

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



Change-Id: I350129fc898537a3e0a0aeec3a49a673ca2e9b14
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a80b3b3a eedcc997
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1125,11 +1125,12 @@ class Task extends TaskFragment {
        if (inMultiWindowMode() || !hasChild()) return false;
        if (intent != null) {
            final int returnHomeFlags = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME;
            if ((intent.getFlags() & returnHomeFlags) != returnHomeFlags) {
                return false;
            }
            final Task task = getDisplayArea() != null ? getDisplayArea().getRootHomeTask() : null;
            final boolean isLockTaskModeViolation = task != null
                    && mAtmService.getLockTaskController().isLockTaskModeViolation(task);
            return (intent.getFlags() & returnHomeFlags) == returnHomeFlags
                    && !isLockTaskModeViolation;
            return !(task != null
                    && mAtmService.getLockTaskController().isLockTaskModeViolation(task));
        }
        final Task bottomTask = getBottomMostTask();
        return bottomTask != this && bottomTask.returnsToHomeRootTask();