App targeting Nougat+ and window size on Android-x86/Oreo

422 views
Skip to first unread message

Michael Goffioul

unread,
Mar 29, 2018, 8:27:11 PM3/29/18
to andro...@googlegroups.com
I've compiled the oreo-x86 branch of Android-x86 and installed it on a test device. The device has a screen resolution of 1366x768 and I've disabled the bottom navigation bar and statuc bar in my Android-x86 build (I don't think this is the cause of my problem, I'm mentioning it for completeness).

When I install and run one of my existing app, its window doesn't extend to the full screen area, it's limited to 1339x720. As the built-in apps (e.g. Settings, Browser2) do not have that problem, I started to suspect something related to targetSdkVersion in the manifest. My app targets API 19. If I change it to target 24 (or above) and recompile, it uses the full screen area.

I'm not sure what is the cause of this, and I would appreciate any hint.

For the record, I used the compile Android-x86/Nougat (with the same mods I used for Oreo) and the exact same app does not show the problem, even while still targeting API 19.

Does that ring a bell to anybody?

Thanks,
Michael.

Chih-Wei Huang

unread,
Mar 29, 2018, 10:41:53 PM3/29/18
to Android-x86
I have noticed that at the beginning of oreo-x86 porting.
Even the Youtube app is not full screen.
However, it seems doesn't happen recently.
I'm not sure if it's fixed in the framework (8.1?)
or at the app side like you said.



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Michael Goffioul

unread,
Mar 30, 2018, 8:59:24 AM3/30/18
to andro...@googlegroups.com
I'm still having the problem with a freshly compiled android-x86, so I guess it hasn't been fixed on the framework side. I'd be interested to know where it comes from, though. I couldn't find anywhere on the web a description for such a functional change.

Michael.

Michael Goffioul

unread,
Apr 18, 2018, 4:01:26 PM4/18/18
to andro...@googlegroups.com
After long debugging, I finally found out what's going on. I'm just posting it for information purpose.

It was actually the combination of multiple facts:
- APK targeting pre-O have automatically a max aspect ratio of 1.86 (16.7:9)
- APK targeting post-N are automatically marked as resizeable
- config_showNavigationBar must be set to false, even when using com.android.systemui.statusbar.tv.TvStatusBar as statusbar component in SystemUI; otherwise the available height for applications will be reduced by the configured navigation bar height

My hardware has a screen of 1366x768. Because config_showNavigationBar was true in my firmware, the available height for apps was limited to 720. The max aspect ratio then limited the width to 1339. APK targeting N and above were marked as resizeable and were then not affected (in this case, it appeared config_showNavigationBar == true didn't impact the resized height and the apps were using the real full screen).

Michael.

Reply all
Reply to author
Forward
0 new messages