Class DisplayConfig


  • public final class DisplayConfig
    extends Object
    Describes the characteristics of a particular logical display.

    Robolectric internal (for now), do not use.

    • Field Detail

      • layerStack

        public int layerStack
        The surface flinger layer stack associated with this logical display.
      • flags

        public int flags
        Display flags.
      • type

        public int type
        Display type.
      • name

        public String name
        The human-readable name of the display.
      • uniqueId

        public String uniqueId
        Unique identifier for the display. Shouldn't be displayed to the user.
      • appWidth

        public int appWidth
        The 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 appHeight
        The 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 smallestNominalAppWidth
        The smallest value of appWidth that 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 smallestNominalAppHeight
        The smallest value of appHeight that 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 largestNominalAppWidth
        The largest value of appWidth that 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 largestNominalAppHeight
        The largest value of appHeight that 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 logicalWidth
        The 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 logicalHeight
        The 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.
      • modeId

        public int modeId
        The active display mode.
      • defaultModeId

        public int defaultModeId
        The default display mode.
      • supportedModes

        public Display.Mode[] supportedModes
        The supported modes of this display.
      • colorMode

        public int colorMode
        The active color mode.
      • supportedColorModes

        public int[] supportedColorModes
        The list of supported color modes
      • logicalDensityDpi

        public int logicalDensityDpi
        The logical display density which is the basis for density-independent pixels.
      • physicalXDpi

        public float physicalXDpi
        The 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 physicalYDpi
        The 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 appVsyncOffsetNanos
        This 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 presentationDeadlineNanos
        This 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).
      • ownerUid

        public int ownerUid
        The 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

        public String 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.

      • displayCutout

        public Object displayCutout
        The area of the display that is not functional for displaying content
    • Constructor Detail

      • DisplayConfig

        public DisplayConfig()
      • DisplayConfig

        public DisplayConfig​(DisplayInfo other)