Invoking splitscreen takes snapshot of task without scrim
Change-Id: I456200f9f61f12b7b80a2604cfeffc2fa16711ce Fixes: 109676098 Test: splitscreen in overview
This commit is contained in:
parent
07fcd3bea2
commit
26f02037cd
|
@ -189,9 +189,14 @@ public class TaskSystemShortcut<T extends SystemShortcut> extends SystemShortcut
|
||||||
final Rect taskBounds = new Rect(position[0], position[1],
|
final Rect taskBounds = new Rect(position[0], position[1],
|
||||||
position[0] + width, position[1] + height);
|
position[0] + width, position[1] + height);
|
||||||
|
|
||||||
|
// Take the thumbnail of the task without a scrim and apply it back after
|
||||||
|
float alpha = thumbnailView.getDimAlpha();
|
||||||
|
thumbnailView.setDimAlpha(0);
|
||||||
Bitmap thumbnail = RecentsTransition.drawViewIntoHardwareBitmap(
|
Bitmap thumbnail = RecentsTransition.drawViewIntoHardwareBitmap(
|
||||||
taskBounds.width(), taskBounds.height(), thumbnailView, 1f,
|
taskBounds.width(), taskBounds.height(), thumbnailView, 1f,
|
||||||
Color.BLACK);
|
Color.BLACK);
|
||||||
|
thumbnailView.setDimAlpha(alpha);
|
||||||
|
|
||||||
AppTransitionAnimationSpecsFuture future =
|
AppTransitionAnimationSpecsFuture future =
|
||||||
new AppTransitionAnimationSpecsFuture(mHandler) {
|
new AppTransitionAnimationSpecsFuture(mHandler) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -161,6 +161,10 @@ public class TaskThumbnailView extends View {
|
||||||
updateThumbnailPaintFilter();
|
updateThumbnailPaintFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getDimAlpha() {
|
||||||
|
return mDimAlpha;
|
||||||
|
}
|
||||||
|
|
||||||
public Rect getInsets() {
|
public Rect getInsets() {
|
||||||
if (mThumbnailData != null) {
|
if (mThumbnailData != null) {
|
||||||
return mThumbnailData.insets;
|
return mThumbnailData.insets;
|
||||||
|
|
Loading…
Reference in New Issue