diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-27 13:17:27 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-27 13:17:27 +0100 |
commit | bd51eb2790192127293eb490238a03a89eef1c94 (patch) | |
tree | b4002049c52fe29f241882d826d07b4b778443cf /src/main/java/de/pixart/messenger/ui | |
parent | 2f9d92fcb5b0adb922ff8896ffaa90e70ffe5672 (diff) |
added some logging to FullScreenViewer
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java index faddebb86..48ac22e19 100644 --- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java @@ -130,13 +130,14 @@ public class ShowFullscreenMessageActivity extends Activity { BitmapFactory.decodeFile(new File(file.getPath()).getAbsolutePath(), options); height = options.outHeight; width = options.outWidth; + Log.d(Config.LOGTAG, "Image height: " + height + ", width: " + width); if (width > height) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } - } else if (width < height) { + } else if (width <= height) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT); } else { @@ -166,13 +167,14 @@ public class ShowFullscreenMessageActivity extends Activity { retriever.setDataSource(uri.getPath()); height = Integer.valueOf(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT)); width = Integer.valueOf(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH)); + Log.d(Config.LOGTAG, "Video height: " + height + ", width: " + width); if (width > height) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } - } else if (width < height) { + } else if (width <= height) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT); } else { |