diff options
9 files changed, 36 insertions, 8 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/ISystemImage.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/ISystemImage.java index da66e64..59ed9c6 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/ISystemImage.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/ISystemImage.java @@ -61,7 +61,8 @@ public interface ISystemImage extends Comparable<ISystemImage> { /** * Returns the ABI type. For example, one of {@link SdkConstants#ABI_ARMEABI}, - * {@link SdkConstants#ABI_ARMEABI_V7A} or {@link SdkConstants#ABI_INTEL_ATOM}. + * {@link SdkConstants#ABI_ARMEABI_V7A}, {@link SdkConstants#ABI_INTEL_ATOM} or + * {@link SdkConstants#ABI_MIPS}. * Cannot be null nor empty. */ public abstract String getAbiType(); diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java index e21e14f..ebdc9c8 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java @@ -229,9 +229,11 @@ public final class SdkConstants { public final static String ABI_ARMEABI = "armeabi"; //$NON-NLS-1$ public final static String ABI_ARMEABI_V7A = "armeabi-v7a"; //$NON-NLS-1$ public final static String ABI_INTEL_ATOM = "x86"; //$NON-NLS-1$ + public final static String ABI_MIPS = "mips"; //$NON-NLS-1$ /** Name of the CPU arch to support. */ public final static String CPU_ARCH_ARM = "arm"; //$NON-NLS-1$ public final static String CPU_ARCH_INTEL_ATOM = "x86"; //$NON-NLS-1$ + public final static String CPU_ARCH_MIPS = "mips"; //$NON-NLS-1$ /** Name of the CPU model to support. */ public final static String CPU_MODEL_CORTEX_A8 = "cortex-a8"; //$NON-NLS-1$ diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/SystemImage.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/SystemImage.java index c4957e0..e9a8c57 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/SystemImage.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/SystemImage.java @@ -40,7 +40,8 @@ public class SystemImage implements ISystemImage { * @param location The location of an installed system image. * @param locationType Where the system image folder is located for this ABI. * @param abiType The ABI type. For example, one of {@link SdkConstants#ABI_ARMEABI}, - * {@link SdkConstants#ABI_ARMEABI_V7A} or {@link SdkConstants#ABI_INTEL_ATOM}. + * {@link SdkConstants#ABI_ARMEABI_V7A}, {@link SdkConstants#ABI_INTEL_ATOM} or + * {@link SdkConstants#ABI_MIPS}. */ public SystemImage(File location, LocationType locationType, String abiType) { mLocation = location; @@ -55,7 +56,8 @@ public class SystemImage implements ISystemImage { * @param sdkManager The current SDK manager. * @param locationType Where the system image folder is located for this ABI. * @param abiType The ABI type. For example, one of {@link SdkConstants#ABI_ARMEABI}, - * {@link SdkConstants#ABI_ARMEABI_V7A} or {@link SdkConstants#ABI_INTEL_ATOM}. + * {@link SdkConstants#ABI_ARMEABI_V7A}, {@link SdkConstants#ABI_INTEL_ATOM} or + * {@link SdkConstants#ABI_MIPS}. * @throws IllegalArgumentException if the {@code target} used for * {@link ISystemImage.LocationType#IN_SYSTEM_IMAGE} is not a {@link PlatformTarget}. */ @@ -135,7 +137,8 @@ public class SystemImage implements ISystemImage { /** * Returns the ABI type. For example, one of {@link SdkConstants#ABI_ARMEABI}, - * {@link SdkConstants#ABI_ARMEABI_V7A} or {@link SdkConstants#ABI_INTEL_ATOM}. + * {@link SdkConstants#ABI_ARMEABI_V7A}, {@link SdkConstants#ABI_INTEL_ATOM} or + * {@link SdkConstants#ABI_MIPS}. * Cannot be null nor empty. */ @Override diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdInfo.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdInfo.java index 78c069a..463037e 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdInfo.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdInfo.java @@ -152,6 +152,9 @@ public final class AvdInfo implements Comparable<AvdInfo> { } else if (raw.equalsIgnoreCase(SdkConstants.ABI_INTEL_ATOM)) { s = "Intel Atom (" + SdkConstants.ABI_INTEL_ATOM + ")"; + } else if (raw.equalsIgnoreCase(SdkConstants.ABI_MIPS)) { + s = "Mips (" + SdkConstants.ABI_MIPS + ")"; + } else { s = raw + " (" + raw + ")"; } diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdManager.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdManager.java index db3cc33..dc19287 100644 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdManager.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/avd/AvdManager.java @@ -609,6 +609,8 @@ public class AvdManager { values.put(AVD_INI_CPU_MODEL, SdkConstants.CPU_MODEL_CORTEX_A8); } else if (SdkConstants.ABI_INTEL_ATOM.equals(abiType)) { values.put(AVD_INI_CPU_ARCH, SdkConstants.CPU_ARCH_INTEL_ATOM); + } else if (SdkConstants.ABI_MIPS.equals(abiType)) { + values.put(AVD_INI_CPU_ARCH, SdkConstants.CPU_ARCH_MIPS); } else { log.error(null, "ABI %1$s is not supported by this version of the SDK Tools", abiType); diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SystemImagePackage.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SystemImagePackage.java index 268a24c..a246584 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SystemImagePackage.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SystemImagePackage.java @@ -205,6 +205,7 @@ public class SystemImagePackage extends Package private static String getAbiDisplayNameInternal(String abi) {
return abi.replace("armeabi", "ARM EABI") //$NON-NLS-1$ //$NON-NLS-2$
.replace("x86", "Intel x86 Atom") //$NON-NLS-1$ //$NON-NLS-2$
+ .replace("mips", "Mips") //$NON-NLS-1$ //$NON-NLS-2$
.replace("-", " "); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-6.xsd b/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-6.xsd index 002a75b..87e183a 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-6.xsd +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/repository/sdk-repository-6.xsd @@ -67,7 +67,7 @@ - <extra> packages are removed. They are served only by the addon XML. - <platform>, <system-image>, <source>, <tool>, <platform-tool>, <doc> and <sample> get a new optional field <beta-rc> which can be used to indicate - the package is a Beta Release Candidate and not a final release. + the package is a Beta Release Candidate and not a final release. --> <xsd:element name="sdk-repository" type="sdk:repositoryType" /> @@ -225,6 +225,7 @@ <xsd:enumeration value="armeabi" /> <xsd:enumeration value="armeabi-v7a" /> <xsd:enumeration value="x86" /> + <xsd:enumeration value="mips" /> </xsd:restriction> </xsd:simpleType> diff --git a/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/internal/repository/SdkRepoSourceTest.java b/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/internal/repository/SdkRepoSourceTest.java index 77e9312..0659fc4 100755 --- a/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/internal/repository/SdkRepoSourceTest.java +++ b/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/internal/repository/SdkRepoSourceTest.java @@ -734,6 +734,7 @@ public class SdkRepoSourceTest extends TestCase { "Found Android SDK Platform-tools, revision 3\n" +
"Found Samples for SDK API 14, revision 24 (Obsolete)\n" +
"Found ARM EABI System Image, Android API 42, revision 12\n" +
+ "Found Mips System Image, Android API 42, revision 12\n" +
"Found Sources for Android SDK, API 42, revision 12\n",
monitor.getCapturedVerboseLog());
assertEquals("", monitor.getCapturedLog());
@@ -746,7 +747,7 @@ public class SdkRepoSourceTest extends TestCase { // Packages' sorting order, e.g. all platforms are sorted by descending API level, etc.
Package[] pkgs = mSource.getPackages();
- assertEquals(15, pkgs.length);
+ assertEquals(16, pkgs.length);
for (Package p : pkgs) {
assertTrue(p.getArchives().length >= 1);
}
@@ -815,8 +816,9 @@ public class SdkRepoSourceTest extends TestCase { }
assertEquals(
"[42 armeabi, " +
- "2 armeabi-v7a, " +
- "2 x86]",
+ "42 mips, " +
+ "2 armeabi-v7a, " +
+ "2 x86]",
Arrays.toString(sysImgVersionAbi.toArray()));
// Check the source packages
diff --git a/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/testdata/repository_sample_6.xml b/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/testdata/repository_sample_6.xml index f29ebdf..e57b831 100755 --- a/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/testdata/repository_sample_6.xml +++ b/sdkmanager/libs/sdklib/tests/src/com/android/sdklib/testdata/repository_sample_6.xml @@ -297,6 +297,19 @@ </sdk:archives> </sdk:system-image> + <sdk:system-image> + <sdk:api-level>42</sdk:api-level> + <sdk:revision>12</sdk:revision> + <sdk:abi>mips</sdk:abi> + <sdk:archives> + <sdk:archive os="any"> + <sdk:size>12345</sdk:size> + <sdk:checksum type="sha1">12345637115ebf13412bbef91339ee0d94541234</sdk:checksum> + <sdk:url>http://www.example.com/plat42/mips/image12.zip</sdk:url> + </sdk:archive> + </sdk:archives> + </sdk:system-image> + <sdk:source> <sdk:api-level>42</sdk:api-level> <sdk:revision>12</sdk:revision> |