summaryrefslogtreecommitdiff
path: root/tools/aapt/Bundle.h
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-01-31 11:27:43 -0800
committerDianne Hackborn <hackbod@google.com>2012-01-31 15:41:30 -0800
commit6c997a9e880e08c354ffd809bd62df9e25e9c4d4 (patch)
tree593504e8a7d67bf57e0799daff1e8eb9e4797857 /tools/aapt/Bundle.h
parent2247e3f0dc00762b44ef6adcbb2a91c8bbc1be58 (diff)
aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can save a lot of RAM -- for example over 200K in Gmail just by sorting the strings in the Gmail .apk (not the framework). Also add a new aapt command to print the contents of the resource table string pool. Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
Diffstat (limited to 'tools/aapt/Bundle.h')
-rw-r--r--tools/aapt/Bundle.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h
index 2d1060ba23a0..8e3a1c9d11af 100644
--- a/tools/aapt/Bundle.h
+++ b/tools/aapt/Bundle.h
@@ -14,6 +14,18 @@
#include <utils/String8.h>
#include <utils/Vector.h>
+enum {
+ SDK_CUPCAKE = 3,
+ SDK_DONUT = 4,
+ SDK_ECLAIR = 5,
+ SDK_ECLAIR_0_1 = 6,
+ SDK_MR1 = 7,
+ SDK_FROYO = 8,
+ SDK_HONEYCOMB_MR2 = 13,
+ SDK_ICE_CREAM_SANDWICH = 14,
+ SDK_ICE_CREAM_SANDWICH_MR1 = 15,
+};
+
/*
* Things we can do.
*/
@@ -82,7 +94,6 @@ public:
void setRequireLocalization(bool val) { mRequireLocalization = val; }
bool getPseudolocalize(void) const { return mPseudolocalize; }
void setPseudolocalize(bool val) { mPseudolocalize = val; }
- bool getWantUTF16(void) const { return mWantUTF16; }
void setWantUTF16(bool val) { mWantUTF16 = val; }
bool getValues(void) const { return mValues; }
void setValues(bool val) { mValues = val; }
@@ -103,6 +114,10 @@ public:
bool getGenDependencies() { return mGenDependencies; }
void setGenDependencies(bool val) { mGenDependencies = val; }
+ bool getUTF16StringsOption() {
+ return mWantUTF16 || !isMinSdkAtLeast(SDK_FROYO);
+ }
+
/*
* Input options.
*/