diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-04-20 18:18:51 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-05-16 11:58:27 -0700 |
commit | ac8dea12c17aa047e03a358110aeb60401d36aa2 (patch) | |
tree | 373ab19dcf21fce62352a6b511855261017649b5 /media/java | |
parent | 700ab1c75862babba90f54e02bdc877becd4f4fc (diff) | |
download | frameworks_base-ac8dea12c17aa047e03a358110aeb60401d36aa2.zip frameworks_base-ac8dea12c17aa047e03a358110aeb60401d36aa2.tar.gz frameworks_base-ac8dea12c17aa047e03a358110aeb60401d36aa2.tar.bz2 |
DO NOT MERGE. Integrate from master: Rework display size access.
Applications now get the display size from the window manager. No
behavior should be changed yet, this is just prep for some real
changes.
Change-Id: I47bf8b55ecd4476c25ed6482494a7bcc5fae45d2
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/mtp/MtpDatabase.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java index b900671..c9e0f6f 100644 --- a/media/java/android/mtp/MtpDatabase.java +++ b/media/java/android/mtp/MtpDatabase.java @@ -616,8 +616,8 @@ public class MtpDatabase { // use screen size as max image size Display display = ((WindowManager)mContext.getSystemService( Context.WINDOW_SERVICE)).getDefaultDisplay(); - int width = display.getWidth(); - int height = display.getHeight(); + int width = display.getMaximumSizeDimension(); + int height = display.getMaximumSizeDimension(); String imageSize = Integer.toString(width) + "x" + Integer.toString(height); imageSize.getChars(0, imageSize.length(), outStringValue, 0); outStringValue[imageSize.length()] = 0; |