diff options
author | Xavier Ducrohet <xav@google.com> | 2014-05-27 20:29:16 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@google.com> | 2014-05-27 20:29:16 -0700 |
commit | 9df130a98bbd9824d191bd33a2c439c1f407a758 (patch) | |
tree | 8fbf5436676de7477cb1b315ee6083d1d0efe5d1 /eclipse | |
parent | 93aa02793ea1594d788a3ec67139db183dc307b4 (diff) | |
download | sdk-9df130a98bbd9824d191bd33a2c439c1f407a758.zip sdk-9df130a98bbd9824d191bd33a2c439c1f407a758.tar.gz sdk-9df130a98bbd9824d191bd33a2c439c1f407a758.tar.bz2 |
Fix ADT.
Change-Id: Ib685bfa749b63f9e04f9990459ad47b2d812f692
Diffstat (limited to 'eclipse')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java index 056132d..6d2d1c1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/ManifestInfo.java @@ -931,11 +931,19 @@ public class ManifestInfo { } } - Integer i = AndroidManifest.getTargetSdkVersion(manifestFile); - if (i == null) { + value = AndroidManifest.getTargetSdkVersion(manifestFile); + if (value == null) { mTargetSdkVersion = mMinSdkVersion; - } else { - mTargetSdkVersion = i.intValue(); + } else if (value instanceof String) { + // handle codename, only if we can resolve it. + if (Sdk.getCurrent() != null) { + IAndroidTarget target = Sdk.getCurrent().getTargetFromHashString( + "android-" + value); //$NON-NLS-1$ + if (target != null) { + // codename future API level is current api + 1 + mTargetSdkVersion = target.getVersion().getApiLevel() + 1; + } + } } } catch (XPathExpressionException e) { // do nothing we'll use 1 below. |