Fix various places that were using the wrong display metrics.
Change-Id: I1ac2a0c4a1b7c851dbc99d26f295c7dd49b0bd5c
This commit is contained in:
@@ -69,7 +69,7 @@ class ScreenRotationAnimation {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
mDisplay = display;
|
mDisplay = display;
|
||||||
|
|
||||||
display.getMetrics(mDisplayMetrics);
|
display.getRealMetrics(mDisplayMetrics);
|
||||||
|
|
||||||
Bitmap screenshot = Surface.screenshot(0, 0);
|
Bitmap screenshot = Surface.screenshot(0, 0);
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ class ScreenRotationAnimation {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mDisplay.getMetrics(mDisplayMetrics);
|
mDisplay.getRealMetrics(mDisplayMetrics);
|
||||||
|
|
||||||
// Initialize the animations. This is a hack, redefining what "parent"
|
// Initialize the animations. This is a hack, redefining what "parent"
|
||||||
// means to allow supplying the last and next size. In this definition
|
// means to allow supplying the last and next size. In this definition
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class StrictModeFlash {
|
|||||||
|
|
||||||
public StrictModeFlash(Display display, SurfaceSession session) {
|
public StrictModeFlash(Display display, SurfaceSession session) {
|
||||||
final DisplayMetrics dm = new DisplayMetrics();
|
final DisplayMetrics dm = new DisplayMetrics();
|
||||||
display.getMetrics(dm);
|
display.getRealMetrics(dm);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
mSurface = new Surface(session, 0, "StrictModeFlash", -1, 1, 1, PixelFormat.TRANSLUCENT, 0);
|
mSurface = new Surface(session, 0, "StrictModeFlash", -1, 1, 1, PixelFormat.TRANSLUCENT, 0);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class Watermark {
|
|||||||
|
|
||||||
Watermark(Display display, SurfaceSession session, String[] tokens) {
|
Watermark(Display display, SurfaceSession session, String[] tokens) {
|
||||||
final DisplayMetrics dm = new DisplayMetrics();
|
final DisplayMetrics dm = new DisplayMetrics();
|
||||||
display.getMetrics(dm);
|
display.getRealMetrics(dm);
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
Log.i(WindowManagerService.TAG, "*********************** WATERMARK");
|
Log.i(WindowManagerService.TAG, "*********************** WATERMARK");
|
||||||
|
|||||||
Reference in New Issue
Block a user