public class WindowManagerService extends IWindowManager.Stub implements Watchdog.Monitor, WindowManagerPolicy.WindowManagerFuncs
Modifier and Type | Class and Description |
---|---|
static interface |
WindowManagerService.WindowChangeListener |
CAMERA_LENS_COVER_ABSENT, CAMERA_LENS_COVERED, CAMERA_LENS_UNCOVERED, LID_ABSENT, LID_CLOSED, LID_OPEN
Modifier and Type | Method and Description |
---|---|
void |
addAppToken(int addPos,
IApplicationToken token,
int taskId,
int stackId,
int requestedOrientation,
boolean fullscreen,
boolean showForAllUsers,
int userId,
int configChanges,
boolean voiceInteraction,
boolean launchTaskBehind,
Rect taskBounds,
Configuration config,
int taskResizeMode,
boolean alwaysFocusable,
boolean homeTask,
int targetSdkVersion,
int rotationAnimationHint) |
WindowManagerPolicy.InputConsumer |
addInputConsumer(Looper looper,
InputEventReceiver.Factory inputEventReceiverFactory)
Add a input consumer which will consume all input events going to any window below it.
|
void |
addTask(int taskId,
int stackId,
boolean toTop) |
int |
addWindow(com.android.server.wm.Session session,
IWindow client,
int seq,
WindowManager.LayoutParams attrs,
int viewVisibility,
int displayId,
Rect outContentInsets,
Rect outStableInsets,
Rect outOutsets,
InputChannel outInputChannel) |
void |
addWindowChangeListener(WindowManagerService.WindowChangeListener listener) |
void |
addWindowToken(IBinder token,
int type) |
void |
animateResizePinnedStack(Rect bounds,
int animationDuration) |
Rect |
attachStack(int stackId,
int displayId,
boolean onTop)
Create a new TaskStack and place it on a DisplayContent.
|
void |
cancelTaskThumbnailTransition(int taskId) |
void |
cancelTaskWindowTransition(int taskId) |
void |
clearForcedDisplayDensityForUser(int displayId,
int userId) |
void |
clearForcedDisplaySize(int displayId) |
boolean |
clearWindowContentFrameStats(IBinder token) |
void |
closeSystemDialogs(String reason) |
Configuration |
computeNewConfiguration() |
void |
continueSurfaceLayout()
Resumes layout passes after deferring them.
|
void |
createDisplayContentLocked(Display display) |
void |
createWallpaperInputConsumer(InputChannel inputChannel) |
void |
deferSurfaceLayout()
Starts deferring layout passes.
|
void |
detachStack(int stackId) |
boolean |
detectSafeMode() |
void |
disableKeyguard(IBinder token,
String tag) |
void |
dismissKeyguard() |
void |
displayReady() |
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
void |
enableScreenAfterBoot() |
void |
enableScreenIfNeeded() |
void |
endProlongedAnimations() |
void |
executeAppTransition() |
void |
exitKeyguardSecurely(IOnKeyguardExitResult callback) |
void |
finishDrawingWindow(com.android.server.wm.Session session,
IWindow client) |
void |
freezeRotation(int rotation)
Freeze rotation changes.
|
float |
getAnimationScale(int which) |
float[] |
getAnimationScales() |
int |
getAppOrientation(IApplicationToken token) |
int |
getBaseDisplayDensity(int displayId) |
void |
getBaseDisplaySize(int displayId,
Point size) |
Rect |
getBoundsForNewConfiguration(int stackId) |
int |
getCameraLensCoverState()
Returns a code that descripbes whether the camera lens is covered or not.
|
float |
getCurrentAnimatorScale() |
com.android.server.wm.DisplayContent |
getDefaultDisplayContentLocked() |
DisplayInfo |
getDefaultDisplayInfoLocked() |
com.android.server.wm.WindowList |
getDefaultWindowListLocked() |
com.android.server.wm.DisplayContent |
getDisplayContentLocked(int displayId)
Retrieve the DisplayContent for the specified displayId.
|
int |
getDockedDividerInsetsLw() |
int |
getDockedStackSide() |
int |
getInitialDisplayDensity(int displayId) |
void |
getInitialDisplaySize(int displayId,
Point size) |
com.android.server.wm.InputMonitor |
getInputMonitor() |
int |
getLidState()
Returns a code that describes the current state of the lid switch.
|
int |
getOrientationLocked() |
int |
getPendingAppTransition() |
int |
getPreferredOptionsPanelGravity()
Apps that use the compact menu panel (as controlled by the panelMenuIsCompact
theme attribute) on devices that feature a physical options menu key attempt to position
their menu panel window along the edge of the screen nearest the physical menu key.
|
int |
getRotation() |
int |
getSmallestWidthForTaskBounds(Rect bounds)
Calculates the smallest width for a task given the .
|
void |
getStableInsets(Rect outInsets) |
void |
getStackBounds(int stackId,
Rect bounds)
Retrieves the from the stack with id .
|
void |
getStackDockedModeBounds(int stackId,
Rect bounds,
boolean ignoreVisibility) |
void |
getTaskBounds(int taskId,
Rect bounds) |
float |
getTransitionAnimationScaleLocked() |
float |
getWindowAnimationScaleLocked() |
WindowContentFrameStats |
getWindowContentFrameStats(IBinder token) |
void |
getWindowDisplayFrame(com.android.server.wm.Session session,
IWindow client,
Rect outDisplayFrame) |
IWindowId |
getWindowId(IBinder token) |
com.android.server.wm.WindowList |
getWindowListLocked(Display display)
Return the list of WindowStates associated on the passed display.
|
com.android.server.wm.WindowList |
getWindowListLocked(int displayId)
Return the list of WindowStates associated on the passed display.
|
Object |
getWindowManagerLock()
Return the window manager lock needed to correctly call "Lw" methods.
|
void |
handleDisplayAdded(int displayId) |
boolean |
hasNavigationBar() |
void |
hideBootMessagesLocked() |
boolean |
inKeyguardRestrictedInputMode() |
boolean |
inputMethodClientHasFocus(IInputMethodClient client) |
boolean |
isKeyguardLocked() |
boolean |
isKeyguardSecure() |
boolean |
isRotationFrozen() |
boolean |
isSafeModeEnabled() |
boolean |
isValidTaskId(int taskId)
Return true if the input task id represents a valid window manager task.
|
boolean |
isViewServerRunning()
Indicates whether the view server is running.
|
void |
keyguardGoingAway(int flags) |
void |
keyguardWaitingForActivityDrawn() |
void |
lockDeviceNow()
Lock the device now.
|
void |
lockNow(Bundle options) |
static WindowManagerService |
main(Context context,
InputManagerService im,
boolean haveInputMethods,
boolean showBootMsgs,
boolean onlyCore) |
void |
monitor() |
void |
moveTaskToBottom(int taskId) |
void |
moveTaskToStack(int taskId,
int stackId,
boolean toTop) |
void |
moveTaskToTop(int taskId) |
void |
notifyActivityDrawnForKeyguard() |
void |
notifyAppRelaunchesCleared(IBinder token) |
void |
notifyAppRelaunching(IBinder token) |
void |
notifyAppRelaunchingFinished(IBinder token) |
void |
notifyAppResumed(IBinder token,
boolean wasStopped,
boolean allowSavedSurface) |
void |
notifyAppStopped(IBinder token) |
void |
onDisplayAdded(int displayId) |
void |
onDisplayChanged(int displayId) |
void |
onDisplayRemoved(int displayId) |
void |
onRectangleOnScreenRequested(IBinder token,
Rect rectangle) |
boolean |
onTransact(int code,
Parcel data,
Parcel reply,
int flags) |
IWindowSession |
openSession(IWindowSessionCallback callback,
IInputMethodClient client,
IInputContext inputContext) |
boolean |
outOfMemoryWindow(com.android.server.wm.Session session,
IWindow client) |
void |
overridePendingAppTransition(String packageName,
int enterAnim,
int exitAnim,
IRemoteCallback startedCallback) |
void |
overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb,
int startX,
int startY,
int targetWidth,
int targetHeight,
IRemoteCallback startedCallback,
boolean scaleUp) |
void |
overridePendingAppTransitionClipReveal(int startX,
int startY,
int startWidth,
int startHeight) |
void |
overridePendingAppTransitionInPlace(String packageName,
int anim) |
void |
overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs,
IRemoteCallback onAnimationStartedCallback,
IRemoteCallback onAnimationFinishedCallback,
boolean scaleUp) |
void |
overridePendingAppTransitionMultiThumbFuture(IAppTransitionAnimationSpecsFuture specsFuture,
IRemoteCallback callback,
boolean scaleUp) |
void |
overridePendingAppTransitionScaleUp(int startX,
int startY,
int startWidth,
int startHeight) |
void |
overridePendingAppTransitionThumb(Bitmap srcThumb,
int startX,
int startY,
IRemoteCallback startedCallback,
boolean scaleUp) |
void |
overridePlayingAppAnimationsLw(Animation a)
Overrides all currently playing app animations with .
|
void |
pauseKeyDispatching(IBinder _token) |
void |
performBootTimeout() |
void |
performDeferredDestroyWindow(com.android.server.wm.Session session,
IWindow client) |
void |
performEnableScreen() |
void |
pokeDrawLock(com.android.server.wm.Session session,
IBinder token) |
void |
positionTaskInStack(int taskId,
int stackId,
int position,
Rect bounds,
Configuration config) |
void |
prepareAppTransition(int transit,
boolean alwaysKeepCurrent) |
void |
prepareFreezingTaskBounds(int stackId) |
void |
reboot(boolean confirm) |
void |
rebootSafeMode(boolean confirm) |
void |
reenableKeyguard(IBinder token) |
void |
reevaluateStatusBarVisibility()
Ask the window manager to re-evaluate the system UI flags.
|
void |
registerDockedStackListener(IDockedStackListener listener) |
void |
registerPointerEventListener(WindowManagerPolicy.PointerEventListener listener)
Register a system listener for touch events
|
void |
registerShortcutKey(long shortcutCode,
IShortcutService shortcutKeyReceiver) |
int |
relayoutWindow(com.android.server.wm.Session session,
IWindow client,
int seq,
WindowManager.LayoutParams attrs,
int requestedWidth,
int requestedHeight,
int viewVisibility,
int flags,
Rect outFrame,
Rect outOverscanInsets,
Rect outContentInsets,
Rect outVisibleInsets,
Rect outStableInsets,
Rect outOutsets,
Rect outBackdropFrame,
Configuration outConfig,
Surface outSurface) |
void |
removeAppStartingWindow(IBinder token) |
void |
removeAppToken(IBinder token) |
void |
removeRotationWatcher(IRotationWatcher watcher) |
void |
removeStack(int stackId) |
void |
removeTask(int taskId) |
void |
removeWallpaperInputConsumer() |
void |
removeWindow(com.android.server.wm.Session session,
IWindow client) |
void |
removeWindowChangeListener(WindowManagerService.WindowChangeListener listener) |
void |
removeWindowToken(IBinder token) |
void |
requestAppKeyboardShortcuts(IResultReceiver receiver,
int deviceId) |
boolean |
requestAssistScreenshot(IAssistScreenshotReceiver receiver)
Takes a snapshot of the screen.
|
boolean |
resizeStack(int stackId,
Rect bounds,
SparseArray<Configuration> configs,
SparseArray<Rect> taskBounds,
SparseArray<Rect> taskTempInsetBounds)
Re-sizes a stack and its containing tasks.
|
void |
resizeTask(int taskId,
Rect bounds,
Configuration configuration,
boolean relayout,
boolean forced)
Re-sizes the specified task and its containing windows.
|
void |
resumeKeyDispatching(IBinder _token) |
void |
saveANRStateLocked(com.android.server.wm.AppWindowToken appWindowToken,
com.android.server.wm.WindowState windowState,
String reason)
Saves information about the state of the window manager at
the time an ANR occurred before anything else in the system changes
in response.
|
void |
scheduleClearReplacingWindowIfNeeded(IBinder token,
boolean replacing)
If we're replacing the window, schedule a timer to clear the replaced window
after a timeout, in case the replacing window is not coming.
|
Bitmap |
screenshotApplications(IBinder appToken,
int displayId,
int width,
int height,
float frameScale)
Takes a snapshot of the screen.
|
Bitmap |
screenshotWallpaper() |
void |
scrollTask(int taskId,
Rect bounds) |
void |
setAnimationScale(int which,
float scale) |
void |
setAnimationScales(float[] scales) |
void |
setAppFullscreen(IBinder token,
boolean toOpaque) |
void |
setAppOrientation(IApplicationToken token,
int requestedOrientation) |
boolean |
setAppStartingWindow(IBinder token,
String pkg,
int theme,
CompatibilityInfo compatInfo,
CharSequence nonLocalizedLabel,
int labelRes,
int icon,
int logo,
int windowFlags,
IBinder transferFrom,
boolean createIfNeeded) |
void |
setAppTask(IBinder token,
int taskId,
int stackId,
Rect taskBounds,
Configuration config,
int taskResizeMode,
boolean homeTask) |
void |
setAppVisibility(IBinder token,
boolean visible) |
void |
setCurrentProfileIds(int[] currentProfileIds) |
void |
setCurrentUser(int newUserId,
int[] currentProfileIds) |
void |
setDockedStackCreateState(int mode,
Rect bounds) |
void |
setDockedStackDividerTouchRegion(Rect touchRegion) |
void |
setDockedStackResizing(boolean resizing) |
void |
setEventDispatching(boolean enabled) |
void |
setFocusedApp(IBinder token,
boolean moveFocusNow) |
void |
setForcedDisplayDensityForUser(int displayId,
int density,
int userId) |
void |
setForcedDisplayScalingMode(int displayId,
int mode) |
void |
setForcedDisplaySize(int displayId,
int width,
int height) |
void |
setForceResizableTasks(boolean forceResizableTasks) |
void |
setInTouchMode(boolean mode) |
int[] |
setNewConfiguration(Configuration config) |
void |
setOverscan(int displayId,
int left,
int top,
int right,
int bottom) |
void |
setRecentsVisibility(boolean visible) |
void |
setReplacingWindow(IBinder token,
boolean animate)
Hint to a token that its activity will relaunch, which will trigger removal and addition of
a window.
|
void |
setReplacingWindows(IBinder token,
boolean childrenOnly)
Hint to a token that its windows will be replaced across activity relaunch.
|
void |
setResizeDimLayer(boolean visible,
int targetStackId,
float alpha) |
void |
setScreenCaptureDisabled(int userId,
boolean disabled)
Set mScreenCaptureDisabled for specific user
|
void |
setStrictModeVisualIndicatorPreference(String value) |
void |
setTaskDockedResizing(int taskId,
boolean resizing)
Puts a specific task into docked drag resizing mode.
|
void |
setTaskResizeable(int taskId,
int resizeMode) |
void |
setTvPipVisibility(boolean visible) |
void |
setWindowOpaque(IBinder token,
boolean isOpaque) |
void |
setWindowOpaqueLocked(IBinder token,
boolean isOpaque) |
void |
showBootMessage(CharSequence msg,
boolean always) |
void |
showCircularMask(boolean visible) |
void |
showEmulatorDisplayOverlay() |
void |
showEmulatorDisplayOverlayIfNeeded() |
void |
showRecentApps(boolean fromHome) |
void |
showStrictModeViolation(boolean on) |
void |
shutdown(boolean confirm) |
void |
startAppFreezingScreen(IBinder token,
int configChanges) |
void |
startFreezingScreen(int exitAnim,
int enterAnim) |
boolean |
startViewServer(int port)
Starts the view server on the specified port.
|
void |
statusBarVisibilityChanged(int visibility) |
void |
stopAppFreezingScreen(IBinder token,
boolean force) |
void |
stopFreezingScreen() |
boolean |
stopViewServer()
Stops the view server if it exists.
|
void |
subtractNonDecorInsets(Rect inOutBounds)
Intersects the specified
inOutBounds with the display frame that excludes
areas that could never be removed in Honeycomb. |
void |
subtractStableInsets(Rect inOutBounds)
Intersects the specified
inOutBounds with the display frame that excludes the stable
inset areas. |
void |
switchInputMethod(boolean forwardDirection)
Switch the input method, to be precise, input method subtype.
|
void |
systemReady() |
void |
thawRotation()
Thaw rotation changes.
|
void |
unregisterPointerEventListener(WindowManagerPolicy.PointerEventListener listener)
Unregister a system listener for touch events
|
void |
updateAppOpsState() |
Configuration |
updateOrientationFromAppTokens(Configuration currentConfig,
IBinder freezeThisOneIfNeeded) |
void |
updateRotation(boolean alwaysSendConfiguration,
boolean forceRelayout)
Recalculate the current rotation.
|
void |
updateRotationUnchecked(boolean alwaysSendConfiguration,
boolean forceRelayout) |
boolean |
updateRotationUncheckedLocked(boolean inTransaction)
Updates the current rotation.
|
void |
validateAppTokens(int stackId,
List<TaskGroup> tasks) |
void |
validateStackOrder(Integer[] remoteStackIds) |
int |
watchRotation(IRotationWatcher watcher) |
public static WindowManagerService main(Context context, InputManagerService im, boolean haveInputMethods, boolean showBootMsgs, boolean onlyCore)
public com.android.server.wm.InputMonitor getInputMonitor()
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException
RemoteException
public int addWindow(com.android.server.wm.Session session, IWindow client, int seq, WindowManager.LayoutParams attrs, int viewVisibility, int displayId, Rect outContentInsets, Rect outStableInsets, Rect outOutsets, InputChannel outInputChannel)
public void setScreenCaptureDisabled(int userId, boolean disabled)
public void removeWindow(com.android.server.wm.Session session, IWindow client)
public void updateAppOpsState()
public void getWindowDisplayFrame(com.android.server.wm.Session session, IWindow client, Rect outDisplayFrame)
public void onRectangleOnScreenRequested(IBinder token, Rect rectangle)
public IWindowId getWindowId(IBinder token)
public void pokeDrawLock(com.android.server.wm.Session session, IBinder token)
public int relayoutWindow(com.android.server.wm.Session session, IWindow client, int seq, WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, int flags, Rect outFrame, Rect outOverscanInsets, Rect outContentInsets, Rect outVisibleInsets, Rect outStableInsets, Rect outOutsets, Rect outBackdropFrame, Configuration outConfig, Surface outSurface)
public void performDeferredDestroyWindow(com.android.server.wm.Session session, IWindow client)
public boolean outOfMemoryWindow(com.android.server.wm.Session session, IWindow client)
public void finishDrawingWindow(com.android.server.wm.Session session, IWindow client)
public void validateStackOrder(Integer[] remoteStackIds)
public void addWindowToken(IBinder token, int type)
public void removeWindowToken(IBinder token)
public void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId, int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int userId, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, Rect taskBounds, Configuration config, int taskResizeMode, boolean alwaysFocusable, boolean homeTask, int targetSdkVersion, int rotationAnimationHint)
public void setAppTask(IBinder token, int taskId, int stackId, Rect taskBounds, Configuration config, int taskResizeMode, boolean homeTask)
public int getOrientationLocked()
public Configuration updateOrientationFromAppTokens(Configuration currentConfig, IBinder freezeThisOneIfNeeded)
public int[] setNewConfiguration(Configuration config)
public Rect getBoundsForNewConfiguration(int stackId)
public void setAppOrientation(IApplicationToken token, int requestedOrientation)
public int getAppOrientation(IApplicationToken token)
public void setFocusedApp(IBinder token, boolean moveFocusNow)
public void prepareAppTransition(int transit, boolean alwaysKeepCurrent)
transit
- What kind of transition is happening. Use one of the constants
AppTransition.TRANSIT_*.alwaysKeepCurrent
- If true and a transition is already set, new transition will NOT
be set.public int getPendingAppTransition()
public void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim, IRemoteCallback startedCallback)
public void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight)
public void overridePendingAppTransitionClipReveal(int startX, int startY, int startWidth, int startHeight)
public void overridePendingAppTransitionThumb(Bitmap srcThumb, int startX, int startY, IRemoteCallback startedCallback, boolean scaleUp)
public void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX, int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback, boolean scaleUp)
public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, IRemoteCallback onAnimationStartedCallback, IRemoteCallback onAnimationFinishedCallback, boolean scaleUp)
public void overridePendingAppTransitionInPlace(String packageName, int anim)
public void overridePendingAppTransitionMultiThumbFuture(IAppTransitionAnimationSpecsFuture specsFuture, IRemoteCallback callback, boolean scaleUp)
public void endProlongedAnimations()
public void executeAppTransition()
public boolean setAppStartingWindow(IBinder token, String pkg, int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded)
public void removeAppStartingWindow(IBinder token)
public void setAppFullscreen(IBinder token, boolean toOpaque)
public void setWindowOpaque(IBinder token, boolean isOpaque)
public void setWindowOpaqueLocked(IBinder token, boolean isOpaque)
public void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface)
public void notifyAppStopped(IBinder token)
public void setAppVisibility(IBinder token, boolean visible)
public void startAppFreezingScreen(IBinder token, int configChanges)
public void stopAppFreezingScreen(IBinder token, boolean force)
public void removeAppToken(IBinder token)
public void moveTaskToTop(int taskId)
public void moveTaskToBottom(int taskId)
public void setDockedStackCreateState(int mode, Rect bounds)
public Rect attachStack(int stackId, int displayId, boolean onTop)
stackId
- The unique identifier of the new stack.displayId
- The unique identifier of the DisplayContent.onTop
- If true the stack will be place at the top of the display,
else at the bottompublic void detachStack(int stackId)
public void removeStack(int stackId)
public void removeTask(int taskId)
public void cancelTaskWindowTransition(int taskId)
public void cancelTaskThumbnailTransition(int taskId)
public void addTask(int taskId, int stackId, boolean toTop)
public void moveTaskToStack(int taskId, int stackId, boolean toTop)
public void getStackDockedModeBounds(int stackId, Rect bounds, boolean ignoreVisibility)
public void getStackBounds(int stackId, Rect bounds)
WindowManagerPolicy.WindowManagerFuncs
getStackBounds
in interface WindowManagerPolicy.WindowManagerFuncs
public void overridePlayingAppAnimationsLw(Animation a)
WindowManagerPolicy.WindowManagerFuncs
overridePlayingAppAnimationsLw
in interface WindowManagerPolicy.WindowManagerFuncs
public boolean resizeStack(int stackId, Rect bounds, SparseArray<Configuration> configs, SparseArray<Rect> taskBounds, SparseArray<Rect> taskTempInsetBounds)
stackId
- Id of stack to resize.bounds
- New stack bounds. Passing in null sets the bounds to fullscreen.configs
- Configurations for tasks in the resized stack, keyed by task id.taskBounds
- Bounds for tasks in the resized stack, keyed by task id.public void prepareFreezingTaskBounds(int stackId)
public void positionTaskInStack(int taskId, int stackId, int position, Rect bounds, Configuration config)
public void resizeTask(int taskId, Rect bounds, Configuration configuration, boolean relayout, boolean forced)
Configuration
object that contains configurations settings
that should be overridden due to the operation.public void setTaskDockedResizing(int taskId, boolean resizing)
DragResizeMode
.taskId
- The id of the task to put into drag resize mode.resizing
- Whether to put the task into drag resize mode.public void scrollTask(int taskId, Rect bounds)
public void deferSurfaceLayout()
continueSurfaceLayout()
public void continueSurfaceLayout()
deferSurfaceLayout()
public void getTaskBounds(int taskId, Rect bounds)
public boolean isValidTaskId(int taskId)
public void startFreezingScreen(int exitAnim, int enterAnim)
public void stopFreezingScreen()
public void reenableKeyguard(IBinder token)
public void exitKeyguardSecurely(IOnKeyguardExitResult callback)
public boolean inKeyguardRestrictedInputMode()
public boolean isKeyguardLocked()
public boolean isKeyguardSecure()
public void dismissKeyguard()
public void keyguardGoingAway(int flags)
public void keyguardWaitingForActivityDrawn()
public void notifyActivityDrawnForKeyguard()
public void closeSystemDialogs(String reason)
public void setAnimationScale(int which, float scale)
public void setAnimationScales(float[] scales)
public float getWindowAnimationScaleLocked()
public float getTransitionAnimationScaleLocked()
public float getAnimationScale(int which)
public float[] getAnimationScales()
public float getCurrentAnimatorScale()
public void registerPointerEventListener(WindowManagerPolicy.PointerEventListener listener)
WindowManagerPolicy.WindowManagerFuncs
registerPointerEventListener
in interface WindowManagerPolicy.WindowManagerFuncs
public void unregisterPointerEventListener(WindowManagerPolicy.PointerEventListener listener)
WindowManagerPolicy.WindowManagerFuncs
unregisterPointerEventListener
in interface WindowManagerPolicy.WindowManagerFuncs
public int getLidState()
WindowManagerPolicy.WindowManagerFuncs
getLidState
in interface WindowManagerPolicy.WindowManagerFuncs
public void lockDeviceNow()
WindowManagerPolicy.WindowManagerFuncs
lockDeviceNow
in interface WindowManagerPolicy.WindowManagerFuncs
public int getCameraLensCoverState()
WindowManagerPolicy.WindowManagerFuncs
getCameraLensCoverState
in interface WindowManagerPolicy.WindowManagerFuncs
public void switchInputMethod(boolean forwardDirection)
WindowManagerPolicy.WindowManagerFuncs
switchInputMethod
in interface WindowManagerPolicy.WindowManagerFuncs
forwardDirection
- true
to rotate in a forward direction.public void shutdown(boolean confirm)
shutdown
in interface WindowManagerPolicy.WindowManagerFuncs
public void reboot(boolean confirm)
reboot
in interface WindowManagerPolicy.WindowManagerFuncs
public void rebootSafeMode(boolean confirm)
rebootSafeMode
in interface WindowManagerPolicy.WindowManagerFuncs
public void setCurrentProfileIds(int[] currentProfileIds)
public void setCurrentUser(int newUserId, int[] currentProfileIds)
public void enableScreenAfterBoot()
public void enableScreenIfNeeded()
public void performBootTimeout()
public void performEnableScreen()
public void showBootMessage(CharSequence msg, boolean always)
public void hideBootMessagesLocked()
public void setInTouchMode(boolean mode)
public void showEmulatorDisplayOverlayIfNeeded()
public void showCircularMask(boolean visible)
public void showEmulatorDisplayOverlay()
public void showStrictModeViolation(boolean on)
public void setStrictModeVisualIndicatorPreference(String value)
public Bitmap screenshotWallpaper()
public boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver)
public Bitmap screenshotApplications(IBinder appToken, int displayId, int width, int height, float frameScale)
displayId
- the Display to take a screenshot of.width
- the width of the target bitmapheight
- the height of the target bitmapframeScale
- the scale to apply to the frame, only used when width = -1 and height = -1public void freezeRotation(int rotation)
rotation
- The desired rotation to freeze to, or -1 to use the
current rotation.public void thawRotation()
public void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout)
public void updateRotationUnchecked(boolean alwaysSendConfiguration, boolean forceRelayout)
public boolean updateRotationUncheckedLocked(boolean inTransaction)
public int getRotation()
public boolean isRotationFrozen()
public int watchRotation(IRotationWatcher watcher)
public void removeRotationWatcher(IRotationWatcher watcher)
public int getPreferredOptionsPanelGravity()
Gravity
value for placing the options menu windowpublic boolean startViewServer(int port)
port
- The port to listener to.ViewServer
,
ViewServer.VIEW_SERVER_DEFAULT_PORT
public boolean stopViewServer()
ViewServer
public boolean isViewServerRunning()
ViewServer
public void addWindowChangeListener(WindowManagerService.WindowChangeListener listener)
public void removeWindowChangeListener(WindowManagerService.WindowChangeListener listener)
public Configuration computeNewConfiguration()
public void pauseKeyDispatching(IBinder _token)
public void resumeKeyDispatching(IBinder _token)
public void setEventDispatching(boolean enabled)
public boolean detectSafeMode()
public void displayReady()
public void systemReady()
public IWindowSession openSession(IWindowSessionCallback callback, IInputMethodClient client, IInputContext inputContext)
public boolean inputMethodClientHasFocus(IInputMethodClient client)
public void getInitialDisplaySize(int displayId, Point size)
public void getBaseDisplaySize(int displayId, Point size)
public void setForcedDisplaySize(int displayId, int width, int height)
public void setForcedDisplayScalingMode(int displayId, int mode)
public void clearForcedDisplaySize(int displayId)
public int getInitialDisplayDensity(int displayId)
public int getBaseDisplayDensity(int displayId)
public void setForcedDisplayDensityForUser(int displayId, int density, int userId)
public void clearForcedDisplayDensityForUser(int displayId, int userId)
public void setOverscan(int displayId, int left, int top, int right, int bottom)
public void setRecentsVisibility(boolean visible)
public void setTvPipVisibility(boolean visible)
public void statusBarVisibilityChanged(int visibility)
public void reevaluateStatusBarVisibility()
WindowManagerPolicy.WindowManagerFuncs
reevaluateStatusBarVisibility
in interface WindowManagerPolicy.WindowManagerFuncs
public WindowManagerPolicy.InputConsumer addInputConsumer(Looper looper, InputEventReceiver.Factory inputEventReceiverFactory)
WindowManagerPolicy.WindowManagerFuncs
addInputConsumer
in interface WindowManagerPolicy.WindowManagerFuncs
public void createWallpaperInputConsumer(InputChannel inputChannel)
public void removeWallpaperInputConsumer()
public boolean hasNavigationBar()
public void lockNow(Bundle options)
public void showRecentApps(boolean fromHome)
public boolean isSafeModeEnabled()
public boolean clearWindowContentFrameStats(IBinder token)
public WindowContentFrameStats getWindowContentFrameStats(IBinder token)
public void notifyAppRelaunching(IBinder token)
public void notifyAppRelaunchingFinished(IBinder token)
public void notifyAppRelaunchesCleared(IBinder token)
public int getDockedDividerInsetsLw()
getDockedDividerInsetsLw
in interface WindowManagerPolicy.WindowManagerFuncs
public void saveANRStateLocked(com.android.server.wm.AppWindowToken appWindowToken, com.android.server.wm.WindowState windowState, String reason)
appWindowToken
- The application that ANR'd, may be null.windowState
- The window that ANR'd, may be null.reason
- The reason for the ANR, may be null.public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
public void monitor()
monitor
in interface Watchdog.Monitor
public void createDisplayContentLocked(Display display)
public com.android.server.wm.DisplayContent getDisplayContentLocked(int displayId)
displayId
- The display the caller is interested in.public com.android.server.wm.DisplayContent getDefaultDisplayContentLocked()
public com.android.server.wm.WindowList getDefaultWindowListLocked()
public DisplayInfo getDefaultDisplayInfoLocked()
public com.android.server.wm.WindowList getWindowListLocked(Display display)
display
- The screen to return windows from.public com.android.server.wm.WindowList getWindowListLocked(int displayId)
displayId
- The screen to return windows from.public void onDisplayAdded(int displayId)
public void handleDisplayAdded(int displayId)
public void onDisplayRemoved(int displayId)
public void onDisplayChanged(int displayId)
public Object getWindowManagerLock()
WindowManagerPolicy.WindowManagerFuncs
getWindowManagerLock
in interface WindowManagerPolicy.WindowManagerFuncs
public void setReplacingWindow(IBinder token, boolean animate)
token
- Application token for which the activity will be relaunched.public void setReplacingWindows(IBinder token, boolean childrenOnly)
token
- Application token for which the activity will be relaunched.childrenOnly
- Whether to mark only child windows for replacement
(for the case where main windows are being preserved/
reused rather than replaced).public void scheduleClearReplacingWindowIfNeeded(IBinder token, boolean replacing)
token
- Application token for the activity whose window might be replaced.replacing
- Whether the window is being replaced or not.public int getDockedStackSide()
public void setDockedStackResizing(boolean resizing)
public void setDockedStackDividerTouchRegion(Rect touchRegion)
public void setResizeDimLayer(boolean visible, int targetStackId, float alpha)
public void animateResizePinnedStack(Rect bounds, int animationDuration)
public void setTaskResizeable(int taskId, int resizeMode)
public void setForceResizableTasks(boolean forceResizableTasks)
public void registerDockedStackListener(IDockedStackListener listener)
public void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId)
public void getStableInsets(Rect outInsets) throws RemoteException
RemoteException
public void subtractStableInsets(Rect inOutBounds)
inOutBounds
with the display frame that excludes the stable
inset areas.inOutBounds
- The inOutBounds to subtract the stable inset areas from.public void subtractNonDecorInsets(Rect inOutBounds)
inOutBounds
with the display frame that excludes
areas that could never be removed in Honeycomb. See
WindowManagerPolicy.getNonDecorInsetsLw(int, int, int, android.graphics.Rect)
.inOutBounds
- The inOutBounds to subtract the inset areas from.public int getSmallestWidthForTaskBounds(Rect bounds)
public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver) throws RemoteException
RemoteException