summaryrefslogtreecommitdiff
path: root/tools/aapt/ResourceTable.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-11-10 14:32:11 -0800
committerAdam Lesinski <adamlesinski@google.com>2014-11-10 14:32:11 -0800
commit4d29c6693090cb9a0be209f9cfd0aef307fe52ed (patch)
tree65c9af94f6045205dda8a337ad2ca9fc7d844944 /tools/aapt/ResourceTable.cpp
parent984d81c3937d46240fb9645ffa37c5166284a983 (diff)
parentfa31eb2cd1705cdb77f8d8dd9b5761bc773cbb9d (diff)
Merge commit 'fa31eb2c' into manualmerge
Conflicts: tools/split-select/RuleGenerator_test.cpp Change-Id: I0d1261301d433f32e857cf1b0d75a861205f7625
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r--tools/aapt/ResourceTable.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 2339840c389f..54e0b8860940 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -10,6 +10,7 @@
#include "XMLNode.h"
#include "ResourceFilter.h"
#include "ResourceIdCache.h"
+#include "SdkConstants.h"
#include <androidfw/ResourceTypes.h>
#include <utils/ByteOrder.h>
@@ -4254,7 +4255,7 @@ static bool isMinSdkVersionLOrAbove(const Bundle* bundle) {
}
const int minSdk = atoi(bundle->getMinSdkVersion());
- if (minSdk >= SDK_L) {
+ if (minSdk >= SDK_LOLLIPOP) {
return true;
}
}
@@ -4345,7 +4346,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) {
}
const ConfigDescription& config = entries.keyAt(ei);
- if (config.sdkVersion >= SDK_L) {
+ if (config.sdkVersion >= SDK_LOLLIPOP) {
// We don't need to do anything if the resource is
// already qualified for version 21 or higher.
continue;
@@ -4367,9 +4368,9 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) {
}
// Duplicate the entry under the same configuration
- // but with sdkVersion == SDK_L.
+ // but with sdkVersion == SDK_LOLLIPOP.
ConfigDescription newConfig(config);
- newConfig.sdkVersion = SDK_L;
+ newConfig.sdkVersion = SDK_LOLLIPOP;
entriesToAdd.add(key_value_pair_t<ConfigDescription, sp<Entry> >(
newConfig, new Entry(*e)));
@@ -4392,7 +4393,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) {
if (bundle->getVerbose()) {
entriesToAdd[i].value->getPos()
.printf("using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.",
- SDK_L,
+ SDK_LOLLIPOP,
String8(p->getName()).string(),
String8(t->getName()).string(),
String8(entriesToAdd[i].value->getName()).string(),
@@ -4419,7 +4420,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
return NO_ERROR;
}
- if (target->getResourceType() == "" || target->getGroupEntry().toParams().sdkVersion >= SDK_L) {
+ if (target->getResourceType() == "" || target->getGroupEntry().toParams().sdkVersion >= SDK_LOLLIPOP) {
// Skip resources that have no type (AndroidManifest.xml) or are already version qualified with v21
// or higher.
return NO_ERROR;
@@ -4455,7 +4456,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
}
ConfigDescription newConfig(target->getGroupEntry().toParams());
- newConfig.sdkVersion = SDK_L;
+ newConfig.sdkVersion = SDK_LOLLIPOP;
// Look to see if we already have an overriding v21 configuration.
sp<ConfigList> cl = getConfigList(String16(mAssets->getPackage()),
@@ -4477,7 +4478,7 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
if (bundle->getVerbose()) {
SourcePos(target->getSourceFile(), -1).printf(
"using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.",
- SDK_L,
+ SDK_LOLLIPOP,
mAssets->getPackage().string(),
newFile->getResourceType().string(),
String8(resourceName).string(),