Package org.robolectric.android.internal
Class DisplayConfig
java.lang.Object
org.robolectric.android.internal.DisplayConfig
public final class DisplayConfig extends Object
Describes the characteristics of a particular logical display.
Robolectric internal (for now), do not use.
-
Field Summary
Fields Modifier and Type Field Description intappHeightThe height of the portion of the display that is available to applications, in pixels.longappVsyncOffsetNanosThis is a positive value indicating the phase offset of the VSYNC events provided by Choreographer relative to the display refresh.intappWidthThe width of the portion of the display that is available to applications, in pixels.intcolorModeThe active color mode.intdefaultModeIdThe default display mode.ObjectdisplayCutoutThe area of the display that is not functional for displaying contentintflagsDisplay flags.Display.HdrCapabilitieshdrCapabilitiesThe display's HDR capabilitiesintlargestNominalAppHeightThe largest value ofappHeightthat an application is likely to encounter, in pixels, excepting cases where the height may be even larger due to system decorations such as the status bar being hidden, for example.intlargestNominalAppWidthThe largest value ofappWidththat an application is likely to encounter, in pixels, excepting cases where the width may be even larger due to system decorations such as the status bar being hidden, for example.intlayerStackThe surface flinger layer stack associated with this logical display.intlogicalDensityDpiThe logical display density which is the basis for density-independent pixels.intlogicalHeightThe logical height of the display, in pixels.intlogicalWidthThe logical width of the display, in pixels.intmodeIdThe active display mode.StringnameThe human-readable name of the display.StringownerPackageNameThe package name of the application that owns this display, or null if it is owned by the system.intownerUidThe UID of the application that owns this display, or zero if it is owned by the system.floatphysicalXDpiThe exact physical pixels per inch of the screen in the X dimension.floatphysicalYDpiThe exact physical pixels per inch of the screen in the Y dimension.longpresentationDeadlineNanosThis is how far in advance a buffer must be queued for presentation at a given time.intremoveModeintrotationThe rotation of the display relative to its natural orientation.intsmallestNominalAppHeightThe smallest value ofappHeightthat an application is likely to encounter, in pixels, excepting cases where the height may be even smaller due to the presence of a soft keyboard, for example.intsmallestNominalAppWidthThe smallest value ofappWidththat an application is likely to encounter, in pixels, excepting cases where the width may be even smaller due to the presence of a soft keyboard, for example.intstateThe state of the display, such asDisplay.STATE_ON.int[]supportedColorModesThe list of supported color modesDisplay.Mode[]supportedModesThe supported modes of this display.inttypeDisplay type.StringuniqueIdUnique identifier for the display. -
Constructor Summary
Constructors Constructor Description DisplayConfig()DisplayConfig(DisplayInfo other)DisplayConfig(DisplayConfig other) -
Method Summary
Modifier and Type Method Description voidcopyFrom(DisplayConfig other)voidcopyTo(DisplayInfo other)booleanequals(Object o)booleanequals(DisplayConfig other)inthashCode()StringtoString()
-
Field Details
-
layerStack
public int layerStackThe surface flinger layer stack associated with this logical display. -
flags
public int flagsDisplay flags. -
type
public int typeDisplay type. -
name
The human-readable name of the display. -
uniqueId
Unique identifier for the display. Shouldn't be displayed to the user. -
appWidth
public int appWidthThe width of the portion of the display that is available to applications, in pixels. Represents the size of the display minus any system decorations. -
appHeight
public int appHeightThe height of the portion of the display that is available to applications, in pixels. Represents the size of the display minus any system decorations. -
smallestNominalAppWidth
public int smallestNominalAppWidthThe smallest value ofappWidththat an application is likely to encounter, in pixels, excepting cases where the width may be even smaller due to the presence of a soft keyboard, for example. -
smallestNominalAppHeight
public int smallestNominalAppHeightThe smallest value ofappHeightthat an application is likely to encounter, in pixels, excepting cases where the height may be even smaller due to the presence of a soft keyboard, for example. -
largestNominalAppWidth
public int largestNominalAppWidthThe largest value ofappWidththat an application is likely to encounter, in pixels, excepting cases where the width may be even larger due to system decorations such as the status bar being hidden, for example. -
largestNominalAppHeight
public int largestNominalAppHeightThe largest value ofappHeightthat an application is likely to encounter, in pixels, excepting cases where the height may be even larger due to system decorations such as the status bar being hidden, for example. -
logicalWidth
public int logicalWidthThe logical width of the display, in pixels. Represents the usable size of the display which may be smaller than the physical size when the system is emulating a smaller display. -
logicalHeight
public int logicalHeightThe logical height of the display, in pixels. Represents the usable size of the display which may be smaller than the physical size when the system is emulating a smaller display. -
rotation
public int rotationThe rotation of the display relative to its natural orientation. May be one ofSurface.ROTATION_0,Surface.ROTATION_90,Surface.ROTATION_180,Surface.ROTATION_270.The value of this field is indeterminate if the logical display is presented on more than one physical display.
-
modeId
public int modeIdThe active display mode. -
defaultModeId
public int defaultModeIdThe default display mode. -
supportedModes
The supported modes of this display. -
colorMode
public int colorModeThe active color mode. -
supportedColorModes
public int[] supportedColorModesThe list of supported color modes -
hdrCapabilities
The display's HDR capabilities -
logicalDensityDpi
public int logicalDensityDpiThe logical display density which is the basis for density-independent pixels. -
physicalXDpi
public float physicalXDpiThe exact physical pixels per inch of the screen in the X dimension.The value of this field is indeterminate if the logical display is presented on more than one physical display.
-
physicalYDpi
public float physicalYDpiThe exact physical pixels per inch of the screen in the Y dimension.The value of this field is indeterminate if the logical display is presented on more than one physical display.
-
appVsyncOffsetNanos
public long appVsyncOffsetNanosThis is a positive value indicating the phase offset of the VSYNC events provided by Choreographer relative to the display refresh. For example, if Choreographer reports that the refresh occurred at time N, it actually occurred at (N - appVsyncOffsetNanos). -
presentationDeadlineNanos
public long presentationDeadlineNanosThis is how far in advance a buffer must be queued for presentation at a given time. If you want a buffer to appear on the screen at time N, you must submit the buffer before (N - bufferDeadlineNanos). -
state
public int stateThe state of the display, such asDisplay.STATE_ON. -
ownerUid
public int ownerUidThe UID of the application that owns this display, or zero if it is owned by the system.If the display is private, then only the owner can use it.
-
ownerPackageName
The package name of the application that owns this display, or null if it is owned by the system.If the display is private, then only the owner can use it.
-
removeMode
public int removeMode- See Also:
Display.getRemoveMode()
-
displayCutout
The area of the display that is not functional for displaying content
-
-
Constructor Details
-
DisplayConfig
public DisplayConfig() -
DisplayConfig
-
DisplayConfig
-
-
Method Details