summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Johnston <acjohnston@google.com>2021-04-07 17:00:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-07 17:00:40 +0000
commit18217e7f94b221907a9454510d95ec2c0ca114d8 (patch)
treed555276eb179d60a70316a55392a4ee3fffa7885
parent602da1840d5ccc3414734b7c2d335ba876433efd (diff)
parent8786016e859c639de1d3722c1911b5389ef8fc39 (diff)
downloadLauncher3-18217e7f94b221907a9454510d95ec2c0ca114d8.tar.gz
Block recent work profile apps content capture am: 8786016e85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13989187 Change-Id: I0e39d019e358dd8e0016927a9c9b50717cf6eb93
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java2
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java5
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 e9614d1351..1eaacd30bb 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 b2f937f8c2..dbea80adbc 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;
}
/**