summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSergey Ten <sergey.ten6@t-mobile.com>2009-03-30 10:08:11 -0700
committerJosh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>2009-07-29 19:57:54 -0700
commit5924e96f5f4d6e7a1492bc446b6a21e03eea2fc1 (patch)
treeffbfcadcea40f05e99359e63358e4c00780eb0ec /include
parentc4b3fcb36f561fe7758709e64923cafd0f4a12b2 (diff)
downloadframeworks_base-5924e96f5f4d6e7a1492bc446b6a21e03eea2fc1.zip
frameworks_base-5924e96f5f4d6e7a1492bc446b6a21e03eea2fc1.tar.gz
frameworks_base-5924e96f5f4d6e7a1492bc446b6a21e03eea2fc1.tar.bz2
Add support for restoring asset paths stack in Asset Manager
Diffstat (limited to 'include')
-rw-r--r--include/utils/AssetManager.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/include/utils/AssetManager.h b/include/utils/AssetManager.h
index e94c0e8..ab1b260 100644
--- a/include/utils/AssetManager.h
+++ b/include/utils/AssetManager.h
@@ -61,8 +61,8 @@ public:
virtual ~AssetManager(void);
static int32_t getGlobalCount();
-
- /*
+
+ /*
* Add a new source for assets. This can be called multiple times to
* look in multiple places for assets. It can be either a directory (for
* finding assets as raw files on the disk) or a ZIP file. This newly
@@ -75,13 +75,13 @@ public:
*/
bool addAssetPath(const String8& path, void** cookie);
- /*
+ /*
* Convenience for adding the standard system assets. Uses the
* ANDROID_ROOT environment variable to find them.
*/
bool addDefaultAssets();
- /*
+ /*
* Iterate over the asset paths in this manager. (Previously
* added via addAssetPath() and addDefaultAssets().) On first call,
* 'cookie' must be NULL, resulting in the first cookie being returned.
@@ -90,7 +90,7 @@ public:
*/
void* nextAssetPath(void* cookie) const;
- /*
+ /*
* Return an asset path in the manager. 'which' must be between 0 and
* countAssetPaths().
*/
@@ -160,7 +160,7 @@ public:
*/
FileType getFileType(const char* fileName);
- /*
+ /*
* Return the complete resource table to find things in the package.
*/
const ResTable& getResources(bool required = true) const;
@@ -179,12 +179,23 @@ public:
* the current data.
*/
bool isUpToDate();
-
+
/**
* Get the known locales for this asset manager object.
*/
void getLocales(Vector<String8>* locales) const;
+ /*
+ * Mark asset path "stack" to support un-install from the mAssetPaths.
+ */
+ int markAssetPathStack();
+
+ /*
+ * Restore asset path "stack" by un-installing from the mAssetPaths
+ * all assets installed after restoreIndex.
+ */
+ void restoreAssetPathStack(int restoreIndex);
+
private:
struct asset_path
{
@@ -240,7 +251,7 @@ private:
Asset* setResourceTableAsset(Asset* asset);
bool isUpToDate();
-
+
protected:
~SharedZip();
@@ -283,7 +294,7 @@ private:
static String8 getPathName(const char* path);
bool isUpToDate();
-
+
private:
void closeZip(int idx);