Merge "Check lock-task mode if task_on_home is applied" into tm-qpr-dev
This commit is contained in:
@@ -1125,11 +1125,12 @@ class Task extends TaskFragment {
|
|||||||
if (inMultiWindowMode() || !hasChild()) return false;
|
if (inMultiWindowMode() || !hasChild()) return false;
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
final int returnHomeFlags = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME;
|
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 Task task = getDisplayArea() != null ? getDisplayArea().getRootHomeTask() : null;
|
||||||
final boolean isLockTaskModeViolation = task != null
|
return !(task != null
|
||||||
&& mAtmService.getLockTaskController().isLockTaskModeViolation(task);
|
&& mAtmService.getLockTaskController().isLockTaskModeViolation(task));
|
||||||
return (intent.getFlags() & returnHomeFlags) == returnHomeFlags
|
|
||||||
&& !isLockTaskModeViolation;
|
|
||||||
}
|
}
|
||||||
final Task bottomTask = getBottomMostTask();
|
final Task bottomTask = getBottomMostTask();
|
||||||
return bottomTask != this && bottomTask.returnsToHomeRootTask();
|
return bottomTask != this && bottomTask.returnsToHomeRootTask();
|
||||||
|
|||||||
Reference in New Issue
Block a user