diff options
Diffstat (limited to 'include/utils/AssetManager.h')
-rw-r--r-- | include/utils/AssetManager.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/utils/AssetManager.h b/include/utils/AssetManager.h index a8c7ddb..062a6fb 100644 --- a/include/utils/AssetManager.h +++ b/include/utils/AssetManager.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2006 The Android Open Source Project + * This code has been modified. Portions copyright (C) 2010, T-Mobile USA, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +23,7 @@ #include <utils/Asset.h> #include <utils/AssetDir.h> +#include <utils/PackageRedirectionMap.h> #include <utils/KeyedVector.h> #include <utils/String8.h> #include <utils/Vector.h> @@ -91,7 +93,7 @@ public: * then on success, *cookie is set to the value corresponding to the * newly-added asset source. */ - bool addAssetPath(const String8& path, void** cookie); + bool addAssetPath(const String8& path, void** cookie, bool asSkin=false); /* * Convenience for adding the standard system assets. Uses the @@ -217,14 +219,28 @@ public: */ void getLocales(Vector<String8>* locales) const; + /* + * Remove existing source for assets. + * + * Also updates the ResTable object to reflect the change. + * + * Returns "true" on success, "false" on failure. + */ + bool detachThemePath(const String8& packageName, void *cookie); + bool attachThemePath(const String8& path, void** cookie); + void addRedirections(PackageRedirectionMap* resMap); + void clearRedirections(); + private: struct asset_path { String8 path; FileType type; String8 idmap; + bool asSkin; }; + void updateResTableFromAssetPath(ResTable* rt, const asset_path& ap, void* cookie) const; Asset* openInPathLocked(const char* fileName, AccessMode mode, const asset_path& path); Asset* openNonAssetInPathLocked(const char* fileName, AccessMode mode, |