Loading libs/utils/AssetManager.cpp +0 −53 Original line number Diff line number Diff line Loading @@ -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> Loading @@ -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; Loading Loading @@ -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; Loading services/java/com/android/server/PackageManagerService.java +0 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading Loading
libs/utils/AssetManager.cpp +0 −53 Original line number Diff line number Diff line Loading @@ -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> Loading @@ -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; Loading Loading @@ -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; Loading
services/java/com/android/server/PackageManagerService.java +0 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading