diff options
author | Kenny Root <kroot@google.com> | 2009-12-11 08:15:16 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2009-12-11 19:06:21 -0800 |
commit | 745e17a07c77aa6b347d9e75c99eb3fcb381bc5d (patch) | |
tree | 25e067fffa8afcb55788ec1b028808c43aeb96af /tools/aapt/Bundle.h | |
parent | af1255dab8fa3eab1caf9bae799f80de14a74470 (diff) |
Revise aapt options for UTF8/16 encoding
Remove option to force UTF-8 encoding which could corrupt packages meant
for systems before API level 7. Added switch to allow encoding for UTF-16
which will allow API 7 and later to encode resources in UTF-16.
Change-Id: I70d0bddb0dfd12dcbd08c95f613dcfe896ae680b
Diffstat (limited to 'tools/aapt/Bundle.h')
-rw-r--r-- | tools/aapt/Bundle.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index a2c6a12ad9dd..c53f7f10b898 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -37,7 +37,7 @@ public: mForce(false), mGrayscaleTolerance(0), mMakePackageDirs(false), mUpdate(false), mExtending(false), mRequireLocalization(false), mPseudolocalize(false), - mUTF8(false), mValues(false), + mUTF8(false), mEncodingSpecified(false), mValues(false), mCompressionMethod(0), mOutputAPKFile(NULL), mAssetSourceDir(NULL), mProguardFile(NULL), mAndroidManifestFile(NULL), mPublicOutputFile(NULL), @@ -78,6 +78,8 @@ public: void setPseudolocalize(bool val) { mPseudolocalize = val; } bool getUTF8(void) const { return mUTF8; } void setUTF8(bool val) { mUTF8 = val; } + bool getEncodingSpecified(void) const { return mEncodingSpecified; } + void setEncodingSpecified(bool val) { mEncodingSpecified = val; } bool getValues(void) const { return mValues; } void setValues(bool val) { mValues = val; } int getCompressionMethod(void) const { return mCompressionMethod; } @@ -116,7 +118,9 @@ public: const char* getMinSdkVersion() const { return mMinSdkVersion; } void setMinSdkVersion(const char* val) { mMinSdkVersion = val; - setUTF8(isUTF8Available()); + if (!mEncodingSpecified) { + setUTF8(isUTF8Available()); + } } const char* getTargetSdkVersion() const { return mTargetSdkVersion; } void setTargetSdkVersion(const char* val) { mTargetSdkVersion = val; } @@ -169,6 +173,7 @@ private: bool mRequireLocalization; bool mPseudolocalize; bool mUTF8; + bool mEncodingSpecified; bool mValues; int mCompressionMethod; bool mJunkPath; |