Merge "Streamline activity start flow"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2aed1f376d
File diff suppressed because it is too large
Load Diff
@@ -279,6 +279,13 @@ public class LockTaskController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if currently in the lock task mode, otherwise, return false.
|
||||
*/
|
||||
boolean isInLockTaskMode() {
|
||||
return !mLockTaskModeTasks.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return whether the requested task is disallowed to be launched.
|
||||
*/
|
||||
|
||||
@@ -499,6 +499,7 @@ public class ActivityStarterTests extends ActivityTestsBase {
|
||||
final ActivityStarter starter = prepareStarter(0);
|
||||
|
||||
final LockTaskController lockTaskController = mService.getLockTaskController();
|
||||
doReturn(true).when(lockTaskController).isInLockTaskMode();
|
||||
doReturn(true).when(lockTaskController).isLockTaskModeViolation(any());
|
||||
|
||||
final int result = starter.setReason("testTaskModeViolation").execute();
|
||||
|
||||
Reference in New Issue
Block a user