X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/a330e7e3aa5e0a1ee03b048106d272e5d544bbe0..0069ad709cb2a8e191066da5010b2d1e182eb79f:/AaptAssets.h diff --git a/AaptAssets.h b/AaptAssets.h index e5afd1b..82dfd71 100644 --- a/AaptAssets.h +++ b/AaptAssets.h @@ -42,6 +42,7 @@ enum { AXIS_NAVHIDDEN, AXIS_NAVIGATION, AXIS_SCREENSIZE, + AXIS_SMALLESTSCREENWIDTHDP, AXIS_SCREENWIDTHDP, AXIS_SCREENHEIGHTDP, AXIS_VERSION @@ -54,7 +55,7 @@ enum { SDK_ECLAIR_0_1 = 6, SDK_MR1 = 7, SDK_FROYO = 8, - SDK_ICS = 13, + SDK_HONEYCOMB_MR2 = 13, }; /** @@ -72,10 +73,11 @@ public: String8 mnc; String8 locale; String8 vendor; - String8 screenLayoutSize; - String8 screenLayoutLong; + String8 smallestScreenWidthDp; String8 screenWidthDp; String8 screenHeightDp; + String8 screenLayoutSize; + String8 screenLayoutLong; String8 orientation; String8 uiModeType; String8 uiModeNight; @@ -107,6 +109,7 @@ public: static bool getNavigationName(const char* name, ResTable_config* out = NULL); static bool getNavHiddenName(const char* name, ResTable_config* out = NULL); static bool getScreenSizeName(const char* name, ResTable_config* out = NULL); + static bool getSmallestScreenWidthDpName(const char* name, ResTable_config* out = NULL); static bool getScreenWidthDpName(const char* name, ResTable_config* out = NULL); static bool getScreenHeightDpName(const char* name, ResTable_config* out = NULL); static bool getVersionName(const char* name, ResTable_config* out = NULL); @@ -137,6 +140,7 @@ inline int strictly_order_type(const AaptGroupEntry& lhs, const AaptGroupEntry& } class AaptGroup; +class FilePathStore; /** * A single asset file we know about. @@ -266,7 +270,8 @@ public: virtual ssize_t slurpFullTree(Bundle* bundle, const String8& srcDir, const AaptGroupEntry& kind, - const String8& resType); + const String8& resType, + sp& fullResPaths); /* * Perform some sanity checks on the names of files and directories here. @@ -481,6 +486,14 @@ public: ResourceTypeSet(); }; +// Storage for lists of fully qualified paths for +// resources encountered during slurping. +class FilePathStore : public RefBase, + public Vector +{ +public: + FilePathStore(); +}; /** * Asset hierarchy being operated on. @@ -514,7 +527,8 @@ public: virtual ssize_t slurpFullTree(Bundle* bundle, const String8& srcDir, const AaptGroupEntry& kind, - const String8& resType); + const String8& resType, + sp& fullResPaths); ssize_t slurpResourceTree(Bundle* bundle, const String8& srcDir); ssize_t slurpResourceZip(Bundle* bundle, const char* filename); @@ -542,6 +556,14 @@ public: inline void setResources(KeyedVector >* res) { delete mRes; mRes = res; } + inline sp& getFullResPaths() { return mFullResPaths; } + inline void + setFullResPaths(sp& res) { mFullResPaths = res; } + + inline sp& getFullAssetPaths() { return mFullAssetPaths; } + inline void + setFullAssetPaths(sp& res) { mFullAssetPaths = res; } + private: String8 mPackage; SortedVector mGroupEntries; @@ -555,6 +577,9 @@ private: sp mOverlay; KeyedVector >* mRes; + + sp mFullResPaths; + sp mFullAssetPaths; }; #endif // __AAPT_ASSETS_H