Merge "Block root task from being shown in recents" into pi-dev
am: 8a5e85c9ef
Change-Id: Ied185646430eb0b8bff72741e2697e6f35fa468b
This commit is contained in:
@@ -285,6 +285,16 @@ public class LockTaskController {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the root task of the lock task.
|
||||||
|
*/
|
||||||
|
TaskRecord getRootTask() {
|
||||||
|
if (mLockTaskModeTasks.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return mLockTaskModeTasks.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isLockTaskModeViolationInternal(TaskRecord task, boolean isNewClearTask) {
|
private boolean isLockTaskModeViolationInternal(TaskRecord task, boolean isNewClearTask) {
|
||||||
// TODO: Double check what's going on here. If the task is already in lock task mode, it's
|
// TODO: Double check what's going on here. If the task is already in lock task mode, it's
|
||||||
// likely whitelisted, so will return false below.
|
// likely whitelisted, so will return false below.
|
||||||
|
|||||||
@@ -1155,6 +1155,11 @@ class RecentTasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're in lock task mode, ignore the root task
|
||||||
|
if (task == mService.mLockTaskController.getRootTask()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user