Пример #1
0
  /**
   * Returns the project's target's hash string.
   *
   * <p>If {@link #getTarget()} returns a valid object, then this returns the value of {@link
   * IAndroidTarget#hashString()}.
   *
   * <p>Otherwise this will return the value of the property {@link
   * ProjectProperties#PROPERTY_TARGET} from {@link #getProperties()} (if valid).
   *
   * @return the target hash string or null if not found.
   */
  public String getTargetHashString() {
    if (mTarget != null) {
      return mTarget.hashString();
    }

    return mProperties.getProperty(ProjectProperties.PROPERTY_TARGET);
  }
Пример #2
0
Файл: Main.java Проект: 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 String hashString() {
   return myWrapee.hashString();
 }