|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.avd.AvdInfo
public final class AvdInfo
An immutable structure describing an Android Virtual Device.
| Nested Class Summary | |
|---|---|
static class |
AvdInfo.AvdStatus
Status for an AvdInfo. |
| Constructor Summary | |
|---|---|
AvdInfo(java.lang.String name,
java.io.File iniFile,
java.lang.String folderPath,
java.lang.String targetHash,
IAndroidTarget target,
java.lang.String abiType,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new valid AVD info. |
|
AvdInfo(java.lang.String name,
java.io.File iniFile,
java.lang.String folderPath,
java.lang.String targetHash,
IAndroidTarget target,
java.lang.String abiType,
java.util.Map<java.lang.String,java.lang.String> properties,
AvdInfo.AvdStatus status)
Creates a new invalid AVD info. |
|
| Method Summary | |
|---|---|
int |
compareTo(AvdInfo o)
Compares this object with the specified object for order. |
java.lang.String |
getAbiType()
Returns the processor type of the AVD. |
java.io.File |
getConfigFile()
Returns the Config File for this AVD. |
static java.io.File |
getConfigFile(java.lang.String path)
Helper method that returns the Config File for a given AVD name. |
java.lang.String |
getCpuArch()
|
java.lang.String |
getDataFolderPath()
Returns the path of the AVD data directory. |
static java.io.File |
getDefaultAvdFolder(AvdManager manager,
java.lang.String avdName)
Helper method that returns the default AVD folder that would be used for a given AVD name if and only if the AVD was created with the default choice. |
static java.io.File |
getDefaultIniFile(AvdManager manager,
java.lang.String avdName)
Helper method that returns the .ini File for a given AVD name. |
java.lang.String |
getDeviceManufacturer()
|
java.lang.String |
getDeviceName()
|
java.lang.String |
getErrorMessage()
Returns the error message for the AVD or null if getStatus()
returns AvdInfo.AvdStatus.OK |
java.io.File |
getIniFile()
Returns the .ini File for this AVD. |
java.lang.String |
getName()
Returns the name of the AVD. |
static java.lang.String |
getPrettyAbiType(java.lang.String raw)
Convenience function to return a more user friendly name of the abi type. |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns an unmodifiable map of properties for the AVD. |
AvdInfo.AvdStatus |
getStatus()
Returns the AvdInfo.AvdStatus of the receiver. |
IAndroidTarget |
getTarget()
Returns the target of the AVD, or null if it has not been resolved. |
java.lang.String |
getTargetHash()
Returns the target hash string. |
boolean |
isRunning()
Returns whether an emulator is currently running the AVD. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AvdInfo(java.lang.String name,
java.io.File iniFile,
java.lang.String folderPath,
java.lang.String targetHash,
IAndroidTarget target,
java.lang.String abiType,
java.util.Map<java.lang.String,java.lang.String> properties)
name - The name of the AVD (for display or reference)iniFile - The path to the config.ini filefolderPath - The path to the data directorytargetHash - the target hashtarget - The target. Can be null, if the target was not resolved.abiType - Name of the abi.properties - The property map. If null, an empty map will be created.
public AvdInfo(java.lang.String name,
java.io.File iniFile,
java.lang.String folderPath,
java.lang.String targetHash,
IAndroidTarget target,
java.lang.String abiType,
java.util.Map<java.lang.String,java.lang.String> properties,
AvdInfo.AvdStatus status)
name - The name of the AVD (for display or reference)iniFile - The path to the config.ini filefolderPath - The path to the data directorytargetHash - the target hashtarget - The target. Can be null, if the target was not resolved.abiType - Name of the abi.properties - The property map. If null, an empty map will be created.status - The AvdInfo.AvdStatus of this AVD. Cannot be null.| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getDataFolderPath()
public java.lang.String getAbiType()
public java.lang.String getCpuArch()
public java.lang.String getDeviceManufacturer()
public java.lang.String getDeviceName()
public static java.lang.String getPrettyAbiType(java.lang.String raw)
public java.lang.String getTargetHash()
public IAndroidTarget getTarget()
null if it has not been resolved.
public AvdInfo.AvdStatus getStatus()
AvdInfo.AvdStatus of the receiver.
public static java.io.File getDefaultAvdFolder(AvdManager manager,
java.lang.String avdName)
throws com.android.prefs.AndroidLocation.AndroidLocationException
AvdInfo to setup its data folder
to the default.
The default is getDefaultAvdFolder()/avdname.avd/.
For an actual existing AVD, callers must use getDataFolderPath() instead.
manager - The AVD Manager, used to get the AVD storage path.avdName - The name of the desired AVD.
com.android.prefs.AndroidLocation.AndroidLocationException - if there's a problem getting android root directory.
public static java.io.File getDefaultIniFile(AvdManager manager,
java.lang.String avdName)
throws com.android.prefs.AndroidLocation.AndroidLocationException
File for a given AVD name.
The default is getDefaultAvdFolder()/avdname.ini.
manager - The AVD Manager, used to get the AVD storage path.avdName - The name of the desired AVD.
com.android.prefs.AndroidLocation.AndroidLocationException - if there's a problem getting android root directory.public java.io.File getIniFile()
File for this AVD.
public static java.io.File getConfigFile(java.lang.String path)
File for a given AVD name.
public java.io.File getConfigFile()
File for this AVD.
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public java.lang.String getErrorMessage()
null if getStatus()
returns AvdInfo.AvdStatus.OK
public boolean isRunning()
public int compareTo(AvdInfo o)
compareTo in interface java.lang.Comparable<AvdInfo>o - the Object to be compared.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||