Skip to content

Commit dcbe048

Browse files
mikejurkaAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug: don't show system bar in app thumbnails"
2 parents a561965 + 4accb6a commit dcbe048

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
import android.provider.Settings;
9090
import android.util.DisplayMetrics;
9191
import android.util.EventLog;
92+
import android.util.FloatMath;
9293
import android.util.Log;
9394
import android.util.Pair;
9495
import android.util.Slog;
@@ -5261,8 +5262,8 @@ public Bitmap screenshotApplications(IBinder appToken, int width, int height) {
52615262
synchronized(mWindowMap) {
52625263
long ident = Binder.clearCallingIdentity();
52635264

5264-
dw = mAppDisplayWidth;
5265-
dh = mAppDisplayHeight;
5265+
dw = mCurDisplayWidth;
5266+
dh = mCurDisplayHeight;
52665267

52675268
int aboveAppLayer = mPolicy.windowTypeToLayerLw(
52685269
WindowManager.LayoutParams.TYPE_APPLICATION) * TYPE_LAYER_MULTIPLIER
@@ -5382,7 +5383,7 @@ public Bitmap screenshotApplications(IBinder appToken, int width, int height) {
53825383
Bitmap bm = Bitmap.createBitmap(width, height, rawss.getConfig());
53835384
Matrix matrix = new Matrix();
53845385
ScreenRotationAnimation.createRotationMatrix(rot, dw, dh, matrix);
5385-
matrix.postTranslate(-(int)(frame.left*scale), -(int)(frame.top*scale));
5386+
matrix.postTranslate(-FloatMath.ceil(frame.left*scale), -FloatMath.ceil(frame.top*scale));
53865387
Canvas canvas = new Canvas(bm);
53875388
canvas.drawBitmap(rawss, matrix, null);
53885389
canvas.setBitmap(null);

0 commit comments

Comments
 (0)