Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c997a9e authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

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
parent 2247e3f0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -347,6 +347,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
            sb.append(" (no locale)");
        }
        switch (textLayoutDirection) {
            case LocaleUtil.TEXT_LAYOUT_DIRECTION_LTR_DO_NOT_USE: /* ltr not interesting */ break;
            case LocaleUtil.TEXT_LAYOUT_DIRECTION_RTL_DO_NOT_USE: sb.append(" rtl"); break;
            default: sb.append(" layoutdir="); sb.append(textLayoutDirection); break;
        }
+32 −571

File changed.

Preview size limit exceeded, changes collapsed.

+903 −242

File changed.

Preview size limit exceeded, changes collapsed.

+0 −11
Original line number Diff line number Diff line
@@ -53,17 +53,6 @@ enum {
    AXIS_END = AXIS_VERSION,
};

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,
};

/**
 * This structure contains a specific variation of a single file out
 * of all the variations it can have that we can have.
+16 −1
Original line number Diff line number Diff line
@@ -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.
     */
Loading