Merge "Block recent work profile apps content capture" into sc-dev am: ad4c83ad36
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13961492 Change-Id: I7596fc6d104a554d82d8c5070932fad377c17f60
This commit is contained in:
@@ -96,7 +96,7 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
|
||||
}
|
||||
|
||||
getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated);
|
||||
boolean isAllowedByPolicy = thumbnail.isRealSnapshot;
|
||||
boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot();
|
||||
getActionsView().setCallbacks(new OverlayUICallbacksGoImpl(isAllowedByPolicy, task));
|
||||
|
||||
mTaskId = task.key.id;
|
||||
|
||||
@@ -176,7 +176,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
|
||||
|
||||
if (thumbnail != null) {
|
||||
getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated);
|
||||
boolean isAllowedByPolicy = thumbnail.isRealSnapshot;
|
||||
boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot();
|
||||
getActionsView().setCallbacks(new OverlayUICallbacksImpl(isAllowedByPolicy, task));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,13 +440,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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user