blob: 131fe1395585160f9384a00cf78a0fb703524d27 [file] [log] [blame]
Dianne Hackborn7da6ac32010-12-09 19:22:04 -08001/*
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08002** Copyright 2006, The Android Open Source Project
3**
Jim Miller4eeb4f62012-11-08 00:04:29 -08004** Licensed under the Apache License, Version 2.0 (the "License");
5** you may not use this file except in compliance with the License.
6** You may obtain a copy of the License at
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08007**
Jim Miller4eeb4f62012-11-08 00:04:29 -08008** http://www.apache.org/licenses/LICENSE-2.0
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08009**
Jim Miller4eeb4f62012-11-08 00:04:29 -080010** Unless required by applicable law or agreed to in writing, software
11** distributed under the License is distributed on an "AS IS" BASIS,
12** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13** See the License for the specific language governing permissions and
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080014** limitations under the License.
15*/
16
17package android.view;
18
Clara Bayarri75e09792015-07-29 16:20:40 +010019import com.android.internal.os.IResultReceiver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080020import com.android.internal.view.IInputContext;
21import com.android.internal.view.IInputMethodClient;
Jorim Jaggi241ae102016-11-02 21:57:33 -070022import com.android.internal.policy.IKeyguardDismissCallback;
Muyuan Li94ce94e2016-02-24 16:20:54 -080023import com.android.internal.policy.IShortcutService;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080024
Winson Chunge2104682017-11-08 17:31:14 -080025import android.app.IAssistDataReceiver;
Dianne Hackborn2f0b1752011-05-31 17:59:49 -070026import android.content.res.CompatibilityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027import android.content.res.Configuration;
Dianne Hackborn0aae2d42010-12-07 23:51:29 -080028import android.graphics.Bitmap;
Winson Chunga31922f2017-05-24 15:50:06 -070029import android.graphics.GraphicBuffer;
Dianne Hackbornac8dea12011-04-20 18:18:51 -070030import android.graphics.Point;
Svetoslav Ganovc9c9a482012-07-16 08:46:07 -070031import android.graphics.Rect;
Albert Chaulk56162a02017-06-05 19:35:23 -040032import android.graphics.Region;
Adam Cohenf7522022012-10-03 20:03:18 -070033import android.os.Bundle;
Dianne Hackborn38e29a62011-09-18 14:43:08 -070034import android.os.IRemoteCallback;
Robert Carr3b716242016-08-16 16:02:21 -070035import android.os.ParcelFileDescriptor;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036import android.view.IApplicationToken;
Jorim Jaggi2f7d2922015-10-29 13:08:29 +010037import android.view.IAppTransitionAnimationSpecsFuture;
Jorim Jaggia6c934e2015-12-21 13:22:31 +010038import android.view.IDockedStackListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.view.IOnKeyguardExitResult;
Winson Chung655332c2016-10-31 13:14:28 -070040import android.view.IPinnedStackListener;
Jorim Jaggi33a701a2017-12-01 14:58:18 +010041import android.view.RemoteAnimationAdapter;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042import android.view.IRotationWatcher;
Lucas Dupine1571702017-05-24 14:14:44 -070043import android.view.IWallpaperVisibilityListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044import android.view.IWindowSession;
Dianne Hackborneb94fa72014-06-03 17:48:12 -070045import android.view.IWindowSessionCallback;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080046import android.view.KeyEvent;
Jeff Brown6ec402b2010-07-28 15:48:59 -070047import android.view.InputEvent;
Svetoslav Ganov152e9bb2012-10-12 20:15:29 -070048import android.view.MagnificationSpec;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049import android.view.MotionEvent;
Jeff Browna41ca772010-08-11 14:46:32 -070050import android.view.InputChannel;
Jeff Brown8d608662010-08-30 03:02:23 -070051import android.view.InputDevice;
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -070052import android.view.IInputFilter;
Filip Gruszczynski170192a2015-08-16 17:46:34 -070053import android.view.AppTransitionAnimationSpec;
Svetoslav1376d602014-03-13 11:17:26 -070054import android.view.WindowContentFrameStats;
Jorim Jaggie2c77f92016-12-29 14:57:22 +010055import android.view.WindowManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056
57/**
58 * System private interface to the window manager.
59 *
60 * {@hide}
61 */
62interface IWindowManager
63{
64 /**
65 * ===== NOTICE =====
66 * The first three methods must remain the first three methods. Scripts
67 * and tools rely on their transaction number to work properly.
68 */
69 // This is used for debugging
70 boolean startViewServer(int port); // Transaction #1
71 boolean stopViewServer(); // Transaction #2
72 boolean isViewServerRunning(); // Transaction #3
73
Dianne Hackborneb94fa72014-06-03 17:48:12 -070074 IWindowSession openSession(in IWindowSessionCallback callback, in IInputMethodClient client,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080075 in IInputContext inputContext);
76 boolean inputMethodClientHasFocus(IInputMethodClient client);
Dianne Hackbornac8dea12011-04-20 18:18:51 -070077
Dianne Hackborn672cf452013-03-26 15:24:24 -070078 void getInitialDisplaySize(int displayId, out Point size);
79 void getBaseDisplaySize(int displayId, out Point size);
Jeff Brown43aa1592012-09-10 17:36:31 -070080 void setForcedDisplaySize(int displayId, int width, int height);
Craig Mautner59c00972012-07-30 12:10:24 -070081 void clearForcedDisplaySize(int displayId);
Dianne Hackborn672cf452013-03-26 15:24:24 -070082 int getInitialDisplayDensity(int displayId);
83 int getBaseDisplayDensity(int displayId);
Alan Viverettedf3a7ca2016-09-06 17:13:41 -040084 void setForcedDisplayDensityForUser(int displayId, int density, int userId);
85 void clearForcedDisplayDensityForUser(int displayId, int userId);
Jeff Brownd46747a2015-04-15 19:02:36 -070086 void setForcedDisplayScalingMode(int displayId, int mode); // 0 = auto, 1 = disable
Dianne Hackborn7916ac62011-05-16 20:45:48 -070087
Dianne Hackbornc652de82013-02-15 16:32:56 -080088 void setOverscan(int displayId, int left, int top, int right, int bottom);
89
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080090 // These can only be called when holding the MANAGE_APP_TOKENS permission.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080091 void setEventDispatching(boolean enabled);
Wale Ogunwaleac2561e2016-11-01 15:43:46 -070092 void addWindowToken(IBinder token, int type, int displayId);
93 void removeWindowToken(IBinder token, int displayId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080094 void setFocusedApp(IBinder token, boolean moveFocusNow);
Dianne Hackborn7da6ac32010-12-09 19:22:04 -080095 void prepareAppTransition(int transit, boolean alwaysKeepCurrent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080096 int getPendingAppTransition();
Dianne Hackborn84375872012-06-01 19:03:50 -070097 void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim,
98 IRemoteCallback startedCallback);
Dianne Hackborneabfb3a2012-04-16 16:28:22 -070099 void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth,
100 int startHeight);
Chet Haase10e23ab2015-02-11 15:08:38 -0800101 void overridePendingAppTransitionClipReveal(int startX, int startY,
102 int startWidth, int startHeight);
Winson Chunga31922f2017-05-24 15:50:06 -0700103 void overridePendingAppTransitionThumb(in GraphicBuffer srcThumb, int startX, int startY,
Michael Jurka832cb222012-04-13 09:32:47 -0700104 IRemoteCallback startedCallback, boolean scaleUp);
Winson Chunga31922f2017-05-24 15:50:06 -0700105 void overridePendingAppTransitionAspectScaledThumb(in GraphicBuffer srcThumb, int startX,
Winson Chung2e7f3bd2014-09-05 13:17:22 +0200106 int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
107 boolean scaleUp);
Filip Gruszczynski170192a2015-08-16 17:46:34 -0700108 /**
109 * Overrides animation for app transition that exits from an application to a multi-window
110 * environment and allows specifying transition animation parameters for each window.
111 *
112 * @param specs Array of transition animation descriptions for entering windows.
113 *
114 * @hide
115 */
116 void overridePendingAppTransitionMultiThumb(in AppTransitionAnimationSpec[] specs,
Filip Gruszczynski1a5203d2015-10-29 17:43:49 -0700117 IRemoteCallback startedCallback, IRemoteCallback finishedCallback, boolean scaleUp);
Winson Chung044d5292014-11-06 11:05:19 -0800118 void overridePendingAppTransitionInPlace(String packageName, int anim);
Jorim Jaggi2f7d2922015-10-29 13:08:29 +0100119
120 /**
121 * Like overridePendingAppTransitionMultiThumb, but uses a future to supply the specs. This is
122 * used for recents, where generating the thumbnails of the specs takes a non-trivial amount of
123 * time, so we want to move that off the critical path for starting the new activity.
124 */
125 void overridePendingAppTransitionMultiThumbFuture(
126 IAppTransitionAnimationSpecsFuture specsFuture, IRemoteCallback startedCallback,
127 boolean scaleUp);
Jorim Jaggi33a701a2017-12-01 14:58:18 +0100128 void overridePendingAppTransitionRemote(in RemoteAnimationAdapter remoteAnimationAdapter);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800129 void executeAppTransition();
Wale Ogunwale3b232392016-05-13 15:37:13 -0700130
Jorim Jaggi66b48df2018-04-20 16:23:48 +0200131 /**
132 * Used by system ui to report that recents has shown itself.
133 * @deprecated to be removed once prebuilts are updated
134 */
Filip Gruszczynski14b4e572015-11-03 15:53:55 -0800135 void endProlongedAnimations();
136
Dianne Hackborne36d6e22010-02-17 19:46:25 -0800137 // Re-evaluate the current orientation from the caller's state.
138 // If there is a change, the new Configuration is returned and the
139 // caller must call setNewConfiguration() sometime later.
140 Configuration updateOrientationFromAppTokens(in Configuration currentConfig,
Andrii Kulian5406e7a2016-10-21 11:55:23 -0700141 IBinder freezeThisOneIfNeeded, int displayId);
142 // Notify window manager of the new display override configuration. Returns an array of stack
143 // ids that were affected by the update, ActivityManager should resize these stacks.
144 int[] setNewDisplayOverrideConfiguration(in Configuration overrideConfig, int displayId);
Chong Zhang167bbfac2016-03-31 09:44:34 -0700145
Dianne Hackborn9d9ece32012-09-10 15:33:52 -0700146 void startFreezingScreen(int exitAnim, int enterAnim);
147 void stopFreezingScreen();
148
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800149 // these require DISABLE_KEYGUARD permission
150 void disableKeyguard(IBinder token, String tag);
151 void reenableKeyguard(IBinder token);
152 void exitKeyguardSecurely(IOnKeyguardExitResult callback);
Mike Lockwood520d8bc2011-02-18 13:23:13 -0500153 boolean isKeyguardLocked();
154 boolean isKeyguardSecure();
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800155 void dismissKeyguard(IKeyguardDismissCallback callback, CharSequence message);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800156
Evan Rosky18396452016-07-27 15:19:37 -0700157 // Requires INTERACT_ACROSS_USERS_FULL permission
158 void setSwitchingUser(boolean switching);
159
Dianne Hackbornffa42482009-09-23 22:20:11 -0700160 void closeSystemDialogs(String reason);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800161
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800162 // These can only be called with the SET_ANIMATON_SCALE permission.
163 float getAnimationScale(int which);
164 float[] getAnimationScales();
165 void setAnimationScale(int which, float scale);
166 void setAnimationScales(in float[] scales);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800167
Dianne Hackborneb94fa72014-06-03 17:48:12 -0700168 float getCurrentAnimatorScale();
169
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800170 // For testing
171 void setInTouchMode(boolean showFocus);
Brad Fitzpatrick68044332010-11-22 18:19:48 -0800172
173 // For StrictMode flashing a red border on violations from the UI
174 // thread. The uid/pid is implicit from the Binder call, and the Window
175 // Manager uses that to determine whether or not the red border should
176 // actually be shown. (it will be ignored that pid doesn't have windows
177 // on screen)
178 void showStrictModeViolation(boolean on);
179
Brad Fitzpatrickc1a968a2010-11-24 08:56:40 -0800180 // Proxy to set the system property for whether the flashing
181 // should be enabled. The 'enabled' value is null or blank for
182 // the system default (differs per build variant) or any valid
183 // boolean string as parsed by SystemProperties.getBoolean().
184 void setStrictModeVisualIndicatorPreference(String enabled);
185
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100186 /**
Makoto Onuki04ef4472018-03-12 17:29:49 -0700187 * Set whether screen capture is disabled for all windows of a specific user from
188 * the device policy cache.
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100189 */
Makoto Onuki04ef4472018-03-12 17:29:49 -0700190 void refreshScreenCaptureDisabled(int userId);
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100191
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800192 // These can only be called with the SET_ORIENTATION permission.
193 /**
Jeff Brown01a98dd2011-09-20 15:08:29 -0700194 * Update the current screen rotation based on the current state of
195 * the world.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800196 * @param alwaysSendConfiguration Flag to force a new configuration to
197 * be evaluated. This can be used when there are other parameters in
198 * configuration that are changing.
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700199 * @param forceRelayout If true, the window manager will always do a relayout
200 * of its windows even if the rotation hasn't changed.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800201 */
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700202 void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800203
204 /**
Andrii Kulian8ee72852017-03-10 10:36:45 -0800205 * Retrieve the current orientation of the primary screen.
206 * @return Constant as per {@link android.view.Surface.Rotation}.
207 *
208 * @see android.view.Display#DEFAULT_DISPLAY
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800209 */
Andrii Kulian8ee72852017-03-10 10:36:45 -0800210 int getDefaultDisplayRotation();
Jim Miller4eeb4f62012-11-08 00:04:29 -0800211
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800212 /**
Andrii Kulian35fa3c22017-03-11 09:37:28 -0800213 * Watch the rotation of the specified screen. Returns the current rotation,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800214 * calls back when it changes.
215 */
Andrii Kulian35fa3c22017-03-11 09:37:28 -0800216 int watchRotation(IRotationWatcher watcher, int displayId);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400217
Adam Powelldfee59a2011-08-05 20:48:30 -0700218 /**
Brian Colonnab1b9a8a2013-03-29 11:52:42 -0400219 * Remove a rotation watcher set using watchRotation.
220 * @hide
221 */
222 void removeRotationWatcher(IRotationWatcher watcher);
223
224 /**
Adam Powelldfee59a2011-08-05 20:48:30 -0700225 * Determine the preferred edge of the screen to pin the compact options menu against.
226 * @return a Gravity value for the options menu panel
227 * @hide
228 */
229 int getPreferredOptionsPanelGravity();
230
Jim Miller4eeb4f62012-11-08 00:04:29 -0800231 /**
232 * Lock the device orientation to the specified rotation, or to the
233 * current rotation if -1. Sensor input will be ignored until
234 * thawRotation() is called.
235 * @hide
236 */
237 void freezeRotation(int rotation);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400238
Jim Miller4eeb4f62012-11-08 00:04:29 -0800239 /**
240 * Release the orientation lock imposed by freezeRotation().
241 * @hide
242 */
243 void thawRotation();
Dianne Hackborn0aae2d42010-12-07 23:51:29 -0800244
Jim Miller4eeb4f62012-11-08 00:04:29 -0800245 /**
Svetoslav8e3feb12014-02-24 13:46:47 -0800246 * Gets whether the rotation is frozen.
Svetoslav Ganov80943d82013-01-02 10:25:37 -0800247 *
248 * @return Whether the rotation is frozen.
249 */
250 boolean isRotationFrozen();
251
252 /**
Zak Cohen3683fb12016-07-11 19:47:37 +0100253 * Screenshot the current wallpaper layer, including the whole screen.
254 */
255 Bitmap screenshotWallpaper();
256
257 /**
Lucas Dupine1571702017-05-24 14:14:44 -0700258 * Registers a wallpaper visibility listener.
259 * @return Current visibility.
260 */
261 boolean registerWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
262 int displayId);
263
264 /**
265 * Remove a visibility watcher that was added using registerWallpaperVisibilityListener.
266 */
267 void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
268 int displayId);
269
270 /**
Dianne Hackborn27eac1d2015-03-16 17:15:53 -0700271 * Used only for assist -- request a screenshot of the current application.
272 */
Winson Chungda2818f2017-10-23 16:25:49 -0700273 boolean requestAssistScreenshot(IAssistDataReceiver receiver);
Dianne Hackborn27eac1d2015-03-16 17:15:53 -0700274
275 /**
Joe Onorato664644d2011-01-23 17:53:23 -0800276 * Called by the status bar to notify Views of changes to System UI visiblity.
277 */
John Spurlocke7c28572013-10-29 14:23:51 -0400278 oneway void statusBarVisibilityChanged(int visibility);
Jeff Brown1a84fd12011-06-02 01:26:32 -0700279
280 /**
Winsonab216602016-08-09 14:05:20 -0700281 * Called by System UI to notify of changes to the visibility of Recents.
282 */
283 oneway void setRecentsVisibility(boolean visible);
284
285 /**
286 * Called by System UI to notify of changes to the visibility of PIP.
287 */
Winson Chungac52f282017-03-30 14:44:52 -0700288 oneway void setPipVisibility(boolean visible);
Winsonab216602016-08-09 14:05:20 -0700289
Tracy Zhou43513082018-03-08 21:58:36 -0800290 /**
291 * Called by System UI to notify of changes to the visibility and height of the shelf.
292 */
293 void setShelfHeight(boolean visible, int shelfHeight);
294
295 /**
Matthew Ng64543e62018-02-28 17:35:10 -0800296 * Called by System UI to enable or disable haptic feedback on the navigation bar buttons.
297 */
298 void setNavBarVirtualKeyHapticFeedbackEnabled(boolean enabled);
299
Winsonab216602016-08-09 14:05:20 -0700300 /**
Daniel Sandler0c4ccff2011-10-19 16:39:14 -0400301 * Device has a software navigation bar (separate from the status bar).
302 */
303 boolean hasNavigationBar();
Jim Miller93c518e2012-01-17 15:55:31 -0800304
305 /**
Tracy Zhou43513082018-03-08 21:58:36 -0800306 * Get the position of the nav bar
307 */
Matthew Nga8f24262017-12-19 11:54:24 -0800308 int getNavBarPosition();
309
310 /**
Adam Cohenf7522022012-10-03 20:03:18 -0700311 * Lock the device immediately with the specified options (can be null).
Jim Miller93c518e2012-01-17 15:55:31 -0800312 */
Adam Cohenf7522022012-10-03 20:03:18 -0700313 void lockNow(in Bundle options);
Svetoslav Ganovc9c9a482012-07-16 08:46:07 -0700314
315 /**
Jim Millerbfec0a82012-11-05 20:05:22 -0800316 * Device is in safe mode.
317 */
318 boolean isSafeModeEnabled();
Jorim Jaggicff0acb2014-03-31 16:35:15 +0200319
320 /**
321 * Enables the screen if all conditions are met.
322 */
323 void enableScreenIfNeeded();
Svetoslavdd137a82014-04-10 12:48:07 -0700324
325 /**
Svetoslav1376d602014-03-13 11:17:26 -0700326 * Clears the frame statistics for a given window.
327 *
328 * @param token The window token.
329 * @return Whether the frame statistics were cleared.
330 */
331 boolean clearWindowContentFrameStats(IBinder token);
332
333 /**
334 * Gets the content frame statistics for a given window.
335 *
336 * @param token The window token.
337 * @return The frame statistics or null if the window does not exist.
338 */
339 WindowContentFrameStats getWindowContentFrameStats(IBinder token);
Jorim Jaggi61f39a72015-10-29 16:54:18 +0100340
341 /**
342 * @return the dock side the current docked stack is at; must be one of the
343 * WindowManagerGlobal.DOCKED_* values
344 */
345 int getDockedStackSide();
346
347 /**
Jorim Jaggid47e7e12016-03-01 09:57:38 +0100348 * Sets the region the user can touch the divider. This region will be excluded from the region
349 * which is used to cause a focus switch when dispatching touch.
350 */
351 void setDockedStackDividerTouchRegion(in Rect touchableRegion);
352
353 /**
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100354 * Registers a listener that will be called when the dock divider changes its visibility or when
355 * the docked stack gets added/removed.
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800356 */
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100357 void registerDockedStackListener(IDockedStackListener listener);
Jorim Jaggi50981592015-12-29 17:54:12 +0100358
359 /**
Winson Chung655332c2016-10-31 13:14:28 -0700360 * Registers a listener that will be called when the pinned stack state changes.
361 */
362 void registerPinnedStackListener(int displayId, IPinnedStackListener listener);
363
364 /**
Jorim Jaggi50981592015-12-29 17:54:12 +0100365 * Updates the dim layer used while resizing.
366 *
367 * @param visible Whether the dim layer should be visible.
Wale Ogunwale68278562017-09-23 17:13:55 -0700368 * @param targetWindowingMode The windowing mode of the stack the dim layer should be placed on.
Jorim Jaggi50981592015-12-29 17:54:12 +0100369 * @param alpha The translucency of the dim layer, between 0 and 1.
370 */
Wale Ogunwale68278562017-09-23 17:13:55 -0700371 void setResizeDimLayer(boolean visible, int targetWindowingMode, float alpha);
Clara Bayarri75e09792015-07-29 16:20:40 +0100372
373 /**
374 * Requests Keyboard Shortcuts from the displayed window.
375 *
376 * @param receiver The receiver to deliver the results to.
377 */
Clara Bayarrifcd7e802016-03-10 12:58:18 +0000378 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId);
Jorim Jaggic6c89a82016-01-28 17:48:21 -0800379
380 /**
381 * Retrieves the current stable insets from the primary display.
382 */
Winson Chung303c6b72016-10-24 17:12:49 -0700383 void getStableInsets(int displayId, out Rect outInsets);
Muyuan Li94ce94e2016-02-24 16:20:54 -0800384
385 /**
386 * Register shortcut key. Shortcut code is packed as:
387 * (MetaState << Integer.SIZE) | KeyCode
388 * @hide
389 */
390 void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber);
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700391
392 /**
Winson41275482016-10-10 15:17:45 -0700393 * Create an input consumer by name.
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700394 */
Winson Chung6463c362017-09-25 16:23:26 -0700395 void createInputConsumer(IBinder token, String name, out InputChannel inputChannel);
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700396
397 /**
Winson41275482016-10-10 15:17:45 -0700398 * Destroy an input consumer by name. This method will also dispose the input channels
399 * associated with that InputConsumer.
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700400 */
Winson41275482016-10-10 15:17:45 -0700401 boolean destroyInputConsumer(String name);
Albert Chaulk56162a02017-06-05 19:35:23 -0400402
403 /**
404 * Return the touch region for the current IME window, or an empty region if there is none.
405 */
406 Region getCurrentImeTouchRegion();
Vishnu Nairc9615042018-01-09 07:23:31 -0800407
408 /**
409 * Starts a window trace.
410 */
411 void startWindowTrace();
412
413 /**
414 * Stops a window trace.
415 */
416 void stopWindowTrace();
417
418 /**
419 * Returns true if window trace is enabled.
420 */
421 boolean isWindowTraceEnabled();
Yoshiaki Nakae1bdfc822017-09-15 15:24:34 +0900422
423 /**
424 * Requests that the WindowManager sends WindowManagerPolicy#ACTION_USER_ACTIVITY_NOTIFICATION
425 * on the next user activity.
426 */
427 void requestUserActivityNotification();
Andrii Kulianf0379de2018-03-14 16:24:07 -0700428
429 /**
430 * Notify WindowManager that it should not override the info in DisplayManager for the specified
431 * display. This can disable letter- or pillar-boxing applied in DisplayManager when the metrics
432 * of the logical display reported from WindowManager do not correspond to the metrics of the
433 * physical display it is based on.
434 *
435 * @param displayId The id of the display.
436 */
437 void dontOverrideDisplayInfo(int displayId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800438}