DisplayManagerInternal.javaAPI DocAndroid 5.1 API13063Thu Mar 12 22:22:10 GMT 2015android.hardware.display


public abstract class DisplayManagerInternal extends Object
Display manager local system service interface.
Only for use within the system server.

Fields Summary
Constructors Summary
Methods Summary
public abstract android.view.DisplayInfogetDisplayInfo(int displayId)
Returns information about the specified logical display.

displayId The logical display id.
The logical display info, or null if the display does not exist. The returned object must be treated as immutable.

public abstract voidinitPowerManagement(android.hardware.display.DisplayManagerInternal$DisplayPowerCallbacks callbacks, android.os.Handler handler, android.hardware.SensorManager sensorManager)
Called by the power manager to initialize power management facilities.

public abstract booleanisProximitySensorAvailable()
Returns true if the proximity sensor screen-off function is available.

public abstract voidperformTraversalInTransactionFromWindowManager()
Called by the window manager to perform traversals while holding a surface flinger transaction.

public abstract voidregisterDisplayTransactionListener(android.hardware.display.DisplayManagerInternal$DisplayTransactionListener listener)
Registers a display transaction listener to provide the client a chance to update its surfaces within the same transaction as any display layout updates.

listener The listener to register.

public abstract booleanrequestPowerState(android.hardware.display.DisplayManagerInternal$DisplayPowerRequest request, boolean waitForNegativeProximity)
Called by the power manager to request a new power state.

The display power controller makes a copy of the provided object and then begins adjusting the power state to match what was requested.

request The requested power state.
waitForNegativeProximity If true, issues a request to wait for negative proximity before turning the screen back on, assuming the screen was turned off by the proximity sensor.
True if display is ready, false if there are important changes that must be made asynchronously (such as turning the screen on), in which case the caller should grab a wake lock, watch for {@link DisplayPowerCallbacks#onStateChanged()} then try the request again later until the state converges.

public abstract voidsetDisplayInfoOverrideFromWindowManager(int displayId, android.view.DisplayInfo info)
Overrides the display information of a particular logical display. This is used by the window manager to control the size and characteristics of the default display. It is expected to apply the requested change to the display information synchronously so that applications will immediately observe the new state. NOTE: This method must be the only entry point by which the window manager influences the logical configuration of displays.

displayId The logical display id.
info The new data to be stored.

public abstract voidsetDisplayProperties(int displayId, boolean hasContent, float requestedRefreshRate, boolean inTraversal)
Tells the display manager about properties of the display that depend on the windows on it. This includes whether there is interesting unique content on the specified logical display, and whether the one of the windows has a preferred refresh rate.

If the display has unique content, then the display manager arranges for it to be presented on a physical display if appropriate. Otherwise, the display manager may choose to make the physical display mirror some other logical display.

If one of the windows on the display has a preferred refresh rate that's supported by the display, then the display manager will request its use.

displayId The logical display id to update.
hasContent True if the logical display has content. This is used to control automatic mirroring.
requestedRefreshRate The preferred refresh rate for the top-most visible window that has a preference.
inTraversal True if called from WindowManagerService during a window traversal prior to call to performTraversalInTransactionFromWindowManager.

public abstract voidunregisterDisplayTransactionListener(android.hardware.display.DisplayManagerInternal$DisplayTransactionListener listener)
Unregisters a display transaction listener to provide the client a chance to update its surfaces within the same transaction as any display layout updates.

listener The listener to unregister.