Lock work tasks from SystemUI instead of ActivityStarter

By adding an onTaskProfileLocked(taskId, userId) RPC to
TaskStackListener and routing that through to a new WorkLockController.

Bug: 31001762
Test: //tests/PoApi/src/com/google/android/afwtest/poapi/WorkChallengeTest
Change-Id: I3fd28e6926c3f928e78b3c6ce0fe27413617695f
This commit is contained in:
Robin Lee
2017-01-10 17:02:34 +00:00
parent 3fef1f2843
commit c41f6ec877
8 changed files with 108 additions and 22 deletions

View File

@@ -95,4 +95,11 @@ oneway interface ITaskStackListener {
* perform relevant animations before the window disappears.
*/
void onTaskRemovalStarted(int taskId);
/**
* Called when the task has been put in a locked state because one or more of the
* activities inside it belong to a managed profile user, and that user has just
* been locked.
*/
void onTaskProfileLocked(int taskId, int userId);
}

View File

@@ -74,4 +74,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub {
public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
throws RemoteException {
}
@Override
public void onTaskProfileLocked(int taskId, int userId) {
}
}