public static interface WindowManagerPolicy.WindowState
Modifier and Type | Method and Description |
---|---|
void |
computeFrameLw(Rect parentFrame,
Rect displayFrame,
Rect overlayFrame,
Rect contentFrame,
Rect visibleFrame,
Rect decorFrame,
Rect stableFrame,
Rect outsetFrame)
Perform standard frame computation.
|
IApplicationToken |
getAppToken()
Return the token for the application (actually activity) that owns
this window.
|
WindowManager.LayoutParams |
getAttrs()
Retrieve the current LayoutParams of the window.
|
int |
getBaseType()
Retrieve the type of the top-level window.
|
Rect |
getContentFrameLw()
Retrieve the frame of the content area that this window was last
laid out in.
|
Rect |
getDisplayFrameLw()
Retrieve the frame of the display that this window was last
laid out in.
|
Rect |
getFrameLw()
Retrieve the current frame of the window that has been assigned by
the window manager.
|
Rect |
getGivenContentInsetsLw()
Retrieve the insets given by this window's client for the content
area of windows behind it.
|
boolean |
getGivenInsetsPendingLw()
Returns true if this window is waiting to receive its given
internal insets from the client app, and so should not impact the
layout of other windows.
|
Rect |
getGivenVisibleInsetsLw()
Retrieve the insets given by this window's client for the visible
area of windows behind it.
|
boolean |
getNeedsMenuLw(WindowManagerPolicy.WindowState bottom)
Return whether this window needs the menu key shown.
|
Rect |
getOverscanFrameLw()
Retrieve the frame of the area inside the overscan region of the
display that this window was last laid out in.
|
String |
getOwningPackage()
Return the package name of the app that owns this window.
|
int |
getOwningUid()
Return the uid of the app that owns this window.
|
int |
getRotationAnimationHint() |
Point |
getShownPositionLw()
Retrieve the current position of the window that is actually shown.
|
int |
getStackId() |
int |
getSurfaceLayer()
Get the layer at which this window's surface will be Z-ordered.
|
int |
getSystemUiVisibility()
Retrieve the current system UI visibility flags associated with
this window.
|
Rect |
getVisibleFrameLw()
Retrieve the frame of the visible area that this window was last
laid out in.
|
boolean |
hasAppShownWindows()
Return true if, at any point, the application token associated with
this window has actually displayed any windows.
|
boolean |
hasDrawnLw()
Returns true if this window has been shown on screen at some time in
the past.
|
boolean |
hideLw(boolean doAnimation)
Can be called by the policy to force a window to be hidden,
regardless of whether the client or window manager would like
it shown.
|
boolean |
isAlive()
Check whether the process hosting this window is currently alive.
|
boolean |
isAnimatingLw()
Return true if this window (or a window it is attached to, but not
considering its app token) is currently animating.
|
boolean |
isDefaultDisplay()
Check if window is on
Display.DEFAULT_DISPLAY . |
boolean |
isDimming()
Check whether the window is currently dimming.
|
boolean |
isDisplayedLw()
Is this window currently visible to the user on-screen?
|
boolean |
isDrawnLw()
Returns true if the window has a surface that it has drawn a
complete UI in to.
|
boolean |
isGoneForLayoutLw()
Is this window considered to be gone for purposes of layout?
|
boolean |
isInMultiWindowMode()
Returns true if the window is current in multi-windowing mode. i.e. it shares the
screen with other application windows.
|
boolean |
isVisibleLw()
Is this window visible?
|
boolean |
isVisibleOrBehindKeyguardLw()
Like
isVisibleLw() , but also counts a window that is currently
"hidden" behind the keyguard as visible. |
boolean |
isVoiceInteraction()
Return true if this window is participating in voice interaction.
|
boolean |
showLw(boolean doAnimation)
Can be called to undo the effect of
hideLw(boolean) , allowing a
window to be shown as long as the window manager and client would
also like it to be shown. |
int getOwningUid()
String getOwningPackage()
void computeFrameLw(Rect parentFrame, Rect displayFrame, Rect overlayFrame, Rect contentFrame, Rect visibleFrame, Rect decorFrame, Rect stableFrame, Rect outsetFrame)
parentFrame
- The frame of the parent container this window
is in, used for computing its basic position.displayFrame
- The frame of the overall display in which this
window can appear, used for constraining the overall dimensions
of the window.overlayFrame
- The frame within the display that is inside
of the overlay region.contentFrame
- The frame within the display in which we would
like active content to appear. This will cause windows behind to
be resized to match the given content frame.visibleFrame
- The frame within the display that the window
is actually visible, used for computing its visible insets to be
given to windows behind.
This can be used as a hint for scrolling (avoiding resizing)
the window to make certain that parts of its content
are visible.decorFrame
- The decor frame specified by policy specific to this window,
to use for proper cropping during animation.stableFrame
- The frame around which stable system decoration is positioned.outsetFrame
- The frame that includes areas that aren't part of the surface but we
want to treat them as such.Rect getFrameLw()
Point getShownPositionLw()
Rect getDisplayFrameLw()
Rect getOverscanFrameLw()
Rect getContentFrameLw()
Rect getVisibleFrameLw()
boolean getGivenInsetsPendingLw()
Rect getGivenContentInsetsLw()
Rect getGivenVisibleInsetsLw()
WindowManager.LayoutParams getAttrs()
boolean getNeedsMenuLw(WindowManagerPolicy.WindowState bottom)
bottom
- The bottom-most window to consider when determining this.int getSystemUiVisibility()
int getSurfaceLayer()
int getBaseType()
IApplicationToken getAppToken()
boolean isVoiceInteraction()
boolean hasAppShownWindows()
boolean isVisibleLw()
boolean isVisibleOrBehindKeyguardLw()
isVisibleLw()
, but also counts a window that is currently
"hidden" behind the keyguard as visible. This allows us to apply
things like window flags that impact the keyguard.boolean isDisplayedLw()
boolean isAnimatingLw()
boolean isGoneForLayoutLw()
boolean isDrawnLw()
hasDrawnLw()
in that it also returns true if the window is READY_TO_SHOW, but was not yet
promoted to HAS_DRAWN.boolean hasDrawnLw()
boolean hideLw(boolean doAnimation)
showLw(boolean)
was last called for the window.boolean showLw(boolean doAnimation)
hideLw(boolean)
, allowing a
window to be shown as long as the window manager and client would
also like it to be shown. Must be called with the window manager
lock held.
Returns true if hideLw(boolean)
was last called for the window.boolean isAlive()
boolean isDefaultDisplay()
Display.DEFAULT_DISPLAY
.boolean isDimming()
int getStackId()
ActivityManager.StackId.INVALID_STACK_ID
if
not attached to any stack.boolean isInMultiWindowMode()
int getRotationAnimationHint()