Commit 021273a5 authored by Madan Ankapura's avatar Madan Ankapura Committed by Android (Google) Code Review
Browse files

Merge "Use real sizes for display metrics" into jb-mr2-dev

parents 8e4d2d03 56c756f3
......@@ -26,7 +26,7 @@ LOCAL_DEX_PREOPT := false
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_SDK_VERSION := 16
LOCAL_SDK_VERSION := 17
LOCAL_PACKAGE_NAME := TestDeviceSetup
......
......@@ -77,7 +77,7 @@ public class DeviceInfoInstrument extends Instrumentation implements DeviceInfoC
WindowManager wm = (WindowManager) getContext().getSystemService(
Context.WINDOW_SERVICE);
Display d = wm.getDefaultDisplay();
d.getMetrics(metrics);
d.getRealMetrics(metrics);
addResult(RESOLUTION, String.format("%sx%s", metrics.widthPixels, metrics.heightPixels));
addResult(SCREEN_DENSITY, metrics.density);
addResult(SCREEN_X_DENSITY, metrics.xdpi);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment