From 04e94e9938ac1d53875c6616ea79ad7e020edef1 Mon Sep 17 00:00:00 2001 From: Brendan Szymanski Date: Thu, 16 Jul 2026 13:29:27 -0400 Subject: [PATCH] Move AndroidTvOpiOverlay to product to disable UI width cap The config_maxUiWidth=0 override never took effect from /vendor/overlay: static RRO precedence is decided by partition order before priority, so the product-partition TvFrameworkOverlay (1920) always won and silently re-capped the UI to 1920x1080 on 4K displays. Moving our overlay to the product partition lets its priority 10 beat TvFrameworkOverlay's 0, so the cap is disabled and the UI renders at the display's native resolution. Users can select a lower mode in Settings if needed. --- overlay/AndroidTvOpiOverlay/Android.bp | 8 ++++++- .../res/values-xhdpi/config.xml | 22 +++++++++++++++---- .../AndroidTvOpiOverlay/res/values/config.xml | 12 +++++----- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/overlay/AndroidTvOpiOverlay/Android.bp b/overlay/AndroidTvOpiOverlay/Android.bp index 3f02f9c..18aaa41 100644 --- a/overlay/AndroidTvOpiOverlay/Android.bp +++ b/overlay/AndroidTvOpiOverlay/Android.bp @@ -3,9 +3,15 @@ // // SPDX-License-Identifier: Apache-2.0 +// This overlay MUST live on the product partition: it overrides resources that +// TvFrameworkOverlay (a product-partition RRO from device/google/atv) also +// overrides, and static RRO precedence is decided by partition order first +// (system < vendor < odm < oem < product < system_ext) and android:priority +// second. From /vendor/overlay our entries always lose to TvFrameworkOverlay +// regardless of priority; on /product our priority 10 beats its priority 0. runtime_resource_overlay { name: "AndroidTvOpiOverlay", resource_dirs: ["res"], sdk_version: "current", - vendor: true, + product_specific: true, } diff --git a/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml b/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml index 73b9322..0989af4 100644 --- a/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml +++ b/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml @@ -16,9 +16,23 @@ --> - + 0 diff --git a/overlay/AndroidTvOpiOverlay/res/values/config.xml b/overlay/AndroidTvOpiOverlay/res/values/config.xml index f8ab1ca..280b5af 100644 --- a/overlay/AndroidTvOpiOverlay/res/values/config.xml +++ b/overlay/AndroidTvOpiOverlay/res/values/config.xml @@ -51,12 +51,12 @@ + 1920 (values/ and values-xhdpi buckets survive PRODUCT_AAPT_PREF_CONFIG + stripping), which scales a 4K display down to a 1920x1080 logical UI. + 0 disables the cap so the UI renders at the display's native resolution. + The density-qualified values-xhdpi entry (see values-xhdpi/config.xml) is + the one that actually decides the contest at runtime; this unqualified + entry is kept as a fallback for density configs with no xhdpi match. --> 0