Merge "Block recent work profile apps content capture" into sc-dev
This commit is contained in:
commit
ad4c83ad36
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue