Merge "Fix dream not working on top of pinned apps" into sc-dev

This commit is contained in:
Galia Peycheva
2021-06-01 10:23:53 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 0 deletions

View File

@@ -1381,6 +1381,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
getActivityStartController().obtainStarter(intent, "dream") getActivityStartController().obtainStarter(intent, "dream")
.setCallingUid(callingUid) .setCallingUid(callingUid)
.setCallingPid(callingPid) .setCallingPid(callingPid)
.setCallingPackage(intent.getPackage())
.setActivityInfo(a) .setActivityInfo(a)
.setActivityOptions(options.toBundle()) .setActivityOptions(options.toBundle())
// To start the dream from background, we need to start it from a persistent // To start the dream from background, we need to start it from a persistent

View File

@@ -355,6 +355,11 @@ public class LockTaskController {
return false; return false;
} }
// Allow the dream to start during lock task mode
if (wc.isActivityTypeDream()) {
return false;
}
return !(isTaskAuthAllowlisted(taskAuth) || mLockTaskModeTasks.isEmpty()); return !(isTaskAuthAllowlisted(taskAuth) || mLockTaskModeTasks.isEmpty());
} }