Esempio n. 1
0
File: Main.java Progetto: MIPS/sdk
  /** Displays the list of available Targets (Platforms and Add-ons) */
  private void displayTargetList() {
    mSdkLog.printf("Available Android targets:\n");

    int index = 1;
    for (IAndroidTarget target : mSdkManager.getTargets()) {
      mSdkLog.printf("id: %1$d or \"%2$s\"\n", index, target.hashString());
      mSdkLog.printf("     Name: %s\n", target.getName());
      if (target.isPlatform()) {
        mSdkLog.printf("     Type: Platform\n");
        mSdkLog.printf("     API level: %s\n", target.getVersion().getApiString());
        mSdkLog.printf("     Revision: %d\n", target.getRevision());
      } else {
        mSdkLog.printf("     Type: Add-On\n");
        mSdkLog.printf("     Vendor: %s\n", target.getVendor());
        mSdkLog.printf("     Revision: %d\n", target.getRevision());
        if (target.getDescription() != null) {
          mSdkLog.printf("     Description: %s\n", target.getDescription());
        }
        mSdkLog.printf(
            "     Based on Android %s (API level %s)\n",
            target.getVersionName(), target.getVersion().getApiString());

        // display the optional libraries.
        IOptionalLibrary[] libraries = target.getOptionalLibraries();
        if (libraries != null) {
          mSdkLog.printf("     Libraries:\n");
          for (IOptionalLibrary library : libraries) {
            mSdkLog.printf("      * %1$s (%2$s)\n", library.getName(), library.getJarName());
            mSdkLog.printf(String.format("          %1$s\n", library.getDescription()));
          }
        }
      }

      // get the target skins
      displaySkinList(target, "     Skins: ");

      if (target.getUsbVendorId() != IAndroidTarget.NO_USB_ID) {
        mSdkLog.printf(
            "     Adds USB support for devices (Vendor: 0x%04X)\n", target.getUsbVendorId());
      }

      index++;
    }
  }
 @Override
 public int getUsbVendorId() {
   return myWrapee.getUsbVendorId();
 }