Loading services/java/com/android/server/am/ActivityStack.java +18 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.os.Binder; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -280,6 +281,13 @@ final class ActivityStack { */ boolean mDismissKeyguardOnNextActivity = false; /** * Save the most recent screenshot for reuse. This keeps Recents from taking two identical * screenshots, one for the Recents thumbnail and one for the pauseActivity thumbnail. */ private ActivityRecord mLastScreenshotActivity = null; private Bitmap mLastScreenshotBitmap = null; int mThumbnailWidth = -1; int mThumbnailHeight = -1; Loading Loading @@ -931,8 +939,16 @@ final class ActivityStack { } if (w > 0) { return mService.mWindowManager.screenshotApplications(who.appToken, Display.DEFAULT_DISPLAY, w, h); if (who != mLastScreenshotActivity || mLastScreenshotBitmap == null || mLastScreenshotBitmap.getWidth() != w || mLastScreenshotBitmap.getHeight() != h) { mLastScreenshotActivity = who; mLastScreenshotBitmap = mService.mWindowManager.screenshotApplications( who.appToken, Display.DEFAULT_DISPLAY, w, h); } if (mLastScreenshotBitmap != null) { return mLastScreenshotBitmap.copy(Config.ARGB_8888, true); } } return null; } Loading Loading
services/java/com/android/server/am/ActivityStack.java +18 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.os.Binder; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -280,6 +281,13 @@ final class ActivityStack { */ boolean mDismissKeyguardOnNextActivity = false; /** * Save the most recent screenshot for reuse. This keeps Recents from taking two identical * screenshots, one for the Recents thumbnail and one for the pauseActivity thumbnail. */ private ActivityRecord mLastScreenshotActivity = null; private Bitmap mLastScreenshotBitmap = null; int mThumbnailWidth = -1; int mThumbnailHeight = -1; Loading Loading @@ -931,8 +939,16 @@ final class ActivityStack { } if (w > 0) { return mService.mWindowManager.screenshotApplications(who.appToken, Display.DEFAULT_DISPLAY, w, h); if (who != mLastScreenshotActivity || mLastScreenshotBitmap == null || mLastScreenshotBitmap.getWidth() != w || mLastScreenshotBitmap.getHeight() != h) { mLastScreenshotActivity = who; mLastScreenshotBitmap = mService.mWindowManager.screenshotApplications( who.appToken, Display.DEFAULT_DISPLAY, w, h); } if (mLastScreenshotBitmap != null) { return mLastScreenshotBitmap.copy(Config.ARGB_8888, true); } } return null; } Loading