blob: 8c7032207c3477df0414df207e56f619a89bbcda [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;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080041import android.view.IRotationWatcher;
Lucas Dupine1571702017-05-24 14:14:44 -070042import android.view.IWallpaperVisibilityListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080043import android.view.IWindowSession;
Dianne Hackborneb94fa72014-06-03 17:48:12 -070044import android.view.IWindowSessionCallback;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045import android.view.KeyEvent;
Jeff Brown6ec402b2010-07-28 15:48:59 -070046import android.view.InputEvent;
Svetoslav Ganov152e9bb2012-10-12 20:15:29 -070047import android.view.MagnificationSpec;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048import android.view.MotionEvent;
Jeff Browna41ca772010-08-11 14:46:32 -070049import android.view.InputChannel;
Jeff Brown8d608662010-08-30 03:02:23 -070050import android.view.InputDevice;
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -070051import android.view.IInputFilter;
Filip Gruszczynski170192a2015-08-16 17:46:34 -070052import android.view.AppTransitionAnimationSpec;
Svetoslav1376d602014-03-13 11:17:26 -070053import android.view.WindowContentFrameStats;
Jorim Jaggie2c77f92016-12-29 14:57:22 +010054import android.view.WindowManager;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055
56/**
57 * System private interface to the window manager.
58 *
59 * {@hide}
60 */
61interface IWindowManager
62{
63 /**
64 * ===== NOTICE =====
65 * The first three methods must remain the first three methods. Scripts
66 * and tools rely on their transaction number to work properly.
67 */
68 // This is used for debugging
69 boolean startViewServer(int port); // Transaction #1
70 boolean stopViewServer(); // Transaction #2
71 boolean isViewServerRunning(); // Transaction #3
72
Dianne Hackborneb94fa72014-06-03 17:48:12 -070073 IWindowSession openSession(in IWindowSessionCallback callback, in IInputMethodClient client,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080074 in IInputContext inputContext);
75 boolean inputMethodClientHasFocus(IInputMethodClient client);
Dianne Hackbornac8dea12011-04-20 18:18:51 -070076
Dianne Hackborn672cf452013-03-26 15:24:24 -070077 void getInitialDisplaySize(int displayId, out Point size);
78 void getBaseDisplaySize(int displayId, out Point size);
Jeff Brown43aa1592012-09-10 17:36:31 -070079 void setForcedDisplaySize(int displayId, int width, int height);
Craig Mautner59c00972012-07-30 12:10:24 -070080 void clearForcedDisplaySize(int displayId);
Dianne Hackborn672cf452013-03-26 15:24:24 -070081 int getInitialDisplayDensity(int displayId);
82 int getBaseDisplayDensity(int displayId);
Alan Viverettedf3a7ca2016-09-06 17:13:41 -040083 void setForcedDisplayDensityForUser(int displayId, int density, int userId);
84 void clearForcedDisplayDensityForUser(int displayId, int userId);
Jeff Brownd46747a2015-04-15 19:02:36 -070085 void setForcedDisplayScalingMode(int displayId, int mode); // 0 = auto, 1 = disable
Dianne Hackborn7916ac62011-05-16 20:45:48 -070086
Dianne Hackbornc652de82013-02-15 16:32:56 -080087 void setOverscan(int displayId, int left, int top, int right, int bottom);
88
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080089 // These can only be called when holding the MANAGE_APP_TOKENS permission.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080090 void setEventDispatching(boolean enabled);
Wale Ogunwaleac2561e2016-11-01 15:43:46 -070091 void addWindowToken(IBinder token, int type, int displayId);
92 void removeWindowToken(IBinder token, int displayId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080093 void setFocusedApp(IBinder token, boolean moveFocusNow);
Dianne Hackborn7da6ac32010-12-09 19:22:04 -080094 void prepareAppTransition(int transit, boolean alwaysKeepCurrent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080095 int getPendingAppTransition();
Dianne Hackborn84375872012-06-01 19:03:50 -070096 void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim,
97 IRemoteCallback startedCallback);
Dianne Hackborneabfb3a2012-04-16 16:28:22 -070098 void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth,
99 int startHeight);
Chet Haase10e23ab2015-02-11 15:08:38 -0800100 void overridePendingAppTransitionClipReveal(int startX, int startY,
101 int startWidth, int startHeight);
Winson Chunga31922f2017-05-24 15:50:06 -0700102 void overridePendingAppTransitionThumb(in GraphicBuffer srcThumb, int startX, int startY,
Michael Jurka832cb222012-04-13 09:32:47 -0700103 IRemoteCallback startedCallback, boolean scaleUp);
Winson Chunga31922f2017-05-24 15:50:06 -0700104 void overridePendingAppTransitionAspectScaledThumb(in GraphicBuffer srcThumb, int startX,
Winson Chung2e7f3bd2014-09-05 13:17:22 +0200105 int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
106 boolean scaleUp);
Filip Gruszczynski170192a2015-08-16 17:46:34 -0700107 /**
108 * Overrides animation for app transition that exits from an application to a multi-window
109 * environment and allows specifying transition animation parameters for each window.
110 *
111 * @param specs Array of transition animation descriptions for entering windows.
112 *
113 * @hide
114 */
115 void overridePendingAppTransitionMultiThumb(in AppTransitionAnimationSpec[] specs,
Filip Gruszczynski1a5203d2015-10-29 17:43:49 -0700116 IRemoteCallback startedCallback, IRemoteCallback finishedCallback, boolean scaleUp);
Winson Chung044d5292014-11-06 11:05:19 -0800117 void overridePendingAppTransitionInPlace(String packageName, int anim);
Jorim Jaggi2f7d2922015-10-29 13:08:29 +0100118
119 /**
120 * Like overridePendingAppTransitionMultiThumb, but uses a future to supply the specs. This is
121 * used for recents, where generating the thumbnails of the specs takes a non-trivial amount of
122 * time, so we want to move that off the critical path for starting the new activity.
123 */
124 void overridePendingAppTransitionMultiThumbFuture(
125 IAppTransitionAnimationSpecsFuture specsFuture, IRemoteCallback startedCallback,
126 boolean scaleUp);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800127 void executeAppTransition();
Wale Ogunwale3b232392016-05-13 15:37:13 -0700128
Filip Gruszczynski14b4e572015-11-03 15:53:55 -0800129 /** Used by system ui to report that recents has shown itself. */
130 void endProlongedAnimations();
131
Dianne Hackborne36d6e22010-02-17 19:46:25 -0800132 // Re-evaluate the current orientation from the caller's state.
133 // If there is a change, the new Configuration is returned and the
134 // caller must call setNewConfiguration() sometime later.
135 Configuration updateOrientationFromAppTokens(in Configuration currentConfig,
Andrii Kulian5406e7a2016-10-21 11:55:23 -0700136 IBinder freezeThisOneIfNeeded, int displayId);
137 // Notify window manager of the new display override configuration. Returns an array of stack
138 // ids that were affected by the update, ActivityManager should resize these stacks.
139 int[] setNewDisplayOverrideConfiguration(in Configuration overrideConfig, int displayId);
Chong Zhang167bbfac2016-03-31 09:44:34 -0700140
Dianne Hackborn9d9ece32012-09-10 15:33:52 -0700141 void startFreezingScreen(int exitAnim, int enterAnim);
142 void stopFreezingScreen();
143
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800144 // these require DISABLE_KEYGUARD permission
145 void disableKeyguard(IBinder token, String tag);
146 void reenableKeyguard(IBinder token);
147 void exitKeyguardSecurely(IOnKeyguardExitResult callback);
Mike Lockwood520d8bc2011-02-18 13:23:13 -0500148 boolean isKeyguardLocked();
149 boolean isKeyguardSecure();
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800150 void dismissKeyguard(IKeyguardDismissCallback callback, CharSequence message);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800151
Evan Rosky18396452016-07-27 15:19:37 -0700152 // Requires INTERACT_ACROSS_USERS_FULL permission
153 void setSwitchingUser(boolean switching);
154
Dianne Hackbornffa42482009-09-23 22:20:11 -0700155 void closeSystemDialogs(String reason);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800156
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800157 // These can only be called with the SET_ANIMATON_SCALE permission.
158 float getAnimationScale(int which);
159 float[] getAnimationScales();
160 void setAnimationScale(int which, float scale);
161 void setAnimationScales(in float[] scales);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800162
Dianne Hackborneb94fa72014-06-03 17:48:12 -0700163 float getCurrentAnimatorScale();
164
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800165 // For testing
166 void setInTouchMode(boolean showFocus);
Brad Fitzpatrick68044332010-11-22 18:19:48 -0800167
168 // For StrictMode flashing a red border on violations from the UI
169 // thread. The uid/pid is implicit from the Binder call, and the Window
170 // Manager uses that to determine whether or not the red border should
171 // actually be shown. (it will be ignored that pid doesn't have windows
172 // on screen)
173 void showStrictModeViolation(boolean on);
174
Brad Fitzpatrickc1a968a2010-11-24 08:56:40 -0800175 // Proxy to set the system property for whether the flashing
176 // should be enabled. The 'enabled' value is null or blank for
177 // the system default (differs per build variant) or any valid
178 // boolean string as parsed by SystemProperties.getBoolean().
179 void setStrictModeVisualIndicatorPreference(String enabled);
180
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100181 /**
Sander Alewijnsea87863a2014-07-29 12:01:38 +0100182 * Set whether screen capture is disabled for all windows of a specific user
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100183 */
Sander Alewijnsea87863a2014-07-29 12:01:38 +0100184 void setScreenCaptureDisabled(int userId, boolean disabled);
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100185
Winsonc28098f2015-10-30 14:50:19 -0700186 /**
Robert Carr3b716242016-08-16 16:02:21 -0700187 * Testing and debugging infrastructure for writing surface events
188 * to given FD. See RemoteSurfaceTrace.java or Wm.java for format.
189 */
190 void enableSurfaceTrace(in ParcelFileDescriptor fd);
191 void disableSurfaceTrace();
192
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800193 // These can only be called with the SET_ORIENTATION permission.
194 /**
Jeff Brown01a98dd2011-09-20 15:08:29 -0700195 * Update the current screen rotation based on the current state of
196 * the world.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800197 * @param alwaysSendConfiguration Flag to force a new configuration to
198 * be evaluated. This can be used when there are other parameters in
199 * configuration that are changing.
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700200 * @param forceRelayout If true, the window manager will always do a relayout
201 * of its windows even if the rotation hasn't changed.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800202 */
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700203 void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800204
205 /**
Andrii Kulian8ee72852017-03-10 10:36:45 -0800206 * Retrieve the current orientation of the primary screen.
207 * @return Constant as per {@link android.view.Surface.Rotation}.
208 *
209 * @see android.view.Display#DEFAULT_DISPLAY
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800210 */
Andrii Kulian8ee72852017-03-10 10:36:45 -0800211 int getDefaultDisplayRotation();
Jim Miller4eeb4f62012-11-08 00:04:29 -0800212
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800213 /**
Andrii Kulian35fa3c22017-03-11 09:37:28 -0800214 * Watch the rotation of the specified screen. Returns the current rotation,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800215 * calls back when it changes.
216 */
Andrii Kulian35fa3c22017-03-11 09:37:28 -0800217 int watchRotation(IRotationWatcher watcher, int displayId);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400218
Adam Powelldfee59a2011-08-05 20:48:30 -0700219 /**
Brian Colonnab1b9a8a2013-03-29 11:52:42 -0400220 * Remove a rotation watcher set using watchRotation.
221 * @hide
222 */
223 void removeRotationWatcher(IRotationWatcher watcher);
224
225 /**
Adam Powelldfee59a2011-08-05 20:48:30 -0700226 * Determine the preferred edge of the screen to pin the compact options menu against.
227 * @return a Gravity value for the options menu panel
228 * @hide
229 */
230 int getPreferredOptionsPanelGravity();
231
Jim Miller4eeb4f62012-11-08 00:04:29 -0800232 /**
233 * Lock the device orientation to the specified rotation, or to the
234 * current rotation if -1. Sensor input will be ignored until
235 * thawRotation() is called.
236 * @hide
237 */
238 void freezeRotation(int rotation);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400239
Jim Miller4eeb4f62012-11-08 00:04:29 -0800240 /**
241 * Release the orientation lock imposed by freezeRotation().
242 * @hide
243 */
244 void thawRotation();
Dianne Hackborn0aae2d42010-12-07 23:51:29 -0800245
Jim Miller4eeb4f62012-11-08 00:04:29 -0800246 /**
Svetoslav8e3feb12014-02-24 13:46:47 -0800247 * Gets whether the rotation is frozen.
Svetoslav Ganov80943d82013-01-02 10:25:37 -0800248 *
249 * @return Whether the rotation is frozen.
250 */
251 boolean isRotationFrozen();
252
253 /**
Zak Cohen3683fb12016-07-11 19:47:37 +0100254 * Screenshot the current wallpaper layer, including the whole screen.
255 */
256 Bitmap screenshotWallpaper();
257
258 /**
Lucas Dupine1571702017-05-24 14:14:44 -0700259 * Registers a wallpaper visibility listener.
260 * @return Current visibility.
261 */
262 boolean registerWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
263 int displayId);
264
265 /**
266 * Remove a visibility watcher that was added using registerWallpaperVisibilityListener.
267 */
268 void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener,
269 int displayId);
270
271 /**
Dianne Hackborn27eac1d2015-03-16 17:15:53 -0700272 * Used only for assist -- request a screenshot of the current application.
273 */
Winson Chungda2818f2017-10-23 16:25:49 -0700274 boolean requestAssistScreenshot(IAssistDataReceiver receiver);
Dianne Hackborn27eac1d2015-03-16 17:15:53 -0700275
276 /**
Joe Onorato664644d2011-01-23 17:53:23 -0800277 * Called by the status bar to notify Views of changes to System UI visiblity.
278 */
John Spurlocke7c28572013-10-29 14:23:51 -0400279 oneway void statusBarVisibilityChanged(int visibility);
Jeff Brown1a84fd12011-06-02 01:26:32 -0700280
281 /**
Winsonab216602016-08-09 14:05:20 -0700282 * Called by System UI to notify of changes to the visibility of Recents.
283 */
284 oneway void setRecentsVisibility(boolean visible);
285
286 /**
287 * Called by System UI to notify of changes to the visibility of PIP.
288 */
Winson Chungac52f282017-03-30 14:44:52 -0700289 oneway void setPipVisibility(boolean visible);
Winsonab216602016-08-09 14:05:20 -0700290
291 /**
Daniel Sandler0c4ccff2011-10-19 16:39:14 -0400292 * Device has a software navigation bar (separate from the status bar).
293 */
294 boolean hasNavigationBar();
Jim Miller93c518e2012-01-17 15:55:31 -0800295
296 /**
Adam Cohenf7522022012-10-03 20:03:18 -0700297 * Lock the device immediately with the specified options (can be null).
Jim Miller93c518e2012-01-17 15:55:31 -0800298 */
Adam Cohenf7522022012-10-03 20:03:18 -0700299 void lockNow(in Bundle options);
Svetoslav Ganovc9c9a482012-07-16 08:46:07 -0700300
301 /**
Jim Millerbfec0a82012-11-05 20:05:22 -0800302 * Device is in safe mode.
303 */
304 boolean isSafeModeEnabled();
Jorim Jaggicff0acb2014-03-31 16:35:15 +0200305
306 /**
307 * Enables the screen if all conditions are met.
308 */
309 void enableScreenIfNeeded();
Svetoslavdd137a82014-04-10 12:48:07 -0700310
311 /**
Svetoslav1376d602014-03-13 11:17:26 -0700312 * Clears the frame statistics for a given window.
313 *
314 * @param token The window token.
315 * @return Whether the frame statistics were cleared.
316 */
317 boolean clearWindowContentFrameStats(IBinder token);
318
319 /**
320 * Gets the content frame statistics for a given window.
321 *
322 * @param token The window token.
323 * @return The frame statistics or null if the window does not exist.
324 */
325 WindowContentFrameStats getWindowContentFrameStats(IBinder token);
Jorim Jaggi61f39a72015-10-29 16:54:18 +0100326
327 /**
328 * @return the dock side the current docked stack is at; must be one of the
329 * WindowManagerGlobal.DOCKED_* values
330 */
331 int getDockedStackSide();
332
333 /**
334 * Sets whether we are currently in a drag resize operation where we are changing the docked
335 * stack size.
336 */
337 void setDockedStackResizing(boolean resizing);
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800338
339 /**
Jorim Jaggid47e7e12016-03-01 09:57:38 +0100340 * Sets the region the user can touch the divider. This region will be excluded from the region
341 * which is used to cause a focus switch when dispatching touch.
342 */
343 void setDockedStackDividerTouchRegion(in Rect touchableRegion);
344
345 /**
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100346 * Registers a listener that will be called when the dock divider changes its visibility or when
347 * the docked stack gets added/removed.
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800348 */
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100349 void registerDockedStackListener(IDockedStackListener listener);
Jorim Jaggi50981592015-12-29 17:54:12 +0100350
351 /**
Winson Chung655332c2016-10-31 13:14:28 -0700352 * Registers a listener that will be called when the pinned stack state changes.
353 */
354 void registerPinnedStackListener(int displayId, IPinnedStackListener listener);
355
356 /**
Jorim Jaggi50981592015-12-29 17:54:12 +0100357 * Updates the dim layer used while resizing.
358 *
359 * @param visible Whether the dim layer should be visible.
Wale Ogunwale68278562017-09-23 17:13:55 -0700360 * @param targetWindowingMode The windowing mode of the stack the dim layer should be placed on.
Jorim Jaggi50981592015-12-29 17:54:12 +0100361 * @param alpha The translucency of the dim layer, between 0 and 1.
362 */
Wale Ogunwale68278562017-09-23 17:13:55 -0700363 void setResizeDimLayer(boolean visible, int targetWindowingMode, float alpha);
Clara Bayarri75e09792015-07-29 16:20:40 +0100364
365 /**
366 * Requests Keyboard Shortcuts from the displayed window.
367 *
368 * @param receiver The receiver to deliver the results to.
369 */
Clara Bayarrifcd7e802016-03-10 12:58:18 +0000370 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId);
Jorim Jaggic6c89a82016-01-28 17:48:21 -0800371
372 /**
373 * Retrieves the current stable insets from the primary display.
374 */
Winson Chung303c6b72016-10-24 17:12:49 -0700375 void getStableInsets(int displayId, out Rect outInsets);
Muyuan Li94ce94e2016-02-24 16:20:54 -0800376
377 /**
378 * Register shortcut key. Shortcut code is packed as:
379 * (MetaState << Integer.SIZE) | KeyCode
380 * @hide
381 */
382 void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber);
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700383
384 /**
Winson41275482016-10-10 15:17:45 -0700385 * Create an input consumer by name.
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700386 */
Winson Chung6463c362017-09-25 16:23:26 -0700387 void createInputConsumer(IBinder token, String name, out InputChannel inputChannel);
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700388
389 /**
Winson41275482016-10-10 15:17:45 -0700390 * Destroy an input consumer by name. This method will also dispose the input channels
391 * associated with that InputConsumer.
Vladislav Kaznacheev0d50d862016-03-29 15:43:28 -0700392 */
Winson41275482016-10-10 15:17:45 -0700393 boolean destroyInputConsumer(String name);
Albert Chaulk56162a02017-06-05 19:35:23 -0400394
395 /**
396 * Return the touch region for the current IME window, or an empty region if there is none.
397 */
398 Region getCurrentImeTouchRegion();
Vishnu Nairc9615042018-01-09 07:23:31 -0800399
400 /**
401 * Starts a window trace.
402 */
403 void startWindowTrace();
404
405 /**
406 * Stops a window trace.
407 */
408 void stopWindowTrace();
409
410 /**
411 * Returns true if window trace is enabled.
412 */
413 boolean isWindowTraceEnabled();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800414}