Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78111ea0 authored by Luca Stefani's avatar Luca Stefani
Browse files

androidfw: Add Lineage res to default assets

Change-Id: I815a78e645a2eaf65667fea3789d0a68149ee075
parent 0815cde2
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ static const bool kIsDebug = false;
static const char* kAssetsRoot = "assets";
static const char* kAppZipName = NULL; //"classes.jar";
static const char* kSystemAssets = "framework/framework-res.apk";
static const char* kLineageAssets = "framework/org.lineageos.platform-res.apk";
static const char* kResourceCache = "resource-cache";

static const char* kExcludeExtension = ".EXCLUDE";
@@ -366,10 +367,19 @@ bool AssetManager::addDefaultAssets()
    const char* root = getenv("ANDROID_ROOT");
    LOG_ALWAYS_FATAL_IF(root == NULL, "ANDROID_ROOT not set");

    bool success = true;
    {
       String8 path(root);
       path.appendPath(kSystemAssets);
       success &= addAssetPath(path, NULL, false /* appAsLib */, true /* isSystemAsset */);
    }
    {
       String8 path(root);
       path.appendPath(kLineageAssets);
       success &= addAssetPath(path, NULL, false /* appAsLib */, true /* isSystemAsset */);
    }

    return addAssetPath(path, NULL, false /* appAsLib */, true /* isSystemAsset */);
    return success;
}

int32_t AssetManager::nextAssetPath(const int32_t cookie) const