Skip to content
Snippets Groups Projects
Commit 198ff0fe authored by Dhina17's avatar Dhina17
Browse files

services: Intercept locked apps launching from recents

When we launch the locked app from recents after lock timeout,
The app is being launched along with the auth screen.
so the app contents is clearly visible and accessible and
it's even worse in landscape apps.

This commit fixes the issue by let the app from recents
go through the activity start interceptor.

Change-Id: I1c463c6ef05ecff53798983aabc5a7eb7774d21c
parent 90a77104
No related merge requests found
......@@ -2756,11 +2756,19 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
"startActivityFromRecents");
}
final Task rootTask = task.getRootTask();
final String packageName =
rootTask != null && rootTask.realActivity != null
? rootTask.realActivity.getPackageName()
: null;
final boolean needAppUnlock = packageName != null
&& mService.getAppLockManagerService()
.requireUnlock(packageName, task.mUserId);
// If the user must confirm credentials (e.g. when first launching a work
// app and the Work Challenge is present) let startActivityInPackage handle
// the intercepting.
if (!mService.mAmInternal.shouldConfirmCredentials(task.mUserId)
&& task.getRootActivity() != null) {
&& task.getRootActivity() != null && !needAppUnlock) {
final ActivityRecord targetActivity = task.getTopNonFinishingActivity();
mRootWindowContainer.startPowerModeLaunchIfNeeded(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment