com.crashlytics.tools.android_2.1.0

ApiLevel);
  }
  
  public boolean equals(Object paramObject)
  {
    if ((paramObject instanceof AndroidVersion))
    {
      AndroidVersion localAndroidVersion = (AndroidVersion)paramObject;
      if (mCodename == null) {
        return (mCodename == null) && (mApiLevel == mApiLevel);
      }
      return (mCodename.equals(mCodename)) && (mApiLevel == mApiLevel);
    }
    if ((paramObject instanceof String))
    {
      if (mCodename != null) {
        return mCodename.equals(paramObject);
      }
      try
      {
        int i = Integer.parseInt((String)paramObject);
        return i == mApiLevel;
      }
      catch (NumberFormatException localNumberFormatException) {}
    }
    return false;
  }
  
  public int hashCode()
  {
    if (mCodename != null) {
      return mCodename.hashCode();
    }
    return mApiLevel;
  }
  
  public String toString()
  {
    String str = String.format("API %1$d", new Object[] { Integer.valueOf(mApiLevel) });
    if (isPreview()) {
      str = str + String.format(", %1$s preview", new Object[] { mCodename });
    }
    return str;
  }
  
  public int compareTo(AndroidVersion paramAndroidVersion)
  {
    return compareTo(mApiLevel, mCodename);
  }
  
  private int compareTo(int paramInt, String paramString)
  {
    if (mCodename == null)
    {
      if (paramString == null) {
        return mApiLevel - paramInt;
      }
      if (mApiLevel == paramInt) {
        return -1;
      }
      return mApiLevel - paramInt;
    }
    if (mApiLevel == paramInt)
    {
      if (paramString == null) {
        return 1;
      }
      return mCodename.compareTo(paramString);
    }
    return mApiLevel - paramInt;
  }
  
  public boolean isGreaterOrEqualThan(int paramInt)
  {
    return compareTo(paramInt, null) >= 0;
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.AndroidVersion
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

public abstract interface IAndroidTarget$IOptionalLibrary
{
  public abstract String getName();
  
  public abstract String getJarName();
  
  public abstract String getJarPath();
  
  public abstract String getDescription();
}

/* Location:
 * Qualified Name:     com.android.sdklib.IAndroidTarget.IOptionalLibrary
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

import java.util.Map;

public abstract interface IAndroidTarget
  extends Comparable<IAndroidTarget>
{
  public static final int ANDROID_JAR = 1;
  public static final int ANDROID_AIDL = 2;
  public static final int SAMPLES = 4;
  public static final int SKINS = 5;
  public static final int TEMPLATES = 6;
  public static final int DATA = 7;
  public static final int ATTRIBUTES = 8;
  public static final int MANIFEST_ATTRIBUTES = 9;
  public static final int LAYOUT_LIB = 10;
  public static final int RESOURCES = 11;
  public static final int FONTS = 12;
  public static final int WIDGETS = 13;
  public static final int ACTIONS_ACTIVITY = 14;
  public static final int ACTIONS_BROADCAST = 15;
  public static final int ACTIONS_SERVICE = 16;
  public static final int CATEGORIES = 17;
  public static final int SOURCES = 18;
  public static final int DOCS = 19;
  @Deprecated
  public static final int AAPT = 20;
  @Deprecated
  public static final int AIDL = 21;
  @Deprecated
  public static final int DX = 22;
  @Deprecated
  public static final int DX_JAR = 23;
  public static final int ANT = 24;
  @Deprecated
  public static final int ANDROID_RS = 25;
  @Deprecated
  public static final int ANDROID_RS_CLANG = 26;
  public static final int NO_USB_ID = 0;
  
  public abstract String getLocation();
  
  public abstract String getVendor();
  
  public abstract String getName();
  
  public abstract String getFullName();
  
  public abstract String getClasspathName();
  
  public abstract String getShortClasspathName();
  
  public abstract String getDescription();
  
  public abstract AndroidVersion getVersion();
  
  public abstract String getVersionName();
  
  public abstract int getRevision();
  
  public abstract boolean isPlatform();
  
  public abstract IAndroidTarget getParent();
  
  public abstract String getPath(int paramInt);
  
  public abstract boolean hasRenderingLibrary();
  
  public abstract String[] getSkins();
  
  public abstract String getDefaultSkin();
  
  public abstract IOptionalLibrary[] getOptionalLibraries();
  
  public abstract String[] getPlatformLibraries();
  
  public abstract String getProperty(String paramString);
  
  public abstract Integer getProperty(String paramString, Integer paramInteger);
  
  public abstract Boolean getProperty(String paramString, Boolean paramBoolean);
  
  public abstract Map<String, String> getProperties();
  
  public abstract int getUsbVendorId();
  
  public abstract ISystemImage[] getSystemImages();
  
  public abstract ISystemImage getSystemImage(String paramString);
  
  public abstract boolean canRunOn(IAndroidTarget paramIAndroidTarget);
  
  public abstract String hashString();
  
  public static abstract interface IOptionalLibrary
  {
    public abstract String getName();
    
    public abstract String getJarName();
    
    public abstract String getJarPath();
    
    public abstract String getDescription();
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.IAndroidTarget
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

public abstract interface ISdkLog
{
  public abstract void warning(String paramString, Object... paramVarArgs);
  
  public abstract void error(Throwable paramThrowable, String paramString, Object... paramVarArgs);
  
  public abstract void printf(String paramString, Object... paramVarArgs);
}

/* Location:
 * Qualified Name:     com.android.sdklib.ISdkLog
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

public enum ISystemImage$LocationType
{
  IN_PLATFORM_LEGACY,  IN_PLATFORM_SUBFOLDER,  IN_SYSTEM_IMAGE;
  
  private ISystemImage$LocationType() {}
}

/* Location:
 * Qualified Name:     com.android.sdklib.ISystemImage.LocationType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

import java.io.File;

public abstract interface ISystemImage
  extends Comparable<ISystemImage>
{
  public abstract File getLocation();
  
  public abstract LocationType getLocationType();
  
  public abstract String getAbiType();
  
  public static enum LocationType
  {
    IN_PLATFORM_LEGACY,  IN_PLATFORM_SUBFOLDER,  IN_SYSTEM_IMAGE;
    
    private LocationType() {}
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.ISystemImage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

public class NullSdkLog
  implements ISdkLog
{
  private static final ISdkLog sThis = new NullSdkLog();
  
  public static ISdkLog getLogger()
  {
    return sThis;
  }
  
  public void error(Throwable paramThrowable, String paramString, Object... paramVarArgs) {}
  
  public void printf(String paramString, Object... paramVarArgs) {}
  
  public void warning(String paramString, Object... paramVarArgs) {}
}

/* Location:
 * Qualified Name:     com.android.sdklib.NullSdkLog
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

import com.android.sdklib.util.SparseArray;
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;

final class PlatformTarget
  implements IAndroidTarget
{
  private static final String PLATFORM_HASH = "android-%s";
  private static final String PLATFORM_VENDOR = "Android Open Source Project";
  private static final String PLATFORM_NAME = "Android %s";
  private static final String PLATFORM_NAME_PREVIEW = "Android %s (Preview)";
  private final String mRootFolderOsPath;
  private final String mName;
  private final AndroidVersion mVersion;
  private final String mVersionName;
  private final int mRevision;
  private final Map<String, String> mProperties;
  private final SparseArray<String> mPaths = new SparseArray();
  private String[] mSkins;
  private final ISystemImage[] mSystemImages;
  private final SdkManager.LayoutlibVersion mLayoutlibVersion;
  
  PlatformTarget(String paramString1, String paramString2, int paramInt1, String paramString3, String paramString4, int paramInt2, SdkManager.LayoutlibVersion paramLayoutlibVersion, ISystemImage[] paramArrayOfISystemImage, Map<String, String> paramMap)
  {
    if (!paramString2.endsWith(File.separator)) {
      paramString2 = paramString2 + File.separator;
    }
    mRootFolderOsPath = paramString2;
    mProperties = Collections.unmodifiableMap(paramMap);
    mVersion = new AndroidVersion(paramInt1, paramString3);
    mVersionName = paramString4;
    mRevision = paramInt2;
    mLayoutlibVersion = paramLayoutlibVersion;
    mSystemImages = (paramArrayOfISystemImage == null ? new ISystemImage[0] : paramArrayOfISystemImage);
    Arrays.sort(mSystemImages);
    if (mVersion.isPreview()) {
      mName = String.format("Android %s (Preview)", new Object[] { mVersionName });
    } else {
      mName = String.format("Android %s", new Object[] { mVersionName });
    }
    mPaths.put(1, mRootFolderOsPath + "android.jar");
    mPaths.put(18, mRootFolderOsPath + "sources");
    mPaths.put(2, mRootFolderOsPath + "framework.aidl");
    mPaths.put(4, mRootFolderOsPath + SdkConstants.OS_PLATFORM_SAMPLES_FOLDER);
    mPaths.put(5, mRootFolderOsPath + SdkConstants.OS_SKINS_FOLDER);
    mPaths.put(6, mRootFolderOsPath + SdkConstants.OS_PLATFORM_TEMPLATES_FOLDER);
    mPaths.put(7, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER);
    mPaths.put(8, mRootFolderOsPath + SdkConstants.OS_PLATFORM_ATTRS_XML);
    mPaths.put(9, mRootFolderOsPath + SdkConstants.OS_PLATFORM_ATTRS_MANIFEST_XML);
    
    mPaths.put(11, mRootFolderOsPath + SdkConstants.OS_PLATFORM_RESOURCES_FOLDER);
    mPaths.put(12, mRootFolderOsPath + SdkConstants.OS_PLATFORM_FONTS_FOLDER);
    mPaths.put(10, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "layoutlib.jar");
    
    mPaths.put(13, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "widgets.txt");
    
    mPaths.put(14, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "activity_actions.txt");
    
    mPaths.put(15, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "broadcast_actions.txt");
    
    mPaths.put(16, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "service_actions.txt");
    
    mPaths.put(17, mRootFolderOsPath + SdkConstants.OS_PLATFORM_DATA_FOLDER + "categories.txt");
    
    mPaths.put(24, mRootFolderOsPath + SdkConstants.OS_PLATFORM_ANT_FOLDER);
    
    mPaths.put(20, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER + SdkConstants.FN_AAPT);
    
    mPaths.put(21, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER + SdkConstants.FN_AIDL);
    
    mPaths.put(22, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER + SdkConstants.FN_DX);
    
    mPaths.put(23, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_LIB_FOLDER + "dx.jar");
    
    mPaths.put(25, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER + SdkConstants.OS_FRAMEWORK_RS);
    
    mPaths.put(26, paramString1 + SdkConstants.OS_SDK_PLATFORM_TOOLS_FOLDER + SdkConstants.OS_FRAMEWORK_RS_CLANG);
  }
  
  public SdkManager.LayoutlibVersion getLayoutlibVersion()
  {
    return mLayoutlibVersion;
  }
  
  public ISystemImage getSystemImage(String paramString)
  {
    for (ISystemImage localISystemImage : mSystemImages) {
      if (localISystemImage.getAbiType().equals(paramString)) {
        return localISystemImage;
      }
    }
    return null;
  }
  
  public ISystemImage[] getSystemImages()
  {
    return mSystemImages;
  }
  
  public String getLocation()
  {
    return mRootFolderOsPath;
  }
  
  public String getVendor()
  {
    return "Android Open Source Project";
  }
  
  public String getName()
  {
    return mName;
  }
  
  public String getFullName()
  {
    return mName;
  }
  
  public String getClasspathName()
  {
    return mName;
  }
  
  public String getShortClasspathName()
  {
    return mName;
  }
  
  public String getDescription()
  {
    return String.format("Standard Android platform %s", new Object[] { mVersionName });
  }
  
  public AndroidVersion getVersion()
  {
    return mVersion;
  }
  
  public String getVersionName()
  {
    return mVersionName;
  }
  
  public int getRevision()
  {
    return mRevision;
  }
  
  public boolean isPlatform()
  {
    return true;
  }
  
  public IAndroidTarget getParent()
  {
    return null;
  }
  
  public String getPath(int paramInt)
  {
    return (String)mPaths.get(paramInt);
  }
  
  public boolean hasRenderingLibrary()
  {
    return true;
  }
  
  public String[] getSkins()
  {
    return mSkins;
  }
  
  public String getDefaultSkin()
  {
    if (mSkins.length == 1) {
      return mSkins[0];
    }
    String str = (String)mProperties.get("sdk.skin.default");
    if (str != null) {
      return str;
    }
    if (mVersion.getApiLevel() >= 4) {
      return "WVGA800";
    }
    return "HVGA";
  }
  
  public IAndroidTarget.IOptionalLibrary[] getOptionalLibraries()
  {
    return null;
  }
  
  public String[] getPlatformLibraries()
  {
    return new String[] { "android.test.runner" };
  }
  
  public int getUsbVendorId()
  {
    return 0;
  }
  
  public boolean canRunOn(IAndroidTarget paramIAndroidTarget)
  {
    if (paramIAndroidTarget == this) {
      return true;
    }
    if (mVersion.getCodename() != null) {
      return mVersion.equals(paramIAndroidTarget.getVersion());
    }
    return paramIAndroidTarget.getVersion().getApiLevel() >= mVersion.getApiLevel();
  }
  
  public String hashString()
  {
    return String.format("android-%s", new Object[] { mVersion.getApiString() });
  }
  
  public int hashCode()
  {
    return hashString().hashCode();
  }
  
  public boolean equals(Object paramObject)
  {
    if ((paramObject instanceof PlatformTarget))
    {
      PlatformTarget localPlatformTarget = (PlatformTarget)paramObject;
      
      return mVersion.equals(localPlatformTarget.getVersion());
    }
    return false;
  }
  
  public int compareTo(IAndroidTarget paramIAndroidTarget)
  {
    if (this == paramIAndroidTarget) {
      return 0;
    }
    int i = mVersion.compareTo(paramIAndroidTarget.getVersion());
    if (i == 0) {
      if (!paramIAndroidTarget.isPlatform()) {
        return -1;
      }
    }
    return i;
  }
  
  public String toString()
  {
    return String.format("PlatformTarget %1$s rev %2$d", new Object[] { getVersion(), Integer.valueOf(getRevision()) });
  }
  
  public String getProperty(String paramString)
  {
    return (String)mProperties.get(paramString);
  }
  
  public Integer getProperty(String paramString, Integer paramInteger)
  {
    try
    {
      String str = getProperty(paramString);
      if (str != null) {
        return Integer.decode(str);
      }
    }
    catch (NumberFormatException localNumberFormatException) {}
    return paramInteger;
  }
  
  public Boolean getProperty(String paramString, Boolean paramBoolean)
  {
    String str = getProperty(paramString);
    if (str != null) {
      return Boolean.valueOf(str);
    }
    return paramBoolean;
  }
  
  public Map<String, String> getProperties()
  {
    return mProperties;
  }
  
  void setSkins(String[] paramArrayOfString)
  {
    mSkins = paramArrayOfString;
  }
  
  void setSamplesPath(String paramString)
  {
    mPaths.put(4, paramString);
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.PlatformTarget
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

import java.io.File;

public final class SdkConstants
{
  public static final int PLATFORM_UNKNOWN = 0;
  public static final int PLATFORM_LINUX = 1;
  public static final int PLATFORM_WINDOWS = 2;
  public static final int PLATFORM_DARWIN = 3;
  public static final int CURRENT_PLATFORM = ;
  public static final String INI_CHARSET = "UTF-8";
  public static final String FN_ANDROID_MANIFEST_XML = "AndroidManifest.xml";
  public static final String FN_CLASSES_JAR = "classes.jar";
  public static final String FN_APK_CLASSES_DEX = "classes.dex";
  public static final String FN_BUILD_XML = "build.xml";
  public static final String FN_FRAMEWORK_LIBRARY = "android.jar";
  public static final String FN_ATTRS_XML = "attrs.xml";
  public static final String FN_ATTRS_MANIFEST_XML = "attrs_manifest.xml";
  public static final String FN_FRAMEWORK_AIDL = "framework.aidl";
  public static final String FN_FRAMEWORK_RENDERSCRIPT = "renderscript";
  public static final String FN_FRAMEWORK_INCLUDE = "include";
  public static final String FN_FRAMEWORK_INCLUDE_CLANG = "clang-include";
  public static final String FN_LAYOUTLIB_JAR = "layoutlib.jar";
  public static final String FN_WIDGETS = "widgets.txt";
  public static final String FN_INTENT_ACTIONS_ACTIVITY = "activity_actions.txt";
  public static final String FN_INTENT_ACTIONS_BROADCAST = "broadcast_actions.txt";
  public static final String FN_INTENT_ACTIONS_SERVICE = "service_actions.txt";
  public static final String FN_INTENT_CATEGORIES = "categories.txt";
  public static final String FN_ANNOTATIONS_JAR = "annotations.jar";
  public static final String FN_BUILD_PROP = "build.prop";
  public static final String FN_PLUGIN_PROP = "plugin.prop";
  public static final String FN_MANIFEST_INI = "manifest.ini";
  public static final String FN_DEVICES_XML = "devices.xml";
  public static final String FN_HARDWARE_INI = "hardware-properties.ini";
  public static final String FN_PROJECT_PROPERTIES = "project.properties";
  public static final String FN_LOCAL_PROPERTIES = "local.properties";
  public static final String FN_ANT_PROPERTIES = "ant.properties";
  public static final String FN_SKIN_LAYOUT = "layout";
  public static final String FN_DX_JAR = "dx.jar";
  public static final String FN_DX = "dx" + ext(".bat", "");
  public static final String FN_AAPT = "aapt" + ext(".exe", "");
  public static final String FN_AIDL = "aidl" + ext(".exe", "");
  public static final String FN_RENDERSCRIPT = "llvm-rs-cc" + ext(".exe", "");
  public static final String FN_ADB = "adb" + ext(".exe", "");
  public static final String FN_EMULATOR = "emulator" + ext(".exe", "");
  public static final String FN_ZIPALIGN = "zipalign" + ext(".exe", "");
  public static final String FN_DEXDUMP = "dexdump" + ext(".exe", "");
  public static final String FN_PROGUARD = "proguard" + ext(".bat", ".sh");
  public static final String FN_FIND_LOCK = "find_lock" + ext(".exe", "");
  public static final String FN_SOURCE_PROP = "source.properties";
  public static final String FN_CONTENT_HASH_PROP = "content_hash.properties";
  public static final String FN_SDK_PROP = "sdk.properties";
  public static final String FN_GDBSERVER = "gdbserver";
  public static final String FN_ANDROID_PROGUARD_FILE = "proguard-android.txt";
  public static final String FN_PROJECT_PROGUARD_FILE = "proguard-project.txt";
  public static final String FD_RESOURCES = "res";
  public static final String FD_ASSETS = "assets";
  public static final String FD_SOURCES = "src";
  public static final String FD_GEN_SOURCES = "gen";
  public static final String FD_NATIVE_LIBS = "libs";
  public static final String FD_APK_NATIVE_LIBS = "lib";
  public static final String FD_OUTPUT = "bin";
  public static final String FD_CLASSES_OUTPUT = "classes";
  public static final String FD_PROGUARD = "proguard";
  public static final String FD_PLATFORMS = "platforms";
  public static final String FD_ADDONS = "add-ons";
  public static final String FD_SYSTEM_IMAGES = "system-images";
  public static final String FD_PKG_SOURCES = "sources";
  public static final String FD_TOOLS = "tools";
  public static final String FD_SUPPORT = "support";
  public static final String FD_PLATFORM_TOOLS = "platform-tools";
  public static final String FD_LIB = "lib";
  public static final String FD_DOCS = "docs";
  public static final String FD_DOCS_REFERENCE = "reference";
  public static final String FD_IMAGES = "images";
  public static final String ABI_ARMEABI = "armeabi";
  public static final String ABI_ARMEABI_V7A = "armeabi-v7a";
  public static final String ABI_INTEL_ATOM = "x86";
  public static final String ABI_MIPS = "mips";
  public static final String CPU_ARCH_ARM = "arm";
  public static final String CPU_ARCH_INTEL_ATOM = "x86";
  public static final String CPU_ARCH_MIPS = "mips";
  public static final String CPU_MODEL_CORTEX_A8 = "cortex-a8";
  public static final String FD_SKINS = "skins";
  public static final String FD_SAMPLES = "samples";
  public static final String FD_EXTRAS = "extras";
  public static final String FD_TEMPLATES = "templates";
  public static final String FD_ANT = "ant";
  public static final String FD_DATA = "data";
  public static final String FD_RENDERSCRIPT = "rs";
  public static final String FD_RES = "res";
  public static final String FD_FONTS = "fonts";
  public static final String FD_ANDROID_SOURCES = "sources";
  public static final String FD_ADDON_LIBS = "libs";
  public static final String NS_RESOURCES = "http://schemas.android.com/apk/res/android";
  public static final String ANDROID_TEST_RUNNER_LIB = "android.test.runner";
  public static final String OS_SDK_DOCS_FOLDER = "docs" + File.separator;
  public static final String OS_SDK_TOOLS_FOLDER = "tools" + File.separator;
  public static final String OS_SDK_TOOLS_LIB_FOLDER = OS_SDK_TOOLS_FOLDER + "lib" + File.separator;
  public static final String OS_SDK_TOOLS_LIB_EMULATOR_FOLDER = OS_SDK_TOOLS_LIB_FOLDER + "emulator" + File.separator;
  public static final String OS_SDK_PLATFORM_TOOLS_FOLDER = "platform-tools" + File.separator;
  public static final String OS_SDK_PLATFORM_TOOLS_LIB_FOLDER = OS_SDK_PLATFORM_TOOLS_FOLDER + "lib" + File.separator;
  public static final String OS_SDK_TOOLS_PROGUARD_BIN_FOLDER = OS_SDK_TOOLS_FOLDER + "proguard" + File.separator + "bin" + File.separator;
  public static final String OS_IMAGES_FOLDER = "images" + File.separator;
  public static final String OS_SKINS_FOLDER = "skins" + File.separator;
  public static final String OS_PLATFORM_DATA_FOLDER = "data" + File.separator;
  public static final String OS_PLATFORM_RENDERSCRIPT_FOLDER = "rs" + File.separator;
  public static final String OS_PLATFORM_SAMPLES_FOLDER = "samples" + File.separator;
  public static final String OS_PLATFORM_RESOURCES_FOLDER = OS_PLATFORM_DATA_FOLDER + "res" + File.separator;
  public static final String OS_PLATFORM_FONTS_FOLDER = OS_PLATFORM_DATA_FOLDER + "fonts" + File.separator;
  public static final String OS_PLATFORM_SOURCES_FOLDER = "sources" + File.separator;
  public static final String OS_PLATFORM_TEMPLATES_FOLDER = "templates" + File.separator;
  public static final String OS_PLATFORM_ANT_FOLDER = "ant" + File.separator;
  public static final String OS_PLATFORM_ATTRS_XML = OS_PLATFORM_RESOURCES_FOLDER + "values" + File.separator + "attrs.xml";
  public static final String OS_PLATFORM_ATTRS_MANIFEST_XML = OS_PLATFORM_RESOURCES_FOLDER + "values" + File.separator + "attrs_manifest.xml";
  public static final String OS_PLATFORM_LAYOUTLIB_JAR = OS_PLATFORM_DATA_FOLDER + "layoutlib.jar";
  public static final String OS_FRAMEWORK_RS = "renderscript" + File.separator + "include";
  public static final String OS_FRAMEWORK_RS_CLANG = "renderscript" + File.separator + "clang-include";
  public static final String OS_ADDON_LIBS_FOLDER = "libs" + File.separator;
  public static final String SKIN_DEFAULT = "default";
  public static final String PROP_SDK_ANT_TEMPLATES_REVISION = "sdk.ant.templates.revision";
  public static final String PROP_SDK_DEFAULT_SKIN = "sdk.skin.default";
  public static final String CLASS_ACTIVITY = "android.app.Activity";
  public static final String CLASS_APPLICATION = "android.app.Application";
  public static final String CLASS_SERVICE = "android.app.Service";
  public static final String CLASS_BROADCASTRECEIVER = "android.content.BroadcastReceiver";
  public static final String CLASS_CONTENTPROVIDER = "android.content.ContentProvider";
  public static final String CLASS_INSTRUMENTATION = "android.app.Instrumentation";
  public static final String CLASS_INSTRUMENTATION_RUNNER = "android.test.InstrumentationTestRunner";
  public static final String CLASS_BUNDLE = "android.os.Bundle";
  public static final String CLASS_R = "android.R";
  public static final String CLASS_MANIFEST_PERMISSION = "android.Manifest$permission";
  public static final String CLASS_INTENT = "android.content.Intent";
  public static final String CLASS_CONTEXT = "android.content.Context";
  public static final String CLASS_VIEW = "android.view.View";
  public static final String CLASS_VIEWGROUP = "android.view.ViewGroup";
  public static final String CLASS_NAME_LAYOUTPARAMS = "LayoutParams";
  public static final String CLASS_VIEWGROUP_LAYOUTPARAMS = "android.view.ViewGroup$LayoutParams";
  public static final String CLASS_NAME_FRAMELAYOUT = "FrameLayout";
  public static final String CLASS_FRAMELAYOUT = "android.widget.FrameLayout";
  public static final String CLASS_PREFERENCE = "android.preference.Preference";
  public static final String CLASS_NAME_PREFERENCE_SCREEN = "PreferenceScreen";
  public static final String CLASS_PREFERENCES = "android.preference.PreferenceScreen";
  public static final String CLASS_PREFERENCEGROUP = "android.preference.PreferenceGroup";
  public static final String CLASS_PARCELABLE = "android.os.Parcelable";
  public static final String CLASS_FRAGMENT = "android.app.Fragment";
  public static final String CLASS_V4_FRAGMENT = "android.support.v4.app.Fragment";
  public static final String CLASS_MOCK_VIEW = "com.android.layoutlib.bridge.MockView";
  
  public static String androidCmdName()
  {
    String str1 = System.getProperty("os.name");
    String str2 = "android";
    if (str1.startsWith("Windows")) {
      str2 = str2 + ".bat";
    }
    return str2;
  }
  
  public static String mkSdCardCmdName()
  {
    String str1 = System.getProperty("os.name");
    String str2 = "mksdcard";
    if (str1.startsWith("Windows")) {
      str2 = str2 + ".exe";
    }
    return str2;
  }
  
  public static int currentPlatform()
  {
    String str = System.getProperty("os.name");
    if (str.startsWith("Mac OS")) {
      return 3;
    }
    if (str.startsWith("Windows")) {
      return 2;
    }
    if (str.startsWith("Linux")) {
      return 1;
    }
    return 0;
  }
  
  public static String currentPlatformName()
  {
    String str = System.getProperty("os.name");
    if (str.startsWith("Mac OS")) {
      return "Mac OS X";
    }
    if (str.startsWith("Windows")) {
      return "Windows";
    }
    if (str.startsWith("Linux")) {
      return "Linux";
    }
    return "Other";
  }
  
  private static String ext(String paramString1, String paramString2)
  {
    if (CURRENT_PLATFORM == 2) {
      return paramString1;
    }
    return paramString2;
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.SdkConstants
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

public class SdkManager$LayoutlibVersion
  implements Comparable<LayoutlibVersion>
{
  private final int mApi;
  private final int mRevision;
  public static final int NOT_SPECIFIED = 0;
  
  public SdkManager$LayoutlibVersion(int paramInt1, int paramInt2)
  {
    mApi = paramInt1;
    mRevision = paramInt2;
  }
  
  public int getApi()
  {
    return mApi;
  }
  
  public int getRevision()
  {
    return mRevision;
  }
  
  public int compareTo(LayoutlibVersion paramLayoutlibVersion)
  {
    int i = (mRevision > 0) && (mRevision > 0) ? 1 : 0;
    int j = (mApi << 16) + (i != 0 ? mRevision : 0);
    int k = (mApi << 16) + (i != 0 ? mRevision : 0);
    return j - k;
  }
}

/* Location:
 * Qualified Name:     com.android.sdklib.SdkManager.LayoutlibVersion
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.android.sdklib;

import com.android.io.FileWrapper;
import com.android.prefs.AndroidLocation;
import com.android.prefs.AndroidLocation.AndroidLocationException;
import com.android.sdklib.internal.project.ProjectProperties;
import com.android.sdklib.internal.repository.Archive;
import com.android.sdklib.internal.repository.ExtraPackage;
import com.android.sdklib.internal.repository.LocalSdkParser;
import com.android.sdklib.internal.repository.NullTaskMonitor;
import com.android.sdklib.internal.repository.Package;
import com.android.util.Pair;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class SdkManager
{
  public static final String PROP_VERSION_SDK = "ro.build.version.sdk";
  public static final String PROP_VERSION_CODENAME = "ro.build.version.codename";
  public static final String PROP_VERSION_RELEASE = "ro.build.version.release";
  public static final String ADDON_NAME = "name";
  public static final String ADDON_VENDOR = "vendor";
  public static final String ADDON_API = "api";
  public static final String ADDON_DESCRIPTION = "description";
  public static final String ADDON_LIBRARIES = "libraries";
  public static final String ADDON_DEFAULT_SKIN = "skin";
  public static final String ADDON_USB_VENDOR = "usb-vendor";
  public static final String ADDON_REVISION = "revision";
  public static final String ADDON_REVISION_OLD = "version";
  private static final Pattern PATTERN_LIB_DATA = Pattern.compile("^([a-zA-Z0-9._-]+\\.jar);(.*)$", 2);
  private static final Pattern PATTERN_USB_IDS = Pattern.compile("^0x[a-f0-9]{4}$", 2);
  private static final String[] sPlatformContentList = { "android.jar", "framework.aidl" };
  private static final String ADB_INI_FILE = "adb_usb.ini";
  private static final String ADB_INI_HEADER = "# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.\n# USE 'android update adb' TO GENERATE.\n# 1 USB VENDOR ID PER LINE.\n";
  private final String mOsSdkPath;
  private IAndroidTarget[] mTargets = new IAndroidTarget[0];
  
  public static class LayoutlibVersion
    implements Comparable<LayoutlibVersion>
  {
    private final int mApi;
    private final int mRevision;
    public static final int NOT_SPECIFIED = 0;
    
    public LayoutlibVersion(int paramInt1, int paramInt2)
    {
      mApi = paramInt1;
      mRevision = paramInt2;
    }
    
    public int getApi()
    {
      return mApi;
    }
    
    public int getRevision()
    {
      return mRevision;
    }
    
    public int compareTo(LayoutlibVersion paramLayoutlibVersion)
    {
      int i = (mRevision > 0) && (mRevision > 0) ? 1 : 0;
      int j = (mApi << 16) + (i != 0 ? mRevision : 0);
      int k = (mApi << 16) + (i != 0 ? mRevision : 0);
      return j - k;
    }
  }
  
  protected SdkManager(String paramString)
  {
    mOsSdkPath = paramString;
  }
  
  public static SdkManager createManager(String paramString, ISdkLog paramISdkLog)
  {
    try
    {
      SdkManager localSdkManager = new SdkManager(paramString);
      ArrayList localArrayList = new ArrayList();
      loadPlatforms(paramString, localArrayList, paramISdkLog);
      loadAddOns(paramString, localArrayList, paramISdkLog);
      
      Collections.sort(localArrayList);
      
      localSdkManager.setTargets((IAndroidTarget[])localArrayList.toArray(new IAndroidTarget[localArrayList.size()]));
      
      localSdkManager.initializeSamplePaths(paramISdkLog);
      
      return localSdkManager;
    }
    catch (IllegalArgumentException localIllegalArgumentException)
    {
      paramISdkLog.error(localIllegalArgumentException, "Error parsing the sdk.", new Object[0]);
    }
    return null;
  }
  
  public String getLocation()
  {
    return mOsSdkPath;
  }
  
  public IAndroidTarget[] getTargets()
  {
    return mTargets;
  }
  
  protected void setTargets(IAndroidTarget[] paramArrayOfIAndroidTarget)
  {
    assert (paramArrayOfIAndroidTarget != null);
    mTargets = paramArrayOfIAndroidTarget;
  }
  
  public IAndroidTarget getTargetFromHashString(String paramString)
  {
    if (paramString != null) {
      for (IAndroidTarget localIAndroidTarget : mTargets) {
        if (paramString.equals(localIAndroidTarget.hashString())) {
          return localIAndroidTarget;
        }
      }
    }
    return null;
  }
  
  public void updateAdb()
    throws AndroidLocation.AndroidLocationException, IOException
  {
    FileWriter localFileWriter = null;
    try
    {
      File localFile = new File(AndroidLocation.getFolder(), "adb_usb.ini");
      localFileWriter = new FileWriter(localFile);
      
      HashSet localHashSet = new HashSet();
      IAndroidTarget[] arrayOfIAndroidTarget = getTargets();
      for (Object localObject2 : arrayOfIAndroidTarget) {
        if (((IAndroidTarget)localObject2).getUsbVendorId() != 0) {
          localHashSet.add(Integer.valueOf(((IAndroidTarget)localObject2).getUsbVendorId()));
        }
      }
      localFileWriter.write("# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.\n# USE 'android update adb' TO GENERATE.\n# 1 USB VENDOR ID PER LINE.\n");
      for (??? = localHashSet.iterator(); ((Iterator)???).hasNext();)
      {
        Integer localInteger = (Integer)((Iterator)???).next();
        localFileWriter.write(String.format("0x%04x\n", new Object[] { localInteger }));
      }
    }
    finally
    {
      if (localFileWriter != null) {
        localFileWriter.close();
      }
    }
  }
  
  public void reloadSdk(ISdkLog paramISdkLog)
  {
    ArrayList localArrayList = new ArrayList();
    loadPlatforms(mOsSdkPath, localArrayList, paramISdkLog);
    loadAddOns(mOsSdkPath, localArrayList, paramISdkLog);
    
    Collections.sort(localArrayList);
    setTargets((IAndroidTarget[])localArrayList.toArray(new IAndroidTarget[localArrayList.size()]));
    
    initializeSamplePaths(paramISdkLog);
  }
  
  @Deprecated
  public LayoutlibVersion getMaxLayoutlibVersion()
  {
    Object localObject = null;
    for (IAndroidTarget localIAndroidTarget : getTargets()) {
      if ((localIAndroidTarget instanceof PlatformTarget))
      {
        LayoutlibVersion localLayoutlibVersion = ((PlatformTarget)localIAndroidTarget).getLayoutlibVersion();
        if ((localLayoutlibVersion != null) && (
          (localObject == null) || (localLayoutlibVersion.compareTo((LayoutlibVersion)localObject) > 0))) {
          localObject = localLayoutlibVersion;
        }
      }
    }
    return (LayoutlibVersion)localObject;
  }
  
  public Map<File, String> getExtraSamples()
  {
    LocalSdkParser localLocalSdkParser = new LocalSdkParser();
    Package[] arrayOfPackage1 = localLocalSdkParser.parseSdk(mOsSdkPath, this, 1024, new NullTaskMonitor(new NullSdkLog()));
    
    HashMap localHashMap = new HashMap();
    for (Package localPackage : arrayOfPackage1) {
      if (((localPackage instanceof ExtraPackage)) && (localPackage.isLocal()))
      {
        assert ((localPackage.getArchives() != null) && (localPackage.getArchives().length == 1));
        Archive localArchive = localPackage.getArchives()[0];
        assert (localArchive != null);
        File localFile = new File(localArchive.getLocalOsPath(), "samples");
        if (localFile.isDirectory()) {
          localHashMap.put(localFile, localPackage.getListDescription());
        }
      }
    }
    return localHashMap;
  }
  
  private static void loadPlatforms(String paramString, ArrayList<IAndroidTarget> paramArrayList, ISdkLog paramISdkLog)
  {
    File localFile1 = new File(paramString, "platforms");
    if (localFile1.isDirectory())
    {
      File[] arrayOfFile1 = localFile1.listFiles();
      for (File localFile2 : arrayOfFile1) {
        if (localFile2.isDirectory())
        {
          PlatformTarget localPlatformTarget = loadPlatform(paramString, localFile2, paramISdkLog);
          if (localPlatformTarget != null) {
            paramArrayList.add(localPlatformTarget);
          }
        }
        else
        {
          paramISdkLog.warning("Ignoring platform '%1$s', not a folder.", new Object[] { localFile2.getName() });
        }
      }
      return;
    }
    if (!localFile1.exists())
    {
      if (!localFile1.mkdir()) {
        throw new RuntimeException(String.format("Failed to create %1$s.", new Object[] { localFile1.getAbsolutePath() }));
      }
    }
    else {
      throw new RuntimeException(String.format("%1$s is not a folder.", new Object[] { localFile1.getAbsolutePath() }));
    }
  }
  
  private static PlatformTarget loadPlatform(String paramString, File paramFile, ISdkLog paramISdkLog)
  {
    FileWrapper localFileWrapper1 = new FileWrapper(paramFile, "build.prop");
    FileWrapper localFileWrapper2 = new FileWrapper(paramFile, "source.properties");
    if ((localFileWrapper1.isFile()) && (localFileWrapper2.isFile()))
    {
      HashMap localHashMap = new HashMap();
      
      Map localMap = ProjectProperties.parsePropertyFile(localFileWrapper1, paramISdkLog);
      if (localMap != null) {
        localHashMap.putAll(localMap);
      }
      localMap = ProjectProperties.parsePropertyFile(localFileWrapper2, paramISdkLog);
      if (localMap != null) {
        localHashMap.putAll(localMap);
      }
      FileWrapper localFileWrapper3 = new FileWrapper(paramFile, "sdk.properties");
      if (localFileWrapper3.isFile())
      {
        localMap = ProjectProperties.parsePropertyFile(localFileWrapper3, paramISdkLog);
        if (localMap != null) {
          localHashMap.putAll(localMap);
        }
      }
      String str1 = (String)localHashMap.get("ro.build.version.sdk");
      if (str1 == null)
      {
        paramISdkLog.warning("Ignoring platform '%1$s': %2$s is missing from '%3$s'", new Object[] { paramFile.getName(), "ro.build.version.sdk", "build.prop" });
        
        return null;
      }
      int i;
      try
      {
        i = Integer.parseInt(str1);
      }
      catch (NumberFormatException localNumberFormatException1)
      {
        paramISdkLog.warning("Ignoring platform '%1$s': %2$s is not a valid number in %3$s.", new Object[] { paramFile.getName(), "ro.build.version.sdk", "build.prop" });
        
        return null;
      }
      String str2 = (String)localHashMap.get("ro.build.version.codename");
      if ((str2 != null) && (str2.equals("REL"))) {
        str2 = null;
      }
      String str3 = (String)localHashMap.get("Platform.Version");
      if (str3 == null) {
        str3 = (String)localHashMap.get("ro.build.version.release");
      }
      if (str3 == null)
      {
        paramISdkLog.warning("Ignoring platform '%1$s': %2$s is missing from '%3$s'", new Object[] { paramFile.getName(), "ro.build.version.release", "build.prop" });
        
        return null;
      }
      int j = 1;
      LayoutlibVersion localLayoutlibVersion = null;
      try
      {
        j = Integer.parseInt((String)localHashMap.get("Pkg.Revision"));
      }
      catch (NumberFormatException localNumberFormatException2) {}
      try
      {
        String str4 = (String)localHashMap.get("Layoutlib.Api");
        localObject = (String)localHashMap.get("Layoutlib.Revision");
        int k = str4 == null ? 0 : Integer.parseInt(str4);
        
        int m = localObject == null ? 0 : Integer.parseInt((String)localObject);
        if ((k > 0) && (m >= 0)) {
          localLayoutlibVersion = new LayoutlibVersion(k, m);
        }
      }
      catch (NumberFormatException localNumberFormatException3) {}
      if (!checkPlatformContent(paramFile, paramISdkLog)) {
        return null;
      }
      ISystemImage[] arrayOfISystem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd