kart: remove TV compatibility, target phones
- Commit
d40827d63d44fa197db527bdea04ce2d190df332- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 13:36 UTC (18 hours ago)
- Parents
f46c006
Kart declared itself a TV app: the leanback feature was required, the activity carried LEANBACK_LAUNCHER and a TV banner, touchscreen was optional, and the native engine opted into armeabi-v7a for a 32-bit Google TV box. The owner wants kart on a phone, so none of that applies anymore. - Manifest: leanback uses-feature and LEANBACK_LAUNCHER category gone; touchscreen is now required (the on-screen controls are the primary input); no TV banner. - Delete the now-unreferenced banner drawable. - Build: drop the nativeAbis armv7 opt-in and the rustNativeLib extraAbis entry, so kart_engine builds arm64 like every other app. The GLES renderer stays in the engine as the non-Vulkan fallback. Verified with the module lint/test run after this stack and an aapt2 manifest dump of the release APK (no leanback, no LEANBACK_LAUNCHER).
Diff
games/kart/build.gradle.kts
diff --git a/games/kart/build.gradle.kts b/games/kart/build.gradle.ktsindex 34636ff90c..09dc07ccb7 100644--- a/games/kart/build.gradle.kts+++ b/games/kart/build.gradle.kts@@ -15,13 +15,6 @@ android { } } -// ONN 4K box (32-bit armeabi-v7a userspace, Mali-G31, no Vulkan): the GLES-// fallback in src/main/rust/gles renders 3D there. Same arrangement as-// :cast:tv + :library:e2ee-p2p (the only armv7 precedent in the tree).-nativeAbis {- armv7 = true-}- androidComponents { onVariants { variant -> variant.sources.jniLibs?.addStaticSourceDirectory(@@ -35,13 +28,11 @@ androidComponents { // KartNative.isAvailable gates every call, so devices without the .so run the // placeholder race. Listing images are hand-captured (Layoutlib can't render // the Vulkan surface); see the plan's verification notes.-// armeabi-v7a as well as arm64: the ONN box runs this app directly on 32-bit-// Google TV hardware. Only kart_engine opts in (:library:e2ee-p2p precedent) —-// no other native module changes.+// Phone-only: arm64 like every other app. The GLES renderer stays in the+// engine as the non-Vulkan fallback. rustNativeLib( "kart_engine", "kart",- extraAbis = listOf(ABI_ARMV7), // kart_gles.* are GLSL ES, compiled at run time by the GLES fallback. shaders = listOf("kart.vert", "kart.frag"), )
games/kart/src/main/AndroidManifest.xml
diff --git a/games/kart/src/main/AndroidManifest.xml b/games/kart/src/main/AndroidManifest.xmlindex da9cfb734d..8ddc76c6e1 100644--- a/games/kart/src/main/AndroidManifest.xml+++ b/games/kart/src/main/AndroidManifest.xml@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- TV lobby: TCP accept + mDNS advertise/register for the phone controllers. -->+ <!-- LAN lobby: TCP accept + mDNS advertise/register so other phones can join a race. --> <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> <!-- This app uses no motion/environment sensors; MAOS withholds the --> <!-- Sensors permission at install instead of auto-granting it. -->@@ -13,16 +13,13 @@ <uses-permission android:name="android.permission.ACCESS_LOCAL_NETWORK" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> - <!-- TV launcher presence: leanback declares this a TV app, touchscreen is- optional (D-pad + phones-as-controllers are the inputs). Mirrors cast/tv. -->- <uses-feature- android:name="android.software.leanback"- android:required="true" />+ <!-- Phone target: the on-screen touch controls are the primary input, so a+ touchscreen is required. --> <uses-feature android:name="android.hardware.touchscreen"- android:required="false" />- <!-- Wifi is only inspected (ACCESS_WIFI_STATE), not required: Ethernet-only- TVs must stay installable. Mirrors cast/tv. -->+ android:required="true" />+ <!-- Wifi is only inspected (ACCESS_WIFI_STATE), not required: a phone on+ mobile data or a local hotspot must stay installable. --> <uses-feature android:name="android.hardware.wifi" android:required="false" />@@ -30,7 +27,6 @@ <application android:allowBackup="true" android:backupAgent=".platform.AppBackupAgent"- android:banner="@drawable/banner" android:dataExtractionRules="@xml/data_extraction_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name"@@ -45,8 +41,6 @@ <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />- <!-- TV launcher row: without this the app is invisible on Google TV. -->- <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter> </activity> </application>
games/kart/src/main/res/drawable/banner.xml
diff --git a/games/kart/src/main/res/drawable/banner.xml b/games/kart/src/main/res/drawable/banner.xmldeleted file mode 100644index 1151c7b6ac..0000000000--- a/games/kart/src/main/res/drawable/banner.xml+++ /dev/null@@ -1,26 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>-<!-- TV launcher banner: dark backdrop with the same directions_car glyph the- adaptive launcher icon uses, so the TV row matches the phone icon.- cast/tv banner.xml is the shape precedent. Intrinsic size is capped at- 200x112.5dp (VectorRaster limit, 16:9 preserved); the 320x180 viewport is- unchanged, so the glyph geometry and TV-row rendering scale identically. -->-<vector xmlns:android="http://schemas.android.com/apk/res/android"- android:width="200dp"- android:height="112.5dp"- android:viewportWidth="320"- android:viewportHeight="180">- <path- android:fillColor="#FF1B1B1F"- android:pathData="M0,0h320v180H0z" />- <group- android:pivotX="0"- android:pivotY="0"- android:scaleX="0.104"- android:scaleY="0.104"- android:translateX="110"- android:translateY="40">- <path- android:fillColor="#FFFFFFFF"- android:pathData="M240,760L240,800Q240,817 228.5,828.5Q217,840 200,840L160,840Q143,840 131.5,828.5Q120,817 120,800L120,480L204,240Q210,222 225.5,211Q241,200 260,200L700,200Q719,200 734.5,211Q750,222 756,240L840,480L840,800Q840,817 828.5,828.5Q817,840 800,840L760,840Q743,840 731.5,828.5Q720,817 720,800L720,760L240,760ZM232,400L728,400L686,280L274,280L232,400ZM200,480L200,480L200,680L200,680L200,480ZM300,640Q325,640 342.5,622.5Q360,605 360,580Q360,555 342.5,537.5Q325,520 300,520Q275,520 257.5,537.5Q240,555 240,580Q240,605 257.5,622.5Q275,640 300,640ZM660,640Q685,640 702.5,622.5Q720,605 720,580Q720,555 702.5,537.5Q685,520 660,520Q635,520 617.5,537.5Q600,555 600,580Q600,605 617.5,622.5Q635,640 660,640ZM200,680L760,680L760,480L200,480L200,680Z" />- </group>-</vector>