diff options
| author | Eric Fischer <enf@google.com> | 2010-09-15 15:59:21 -0700 |
|---|---|---|
| committer | Eric Fischer <enf@google.com> | 2010-09-23 10:32:47 -0700 |
| commit | 90964040cabfc67f92a7c3322a02401bb6f8ae82 (patch) | |
| tree | 52f1ce1de971a071026a12e145837e015e60d26a /tools/aapt/Bundle.h | |
| parent | 89647b1172cdf40a3681922150122b0bd2ea83f1 (diff) | |
| download | frameworks_base-90964040cabfc67f92a7c3322a02401bb6f8ae82.zip frameworks_base-90964040cabfc67f92a7c3322a02401bb6f8ae82.tar.gz frameworks_base-90964040cabfc67f92a7c3322a02401bb6f8ae82.tar.bz2 | |
Add an aapt option to allow string variations for different devices.
The --product option to aapt is a comma-separated list of characteristics
of the device being built for. For example, --product nosdcard,grayscale
for a device with no SD card and a grayscale screen.
Strings can specify a product="characteristic" option to cause that version
of the string to be used only for that type of device. All such strings
should also specify, at the end of the block, product="default", which
will be used if none of the variations match. For example:
<string name="choose" product="bw">Choose black or white</string>
<string name="choose" product="grayscale">Choose a shade of gray</string>
<string name="choose" product="default">Choose a color</string>
The default characteristic will also be used when no --product option
is specified.
Change-Id: Ie6c1505599e02e15b7818e8be6ec47bc6ce71aaa
Diffstat (limited to 'tools/aapt/Bundle.h')
| -rw-r--r-- | tools/aapt/Bundle.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index a1bc241..c5aa573 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -45,7 +45,7 @@ public: mRClassDir(NULL), mResourceIntermediatesDir(NULL), mManifestMinSdkVersion(NULL), mMinSdkVersion(NULL), mTargetSdkVersion(NULL), mMaxSdkVersion(NULL), mVersionCode(NULL), mVersionName(NULL), mCustomPackage(NULL), - mMaxResVersion(NULL), mDebugMode(false), + mMaxResVersion(NULL), mDebugMode(false), mProduct(NULL), mArgc(0), mArgv(NULL) {} ~Bundle(void) {} @@ -139,6 +139,8 @@ public: void setMaxResVersion(const char * val) { mMaxResVersion = val; } bool getDebugMode() { return mDebugMode; } void setDebugMode(bool val) { mDebugMode = val; } + const char* getProduct() const { return mProduct; } + void setProduct(const char * val) { mProduct = val; } /* * Set and get the file specification. @@ -237,6 +239,7 @@ private: const char* mCustomPackage; const char* mMaxResVersion; bool mDebugMode; + const char* mProduct; /* file specification */ int mArgc; |
