diff options
| author | Kenny Root <kroot@google.com> | 2010-03-24 11:55:16 -0700 |
|---|---|---|
| committer | Kenny Root <kroot@google.com> | 2010-03-24 12:05:24 -0700 |
| commit | c9f3088036dd7cce6903e307afea3e289a334036 (patch) | |
| tree | e443791605a84703e7530e51f5b1ab97809da6b3 /tools/aapt/Bundle.h | |
| parent | f60ce402dd1ff5fe402c606c41dafe1294b1f0ff (diff) | |
| download | frameworks_base-c9f3088036dd7cce6903e307afea3e289a334036.zip frameworks_base-c9f3088036dd7cce6903e307afea3e289a334036.tar.gz frameworks_base-c9f3088036dd7cce6903e307afea3e289a334036.tar.bz2 | |
Use correct API version for UTF-8 checking
Use the constant for checking the API version in aapt instead of a bare
number.
Bug: 2541326
Change-Id: Ice7af7b393363a00f1832dd84753b8138d057fb4
Diffstat (limited to 'tools/aapt/Bundle.h')
| -rw-r--r-- | tools/aapt/Bundle.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/aapt/Bundle.h b/tools/aapt/Bundle.h index c8b6837..3308a35 100644 --- a/tools/aapt/Bundle.h +++ b/tools/aapt/Bundle.h @@ -162,10 +162,11 @@ public: void setPackageCount(int val) { mPackageCount = val; } #endif - /* UTF-8 is only available on APIs 7 or above or - * SDK levels that have code names. + /* Certain features may only be available on a specific SDK level or + * above. SDK levels that have a non-numeric identifier are assumed + * to be newer than any SDK level that has a number designated. */ - bool isUTF8Available() { + bool isMinSdkAtLeast(int desired) { /* If the application specifies a minSdkVersion in the manifest * then use that. Otherwise, check what the user specified on * the command line. If neither, it's not available since @@ -183,7 +184,7 @@ public: char *end; int minSdkNum = (int)strtol(minVer, &end, 0); if (*end == '\0') { - if (minSdkNum < 7) { + if (minSdkNum < desired) { return false; } } |
