1
0
Fork 0

Override config_maxUiWidth in values-tvdpi bucket to fix display sizing

The Android TV framework overlay (TvFrameworkOverlay) sets
config_maxUiWidth=1280 in its values-tvdpi resource bucket. This device
resolves the tvdpi bucket via PRODUCT_AAPT_PREF_CONFIG=tvdpi, so the
logical display gets capped to 1280x720@320dpi even though the physical
panel runs at 1920x1080. SurfaceFlinger then upscales 720p->1080p, making
the UI oversized/clipped, and makes the Settings Resolution picker a no-op.

The previous fix (commit ada397e) put config_maxUiWidth=0 in the unqualified
values/ bucket, which loses to values-tvdpi because Android prioritizes
config-qualified resources over RRO priority.

This new override lives in values-tvdpi/ — same config-qualifier bucket as
TvFrameworkOverlay's entry — so RRO priority decides. Our overlay priority
10 beats TvFrameworkOverlay's priority 0, and config_maxUiWidth=0 disables
the cap, letting the native 1920x1080 panel render at full resolution.

Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
This commit is contained in:
Brendan Szymanski 2026-07-13 22:49:55 -04:00
parent f2b7f770b3
commit 10a332665b

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Override TvFrameworkOverlay's config_maxUiWidth=1280 in the values-tvdpi
bucket (which this device resolves via PRODUCT_AAPT_PREF_CONFIG=tvdpi).
At the same config-qualifier level, our RRO priority 10 beats their
priority 0, so 0 (disabled cap) wins over 1280. This lets the native
1920x1080 panel render at full resolution instead of being capped to
1280x720@320dpi and upscaled. -->
<integer name="config_maxUiWidth">0</integer>
</resources>