// Vanta layer. Resource files under overlay/ and setup/res/values/identity.xml
// are generated by tools/gen_overlays.py from design/tokens.json.

soong_namespace {}

runtime_resource_overlay {
    name: "VantaFrameworkOverlay",
    manifest: "overlay/VantaFrameworkOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaFrameworkOverlay/res"],
    product_specific: true,
}

runtime_resource_overlay {
    name: "VantaSettingsProviderOverlay",
    manifest: "overlay/VantaSettingsProviderOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaSettingsProviderOverlay/res"],
    product_specific: true,
}

android_app {
    name: "VantaSetup",
    manifest: "setup/AndroidManifest.xml",
    srcs: ["setup/src/**/*.java"],
    resource_dirs: ["setup/res"],
    certificate: "platform",
    platform_apis: true,
    system_ext_specific: true,
    optimize: {
        enabled: false,
    },
}

// Optional prebuilt APKs (S10Bridge, ZodroidHalo) are declared in
// prebuilt/Android.bp, which tools/stage.sh writes for the files it staged,
// so Soong never parses an import whose APK is absent.

runtime_resource_overlay {
    name: "VantaSystemUIOverlay",
    manifest: "overlay/VantaSystemUIOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaSystemUIOverlay/res"],
    product_specific: true,
}

// Vanta Rail, gesture-only (OVERHAUL.md row 6). Re-asserts gestural as the
// framework default and removes the 3- and 2-button mode overlays from the
// image. Settings' navigation picker lists a mode only if its overlay package
// is installed (SystemNavigationGestureSettings.getCandidates ->
// isOverlayPackageAvailable), so the two options disappear without a patch;
// verify_tree.py asserts that gate is still there.
runtime_resource_overlay {
    name: "VantaRailOnly",
    manifest: "overlay/VantaRailOnly/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaRailOnly/res"],
    product_specific: true,
    overrides: [
        "NavigationBarMode3ButtonOverlay",
        "NavigationBarMode2ButtonOverlay",
    ],
}

// Settings retheme (row 16). SettingsLib is a static library of Settings, so
// its settingslib_* resources are compiled into com.android.settings and are
// overlaid through this one target; no separate SettingsLib overlay exists.
runtime_resource_overlay {
    name: "VantaSettingsOverlay",
    manifest: "overlay/VantaSettingsOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaSettingsOverlay/res"],
    product_specific: true,
}

// Recents (row 14): Launcher3QuickStep (package com.android.launcher3) keeps
// serving Overview while Vanta Home holds HOME, so its fallback recents is
// re-skinned here.
runtime_resource_overlay {
    name: "VantaLauncher3Overlay",
    manifest: "overlay/VantaLauncher3Overlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaLauncher3Overlay/res"],
    product_specific: true,
}

// Brand: LineageOS -> Vanta wherever a user reads it, in every locale the
// target translates into. Generated by tools/gen_branding.py.
runtime_resource_overlay {
    name: "VantaBrandPlatformOverlay",
    manifest: "overlay/VantaBrandPlatformOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaBrandPlatformOverlay/res"],
    product_specific: true,
}

runtime_resource_overlay {
    name: "VantaBrandPartsOverlay",
    manifest: "overlay/VantaBrandPartsOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaBrandPartsOverlay/res"],
    product_specific: true,
}

// Font: LineageOS 24.0 has no IBM Plex, so Vanta ships the files and the font
// overlay the theme JSON names. The named family is NOT a module here: a second
// module installing /product/etc/fonts_customization.xml collides with
// Lineage's in Kati whatever `overrides:` says, so tools/fonts.sh writes
// Lineage's file + ours (tools/gen_fonts.py) over Lineage's source instead.
prebuilt_font {
    name: "IBMPlexSans-VF.ttf",
    src: "fonts/IBMPlexSans-VF.ttf",
    product_specific: true,
}

prebuilt_font {
    name: "IBMPlexSans-Italic-VF.ttf",
    src: "fonts/IBMPlexSans-Italic-VF.ttf",
    product_specific: true,
}

runtime_resource_overlay {
    name: "FontIBMPlexSansOverlay",
    manifest: "overlay/FontIBMPlexSansOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/FontIBMPlexSansOverlay/res"],
    product_specific: true,
}

// Vanta Tones as the framework's key-click / focus / back sounds
// (xml/audio_assets) and as SettingsProvider's lock / charging defaults.
// See tones/tones.mk for why the files carry Vanta_ names.
runtime_resource_overlay {
    name: "VantaSoundsOverlay",
    manifest: "overlay/VantaSoundsOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaSoundsOverlay/res"],
    product_specific: true,
}

runtime_resource_overlay {
    name: "VantaSoundsSettingsOverlay",
    manifest: "overlay/VantaSoundsSettingsOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaSoundsSettingsOverlay/res"],
    product_specific: true,
}

// Default role holders (assistant = Vanta Voice), above MindTheGapps' GmsOverlay.
runtime_resource_overlay {
    name: "VantaRolesOverlay",
    manifest: "overlay/VantaRolesOverlay/AndroidManifest.xml",
    resource_dirs: ["overlay/VantaRolesOverlay/res"],
    product_specific: true,
}
