diff options
author | Alex Johnston <acjohnston@google.com> | 2021-03-29 13:51:38 +0100 |
---|---|---|
committer | Alex Johnston <acjohnston@google.com> | 2021-03-29 18:12:00 +0000 |
commit | 8786016e859c639de1d3722c1911b5389ef8fc39 (patch) | |
tree | be355705ec185437d9b7be2c20405b8f5e7063d5 | |
parent | 57874e6b3982f8b2c0d6ba3b61ae24382fdf6fef (diff) |
Block recent work profile apps content capture
Stop data exposure of work profile by blocking
content capture of recents apps when the work
profile is locked.
Manual testing steps
* Set up work profile
* Set personal and work pattern
* Open work app, enter work pattern and
verify content capture is possible
* Lock device
* Go to Recents and select already opened
work app. Verify content capture is not
possible until work pattern is entered.
Bug: 168802517
Test: manual testing
Change-Id: I3e6ba1d8645335785e8e26cdc895ea9c0017a0fd
Merged-In: I3e6ba1d8645335785e8e26cdc895ea9c0017a0fd
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java | 2 | ||||
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java index e9614d135..1eaacd30b 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java @@ -146,7 +146,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { */ public void initOverlay(Task task, ThumbnailData thumbnail, Matrix matrix, boolean rotated) { - final boolean isAllowedByPolicy = thumbnail.isRealSnapshot; + final boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot(); getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated); diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java index b2f937f8c..dbea80adb 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java @@ -447,13 +447,14 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc } /** - * Returns whether the snapshot is real. + * Returns whether the snapshot is real. If the device is locked for the user of the task, + * the snapshot used will be an app-theme generated snapshot instead of a real snapshot. */ public boolean isRealSnapshot() { if (mThumbnailData == null) { return false; } - return mThumbnailData.isRealSnapshot; + return mThumbnailData.isRealSnapshot && !mTask.isLocked; } /** |