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

Unverified Commit 066b5313 authored by Luca Stefani's avatar Luca Stefani Committed by Michael Bestas
Browse files

androidfw: Add Lineage res to default assets

Change-Id: I815a78e645a2eaf65667fea3789d0a68149ee075
parent 1ea56efa
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -63,6 +63,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";
@@ -367,10 +368,18 @@ 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);
       appendPath(path, kSystemAssets);

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

int32_t AssetManager::nextAssetPath(const int32_t cookie) const