summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Bundle.h
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-09-05 17:49:21 -0700
committerXavier Ducrohet <xav@android.com>2012-09-11 18:17:22 -0700
commit7714a2429b192c88e134ff67b969121bbaeb5457 (patch)
tree13d8c0eeb0d9eee815e3444fd236924306861fe3 /tools/aapt/Bundle.h
parent2415841c370d855d7f3a3e6a537e641c69a57097 (diff)
downloadframeworks_base-7714a2429b192c88e134ff67b969121bbaeb5457.zip
frameworks_base-7714a2429b192c88e134ff67b969121bbaeb5457.tar.gz
frameworks_base-7714a2429b192c88e134ff67b969121bbaeb5457.tar.bz2
Add --error-on-failed-insert option to aapt.
The new SDK build system give the ability to insert versionCode/Name and min/targetSdkVersion in the manifest but aapt won't replace those if they already exist. The main problem is that aapt doesn't actually fail when it doesn't replace them, making the output not what the developer wanted. This patch set adds an option to aapt to make it return an error if the insert failed because the attribute already existed. Change-Id: I8938ec1238da407a8562c974e9598db39001ffd9
Diffstat (limited to 'tools/aapt/Bundle.h')
-rw-r--r--tools/aapt/Bundle.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h
index a5aa0b5..be08291 100644
--- a/tools/aapt/Bundle.h
+++ b/tools/aapt/Bundle.h
@@ -61,7 +61,7 @@ public:
mMinSdkVersion(NULL), mTargetSdkVersion(NULL), mMaxSdkVersion(NULL),
mVersionCode(NULL), mVersionName(NULL), mCustomPackage(NULL), mExtraPackages(NULL),
mMaxResVersion(NULL), mDebugMode(false), mNonConstantId(false), mProduct(NULL),
- mUseCrunchCache(false), mArgc(0), mArgv(NULL)
+ mUseCrunchCache(false), mErrorOnFailedInsert(false), mArgc(0), mArgv(NULL)
{}
~Bundle(void) {}
@@ -110,6 +110,8 @@ public:
void setAutoAddOverlay(bool val) { mAutoAddOverlay = val; }
bool getGenDependencies() { return mGenDependencies; }
void setGenDependencies(bool val) { mGenDependencies = val; }
+ bool getErrorOnFailedInsert() { return mErrorOnFailedInsert; }
+ void setErrorOnFailedInsert(bool val) { mErrorOnFailedInsert = val; }
bool getUTF16StringsOption() {
return mWantUTF16 || !isMinSdkAtLeast(SDK_FROYO);
@@ -276,6 +278,7 @@ private:
bool mNonConstantId;
const char* mProduct;
bool mUseCrunchCache;
+ bool mErrorOnFailedInsert;
/* file specification */
int mArgc;