Allow recents component to launch non-exported activities
- When relaunching an activity in an existing task, allow the recents
component to launch all activity including those that are not exported
(since the recents component can not have START_ANY_ACTIVITY).
Bug: 73068266
Test: Open facebook, hit back to end the task, and try and relaunch from
Overview
Change-Id: I45e7ce339f83aadfb5a7faf5af51df97dd1414a5
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
index 18e842f..1520859 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
@@ -243,7 +243,7 @@
if (containsConditions(preconditions,PRECONDITION_CANNOT_START_ANY_ACTIVITY)) {
doReturn(false).when(service.mStackSupervisor).checkStartAnyActivityPermission(
any(), any(), any(), anyInt(), anyInt(), anyInt(), any(),
- anyBoolean(), any(), any(), any());
+ anyBoolean(), anyBoolean(), any(), any(), any());
}
try {
@@ -302,7 +302,7 @@
// always allow test to start activity.
doReturn(true).when(mService.mStackSupervisor).checkStartAnyActivityPermission(
any(), any(), any(), anyInt(), anyInt(), anyInt(), any(),
- anyBoolean(), any(), any(), any());
+ anyBoolean(), anyBoolean(), any(), any(), any());
// instrument the stack and task used.
final ActivityStack stack = mService.mStackSupervisor.getDefaultDisplay().createStack(