1
0
Fork 0

Switch PRODUCT_AAPT_PREF_CONFIG to xhdpi to fix display sizing

The root cause of the oversized/clipped UI is TvFrameworkOverlay's
config_maxUiWidth=1280 in the values-tvdpi resource bucket. With
PRODUCT_AAPT_PREF_CONFIG=tvdpi, the device resolves this bucket and
the 1280px cap is enforced, limiting the logical display to 1280x720
(which SurfaceFlinger then upscales to 1920x1080).

The Raspberry Pi 5 ATV build (KonstaKANG) uses PRODUCT_AAPT_PREF_CONFIG=xhdpi
and has no display sizing issues, because values-xhdpi has
config_maxUiWidth=1920 (no effective cap on 1080p displays).

Also adds a values-xhdpi/config.xml overlay with config_maxUiWidth=0 as
defense-in-depth, matching the existing values-tvdpi override.

Copyright (C) 2026 Brendan Szymanski <hello@bscubed.dev>
This commit is contained in:
Brendan Szymanski 2026-07-14 11:47:44 -04:00
parent 94e8da202f
commit 6057c30431
2 changed files with 29 additions and 1 deletions

View file

@ -9,7 +9,11 @@
# Inherit device configuration
$(call inherit-product, device/rockchip/tart/aosp_tart.mk)
PRODUCT_AAPT_PREF_CONFIG := tvdpi
# Use xhdpi instead of tvdpi to avoid TvFrameworkOverlay's config_maxUiWidth=1280
# in the values-tvdpi bucket, which caps a 1920x1080 display to 1280x720.
# The RPi5 ATV build uses the same approach (PRODUCT_AAPT_PREF_CONFIG := xhdpi)
# and resolves config_maxUiWidth=1920 (no effective cap on 1080p).
PRODUCT_AAPT_PREF_CONFIG := xhdpi
PRODUCT_CHARACTERISTICS := tv
# LineageOS ATV base

View file

@ -0,0 +1,24 @@
<?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 value in the values-xhdpi
bucket, which this device now resolves via PRODUCT_AAPT_PREF_CONFIG=xhdpi
(matching the RPi5 ATV approach). Our RRO priority 10 beats their priority
0, so 0 (disabled cap) wins. -->
<integer name="config_maxUiWidth">0</integer>
</resources>