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

Commit 7e5b830d authored by Josh Guilfoyle's avatar Josh Guilfoyle
Browse files

Removed dead theme engine code.

Change-Id: Ib9581787b7f2a305633c17cebe4404b02c01bee5
parent b6c3e53c
Loading
Loading
Loading
Loading
+0 −53
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@
#include <utils/threads.h>

#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <assert.h>

@@ -54,8 +52,6 @@ static const char* kSystemAssets = "framework/framework-res.apk";

static const char* kExcludeExtension = ".EXCLUDE";

static const char* kThemeResCacheDir = "res-cache/";

static Asset* const kExcludedAsset = (Asset*) 0xd000000d;

static volatile int32_t gCount = 0;
@@ -381,55 +377,6 @@ FileType AssetManager::getFileType(const char* fileName)
        return kFileTypeRegular;
}

static void createDirIfNecessary(const char* path, mode_t mode, struct stat *statbuf)
{
    if (lstat(path, statbuf) != 0) {
        if (mkdir(path, mode) != 0) {
            LOGE("mkdir(%s,%04o) failed: %s\n", path, (int)mode, strerror(errno));
        }
    }
}

static SharedBuffer* addToEntriesByTypeBuffer(SharedBuffer* buf, uint32_t from, uint32_t to)
{
    size_t currentSize = (buf != NULL) ? buf->size() : 0;

    int type = Res_GETTYPE(from)+1;
    int entry = Res_GETENTRY(from);

    size_t typeSize = (type+1) * sizeof(uint32_t*);
    unsigned int requestSize = roundUpPower2(typeSize);
    if (typeSize > currentSize) {
        unsigned int requestSize = roundUpPower2(typeSize);
        if (buf == NULL) {
            buf = SharedBuffer::alloc(requestSize);
        } else {
            buf = buf->editResize(requestSize);
        }
        memset((unsigned char*)buf->data()+currentSize, 0, requestSize-currentSize);
    }

    uint32_t** entriesByType = (uint32_t**)buf->data();
    uint32_t* entries = entriesByType[type];
    SharedBuffer* entriesBuf = (entries != NULL) ? SharedBuffer::bufferFromData(entries) : NULL;
    currentSize = (entriesBuf != NULL) ? entriesBuf->size() : 0;
    size_t entrySize = (entry+1) * sizeof(uint32_t);
    if (entrySize > currentSize) {
        unsigned int requestSize = roundUpPower2(entrySize);
        if (entriesBuf == NULL) {
            entriesBuf = SharedBuffer::alloc(requestSize);
        } else {
            entriesBuf = entriesBuf->editResize(requestSize);
        }
        memset((unsigned char*)entriesBuf->data()+currentSize, 0, requestSize-currentSize);
        entriesByType[type] = (uint32_t*)entriesBuf->data();
    }
    entries = (uint32_t*)entriesBuf->data();
    entries[entry] = to;

    return buf;
}

const ResTable* AssetManager::getResTable(bool required) const
{
    ResTable* rt = mResources;
+0 −3
Original line number Diff line number Diff line
@@ -249,8 +249,6 @@ class PackageManagerService extends IPackageManager.Stub {
    final File mAppInstallDir;
    final File mDalvikCacheDir;

    final File mThemeResCacheDir;

    // Directory containing the private parts (e.g. code and non-resource assets) of forward-locked
    // apps.
    final File mDrmAppPrivateInstallDir;
@@ -835,7 +833,6 @@ class PackageManagerService extends IPackageManager.Stub {

            mFrameworkDir = new File(Environment.getRootDirectory(), "framework");
            mDalvikCacheDir = new File(dataDir, "dalvik-cache");
            mThemeResCacheDir = new File(dataDir, "res-cache");

            if (mInstaller != null) {
                boolean didDexOpt = false;