diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/DisplayContent.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 47b1528f77b9..42b0e12cf33a 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -4814,16 +4814,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final Bitmap bitmap = screenshotBuffer == null ? null : screenshotBuffer.asBitmap(); if (bitmap == null) { Slog.w(TAG_WM, "Failed to take screenshot"); - return null; - } - - // Create a copy of the screenshot that is immutable and backed in ashmem. - // This greatly reduces the overhead of passing the bitmap between processes. - final Bitmap ret = bitmap.asShared(); - if (ret != bitmap) { - bitmap.recycle(); } - return ret; + return bitmap; } @Override |