Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
cts
Commits
021273a5
Commit
021273a5
authored
12 years ago
by
Madan Ankapura
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Download
Plain Diff
Merge "Use real sizes for display metrics" into jb-mr2-dev
parents
8e4d2d03
56c756f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
tools/device-setup/TestDeviceSetup/Android.mk
tools/device-setup/TestDeviceSetup/Android.mk
+1
-1
tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java
...Setup/src/android/tests/getinfo/DeviceInfoInstrument.java
+1
-1
No files found.
tools/device-setup/TestDeviceSetup/Android.mk
View file @
021273a5
...
...
@@ -26,7 +26,7 @@ LOCAL_DEX_PREOPT := false
LOCAL_JAVA_LIBRARIES
:=
android.test.runner
LOCAL_SDK_VERSION
:=
1
6
LOCAL_SDK_VERSION
:=
1
7
LOCAL_PACKAGE_NAME
:=
TestDeviceSetup
...
...
This diff is collapsed.
Click to expand it.
tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java
View file @
021273a5
...
...
@@ -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
.
get
Real
Metrics
(
metrics
);
addResult
(
RESOLUTION
,
String
.
format
(
"%sx%s"
,
metrics
.
widthPixels
,
metrics
.
heightPixels
));
addResult
(
SCREEN_DENSITY
,
metrics
.
density
);
addResult
(
SCREEN_X_DENSITY
,
metrics
.
xdpi
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment