Class DisplayConfig


  • public final class DisplayConfig
    extends java.lang.Object
    Describes the characteristics of a particular logical display. Robolectric internal (for now), do not use.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int appHeight
      The height of the portion of the display that is available to applications, in pixels.
      long appVsyncOffsetNanos
      This is a positive value indicating the phase offset of the VSYNC events provided by Choreographer relative to the display refresh.
      int appWidth
      The width of the portion of the display that is available to applications, in pixels.
      int colorMode
      The active color mode.
      int defaultModeId
      The default display mode.
      int flags
      Display flags.
      android.view.Display.HdrCapabilities hdrCapabilities
      The display's HDR capabilities
      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.
      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.
      int layerStack
      The surface flinger layer stack associated with this logical display.
      int logicalDensityDpi
      The logical display density which is the basis for density-independent pixels.
      int logicalHeight
      The logical height of the display, in pixels.
      int logicalWidth
      The logical width of the display, in pixels.
      int modeId
      The active display mode.
      java.lang.String name
      The human-readable name of the display.
      int overscanBottom  
      int overscanLeft  
      int overscanRight  
      int overscanTop  
      java.lang.String ownerPackageName
      The package name of the application that owns this display, or null if it is owned by the system.
      int ownerUid
      The UID of the application that owns this display, or zero if it is owned by the system.
      float physicalXDpi
      The exact physical pixels per inch of the screen in the X dimension.
      float physicalYDpi
      The exact physical pixels per inch of the screen in the Y dimension.
      long presentationDeadlineNanos
      This is how far in advance a buffer must be queued for presentation at a given time.
      int removeMode  
      int rotation
      The rotation of the display relative to its natural orientation.
      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.
      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.
      int state
      The state of the display, such as Display.STATE_ON.
      int[] supportedColorModes
      The list of supported color modes
      android.view.Display.Mode[] supportedModes
      The supported modes of this display.
      int type
      Display type.
      java.lang.String uniqueId
      Unique identifier for the display.
    • 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 java.lang.String name
        The human-readable name of the display.
      • uniqueId

        public java.lang.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.
      • overscanLeft

        public int overscanLeft
      • overscanTop

        public int overscanTop
      • overscanRight

        public int overscanRight
      • overscanBottom

        public int overscanBottom
      • rotation

        public int rotation
        The rotation of the display relative to its natural orientation. May be one of Surface.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 modeId
        The active display mode.
      • defaultModeId

        public int defaultModeId
        The default display mode.
      • supportedModes

        public android.view.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
      • hdrCapabilities

        public android.view.Display.HdrCapabilities hdrCapabilities
        The display's HDR capabilities
      • 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).
      • state

        public int state
        The state of the display, such as Display.STATE_ON.
      • 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 java.lang.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.

      • removeMode

        public int removeMode
        See Also:
        Display.getRemoveMode()
    • Constructor Detail

      • DisplayConfig

        public DisplayConfig()
      • DisplayConfig

        public DisplayConfig​(android.view.DisplayInfo other)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • copyTo

        public void copyTo​(android.view.DisplayInfo other)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object