public final class Device
extends java.lang.Object
Device.Builder class to construct a Device object, or the
DeviceParser if constructing device objects from XML conforming to
the DeviceSchema standards.| Modifier and Type | Class and Description |
|---|---|
static class |
Device.Builder |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<Software> |
getAllSoftware()
|
java.util.List<State> |
getAllStates()
|
java.util.Map<java.lang.String,java.lang.String> |
getBootProps()
Returns the optional boot.props of the device.
|
int |
getChinSize()
A convenience method to get the chin size for this device.
|
Hardware |
getDefaultHardware()
Returns the default
Hardware configuration for the device. |
State |
getDefaultState()
|
static java.util.Comparator<Device> |
getDisplayComparator()
Returns a comparator suitable to sort a device list using a sort-aware display name.
|
java.lang.String |
getDisplayName()
Returns the user visible name of the
Device. |
java.lang.String |
getId()
Returns the id of the
Device. |
java.lang.String |
getManufacturer()
Returns the manufacturer of the
Device. |
Meta |
getMeta()
Returns the
Meta object for the device, which contains meta
information about the device, such as the location of icons. |
java.lang.String |
getName()
Deprecated.
Use
getId() or getDisplayName() instead based on whether
a stable identifier or a user visible name is needed |
java.awt.Dimension |
getScreenSize(com.android.resources.ScreenOrientation orientation) |
Software |
getSoftware(int apiVersion)
Returns the software configuration for the given API version.
|
State |
getState(java.lang.String name)
Returns the state of the device with the given name.
|
java.lang.String |
getTagId()
Returns the optional tag-id of the device.
|
int |
hashCode()
For *internal* usage only.
|
boolean |
hasPlayStore()
Returns true if this type of emulated
Device supports Google Play Store. |
boolean |
isScreenRound()
A convenience method to get if the screen for this device is round.
|
java.lang.String |
toString()
toString value suitable for debugging only.
|
@NonNull @Deprecated public java.lang.String getName()
getId() or getDisplayName() instead based on whether
a stable identifier or a user visible name is neededDevice. This is intended to be displayed by the user and
can vary over time. For a stable internal name of the device, use getId() instead.Device.@NonNull public java.lang.String getDisplayName()
Device. This is intended to be displayed by the
user and can vary over time. For a stable internal name of the device, use getId()
instead.Device.@NonNull public java.lang.String getId()
Device.Device.public boolean hasPlayStore()
Device supports Google Play Store.@NonNull public java.lang.String getManufacturer()
Device.Device.@NonNull public java.util.List<Software> getAllSoftware()
Software configurations.@NonNull public java.util.List<State> getAllStates()
States.@NonNull public Hardware getDefaultHardware()
Hardware configuration for the device. This
is really just a shortcut for getting the Hardware on the default
StateHardware for the device.@NonNull public Meta getMeta()
Meta object for the device, which contains meta
information about the device, such as the location of icons.@Nullable public Software getSoftware(int apiVersion)
apiVersion - The API version requested.@Nullable public State getState(java.lang.String name)
name - The name of the state requested.@Nullable
public java.awt.Dimension getScreenSize(@NonNull
com.android.resources.ScreenOrientation orientation)
@Nullable public java.lang.String getTagId()
@NonNull public java.util.Map<java.lang.String,java.lang.String> getBootProps()
public boolean isScreenRound()
public int getChinSize()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.util.Comparator<Device> getDisplayComparator()