This is a strange one. I'm debugging my rather old Android game (from 2010 for Android 2.1) on a Galaxy S6 running Lollipop (5.1.1).
The actual resolution is 2560x1440 when the device is in landscape, but it seems the OS reports something akin to a viewport type of metrics (640x360), which could be due to the game targeting an older version of Android and being presented in compatibility mode. On a Nexus 7 running 5.1.1, however, getting the display metrics yields something much closer to the actual device resolution (962x553 where actual resolution is 1280x800), and the game runs fine without graphics/layout problems.
But on the Galaxy S6, when the game is freshly installed and run via Eclipse (debug signed), onCreate() finds the display metrics of 640x360 and the layout and graphics all work properly the first time it is launched. However, closing the app/game and re-launching it causes onCreate() to find metrics of 480x270 and the layout is "messed up", i.e. drawn smaller than it should be in the top left of what SHOULD be the actual window/viewport area.
Has anyone seen this happen before? Seems like a pretty obvious bug, perhaps specific to Samsung devices running lollipop (5.1.1). The emulator of course gives 640x360 every time, so I'm wondering if this is a Samsung screwup or a bug in 5.1.1 Lollipop...
At first I thought the OS was just reporting incorrect metrics, but now it seems that it's actually creating an incorrectly sized window (480x270).