|
89 | 89 | import android.provider.Settings; |
90 | 90 | import android.util.DisplayMetrics; |
91 | 91 | import android.util.EventLog; |
| 92 | +import android.util.FloatMath; |
92 | 93 | import android.util.Log; |
93 | 94 | import android.util.Pair; |
94 | 95 | import android.util.Slog; |
@@ -5261,8 +5262,8 @@ public Bitmap screenshotApplications(IBinder appToken, int width, int height) { |
5261 | 5262 | synchronized(mWindowMap) { |
5262 | 5263 | long ident = Binder.clearCallingIdentity(); |
5263 | 5264 |
|
5264 | | - dw = mAppDisplayWidth; |
5265 | | - dh = mAppDisplayHeight; |
| 5265 | + dw = mCurDisplayWidth; |
| 5266 | + dh = mCurDisplayHeight; |
5266 | 5267 |
|
5267 | 5268 | int aboveAppLayer = mPolicy.windowTypeToLayerLw( |
5268 | 5269 | WindowManager.LayoutParams.TYPE_APPLICATION) * TYPE_LAYER_MULTIPLIER |
@@ -5382,7 +5383,7 @@ public Bitmap screenshotApplications(IBinder appToken, int width, int height) { |
5382 | 5383 | Bitmap bm = Bitmap.createBitmap(width, height, rawss.getConfig()); |
5383 | 5384 | Matrix matrix = new Matrix(); |
5384 | 5385 | 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)); |
5386 | 5387 | Canvas canvas = new Canvas(bm); |
5387 | 5388 | canvas.drawBitmap(rawss, matrix, null); |
5388 | 5389 | canvas.setBitmap(null); |
|
0 commit comments