blob: 7af4a1fea441d8322c74f1d883ca061591df4aa3 [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
Dianne Hackborn27eac1d2015-03-16 17:15:53 -070019import com.android.internal.app.IAssistScreenshotReceiver;
Clara Bayarri75e09792015-07-29 16:20:40 +010020import com.android.internal.os.IResultReceiver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021import com.android.internal.view.IInputContext;
22import com.android.internal.view.IInputMethodClient;
Muyuan Li94ce94e2016-02-24 16:20:54 -080023import com.android.internal.policy.IShortcutService;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080024
Dianne Hackborn2f0b1752011-05-31 17:59:49 -070025import android.content.res.CompatibilityInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026import android.content.res.Configuration;
Dianne Hackborn0aae2d42010-12-07 23:51:29 -080027import android.graphics.Bitmap;
Dianne Hackbornac8dea12011-04-20 18:18:51 -070028import android.graphics.Point;
Svetoslav Ganovc9c9a482012-07-16 08:46:07 -070029import android.graphics.Rect;
Adam Cohenf7522022012-10-03 20:03:18 -070030import android.os.Bundle;
Dianne Hackborn38e29a62011-09-18 14:43:08 -070031import android.os.IRemoteCallback;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032import android.view.IApplicationToken;
Jorim Jaggi2f7d2922015-10-29 13:08:29 +010033import android.view.IAppTransitionAnimationSpecsFuture;
Jorim Jaggia6c934e2015-12-21 13:22:31 +010034import android.view.IDockedStackListener;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035import android.view.IOnKeyguardExitResult;
36import android.view.IRotationWatcher;
37import android.view.IWindowSession;
Dianne Hackborneb94fa72014-06-03 17:48:12 -070038import android.view.IWindowSessionCallback;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039import android.view.KeyEvent;
Jeff Brown6ec402b2010-07-28 15:48:59 -070040import android.view.InputEvent;
Svetoslav Ganov152e9bb2012-10-12 20:15:29 -070041import android.view.MagnificationSpec;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042import android.view.MotionEvent;
Jeff Browna41ca772010-08-11 14:46:32 -070043import android.view.InputChannel;
Jeff Brown8d608662010-08-30 03:02:23 -070044import android.view.InputDevice;
Svetoslav Ganov1cf70bb2012-08-06 10:53:34 -070045import android.view.IInputFilter;
Filip Gruszczynski170192a2015-08-16 17:46:34 -070046import android.view.AppTransitionAnimationSpec;
Svetoslav1376d602014-03-13 11:17:26 -070047import android.view.WindowContentFrameStats;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048
49/**
50 * System private interface to the window manager.
51 *
52 * {@hide}
53 */
54interface IWindowManager
55{
56 /**
57 * ===== NOTICE =====
58 * The first three methods must remain the first three methods. Scripts
59 * and tools rely on their transaction number to work properly.
60 */
61 // This is used for debugging
62 boolean startViewServer(int port); // Transaction #1
63 boolean stopViewServer(); // Transaction #2
64 boolean isViewServerRunning(); // Transaction #3
65
Dianne Hackborneb94fa72014-06-03 17:48:12 -070066 IWindowSession openSession(in IWindowSessionCallback callback, in IInputMethodClient client,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067 in IInputContext inputContext);
68 boolean inputMethodClientHasFocus(IInputMethodClient client);
Dianne Hackbornac8dea12011-04-20 18:18:51 -070069
Dianne Hackborn672cf452013-03-26 15:24:24 -070070 void getInitialDisplaySize(int displayId, out Point size);
71 void getBaseDisplaySize(int displayId, out Point size);
Jeff Brown43aa1592012-09-10 17:36:31 -070072 void setForcedDisplaySize(int displayId, int width, int height);
Craig Mautner59c00972012-07-30 12:10:24 -070073 void clearForcedDisplaySize(int displayId);
Dianne Hackborn672cf452013-03-26 15:24:24 -070074 int getInitialDisplayDensity(int displayId);
75 int getBaseDisplayDensity(int displayId);
Dianne Hackborndde331c2012-08-03 14:01:57 -070076 void setForcedDisplayDensity(int displayId, int density);
77 void clearForcedDisplayDensity(int displayId);
Jeff Brownd46747a2015-04-15 19:02:36 -070078 void setForcedDisplayScalingMode(int displayId, int mode); // 0 = auto, 1 = disable
Dianne Hackborn7916ac62011-05-16 20:45:48 -070079
Dianne Hackbornc652de82013-02-15 16:32:56 -080080 void setOverscan(int displayId, int left, int top, int right, int bottom);
81
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080082 // These can only be called when holding the MANAGE_APP_TOKENS permission.
83 void pauseKeyDispatching(IBinder token);
84 void resumeKeyDispatching(IBinder token);
85 void setEventDispatching(boolean enabled);
Dianne Hackborne4fbd622009-03-27 18:09:16 -070086 void addWindowToken(IBinder token, int type);
87 void removeWindowToken(IBinder token);
Wale Ogunwale706ed792015-08-02 10:29:44 -070088 /**
89 * Adds an application token to the specified task Id.
90 * @param addPos The position to add the token to in the task.
91 * @param token The token to add.
92 * @param taskId The Id of the task we are adding the token to.
93 * @param stackId Stack Id to create a new Task with the input task Id on
94 * if the task doesn't exist yet.
95 * @param requestedOrientation Orientation to use.
96 * @param fullscreen True if the application token is fullscreen.
97 * @param showWhenLocked True if the application token should be shown when locked.
98 * @param userId Id of user to associate the token with.
99 * @param configChanges Input configuration changes.
100 * @param voiceInteraction True if the token is in voice interaction mode.
101 * @param launchTaskBehind True if the token is been launched from behind.
102 * @param taskBounds Bounds to use when creating a new Task with the input task Id if
103 * the task doesn't exist yet.
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700104 * @param configuration Configuration that is being used with this task.
Wale Ogunwaleb1faf602016-01-27 09:12:31 -0800105 * @param taskResizeMode The resize mode of the task.
Wale Ogunwale6cae7652015-12-26 07:36:26 -0800106 * @param alwaysFocusable True if the app windows are always focusable regardless of the stack
107 * they are in.
Wale Ogunwaleb1faf602016-01-27 09:12:31 -0800108 * @param homeTask True if this is the task.
Wale Ogunwale706ed792015-08-02 10:29:44 -0700109 */
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700110 void addAppToken(int addPos, IApplicationToken token, int taskId, int stackId,
Craig Mautner5d9f5472013-11-12 14:02:52 -0800111 int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId,
Wale Ogunwale706ed792015-08-02 10:29:44 -0700112 int configChanges, boolean voiceInteraction, boolean launchTaskBehind,
Wale Ogunwaleb1faf602016-01-27 09:12:31 -0800113 in Rect taskBounds, in Configuration configuration, int taskResizeMode,
114 boolean alwaysFocusable, boolean homeTask);
Wale Ogunwale706ed792015-08-02 10:29:44 -0700115 /**
116 *
117 * @param token The token we are adding to the input task Id.
118 * @param taskId The Id of the task we are adding the token to.
Wale Ogunwale2998eef2015-12-02 19:46:29 -0800119 * @param stackId Stack Id to create a new Task with the input task Id on
120 * if the task doesn't exist yet.
Wale Ogunwale706ed792015-08-02 10:29:44 -0700121 * @param taskBounds Bounds to use when creating a new Task with the input task Id if
122 * the task doesn't exist yet.
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700123 * @param config Configuration that is being used with this task.
Wale Ogunwaleb1faf602016-01-27 09:12:31 -0800124 * @param taskResizeMode The resize mode of the task.
125 * @param homeTask True if this is the task.
Wale Ogunwale706ed792015-08-02 10:29:44 -0700126 */
Wale Ogunwaleb1faf602016-01-27 09:12:31 -0800127 void setAppTask(IBinder token, int taskId, int stackId, in Rect taskBounds,
128 in Configuration config, int taskResizeMode, boolean homeTask);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800129 void setAppOrientation(IApplicationToken token, int requestedOrientation);
130 int getAppOrientation(IApplicationToken token);
131 void setFocusedApp(IBinder token, boolean moveFocusNow);
Dianne Hackborn7da6ac32010-12-09 19:22:04 -0800132 void prepareAppTransition(int transit, boolean alwaysKeepCurrent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800133 int getPendingAppTransition();
Dianne Hackborn84375872012-06-01 19:03:50 -0700134 void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim,
135 IRemoteCallback startedCallback);
Dianne Hackborneabfb3a2012-04-16 16:28:22 -0700136 void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth,
137 int startHeight);
Chet Haase10e23ab2015-02-11 15:08:38 -0800138 void overridePendingAppTransitionClipReveal(int startX, int startY,
139 int startWidth, int startHeight);
Dianne Hackborn8078d8c2012-03-20 11:11:26 -0700140 void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY,
Michael Jurka832cb222012-04-13 09:32:47 -0700141 IRemoteCallback startedCallback, boolean scaleUp);
Winson Chunga4ccb862014-08-22 15:26:27 -0700142 void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX,
Winson Chung2e7f3bd2014-09-05 13:17:22 +0200143 int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
144 boolean scaleUp);
Filip Gruszczynski170192a2015-08-16 17:46:34 -0700145 /**
146 * Overrides animation for app transition that exits from an application to a multi-window
147 * environment and allows specifying transition animation parameters for each window.
148 *
149 * @param specs Array of transition animation descriptions for entering windows.
150 *
151 * @hide
152 */
153 void overridePendingAppTransitionMultiThumb(in AppTransitionAnimationSpec[] specs,
Filip Gruszczynski1a5203d2015-10-29 17:43:49 -0700154 IRemoteCallback startedCallback, IRemoteCallback finishedCallback, boolean scaleUp);
Winson Chung044d5292014-11-06 11:05:19 -0800155 void overridePendingAppTransitionInPlace(String packageName, int anim);
Jorim Jaggi2f7d2922015-10-29 13:08:29 +0100156
157 /**
158 * Like overridePendingAppTransitionMultiThumb, but uses a future to supply the specs. This is
159 * used for recents, where generating the thumbnails of the specs takes a non-trivial amount of
160 * time, so we want to move that off the critical path for starting the new activity.
161 */
162 void overridePendingAppTransitionMultiThumbFuture(
163 IAppTransitionAnimationSpecsFuture specsFuture, IRemoteCallback startedCallback,
164 boolean scaleUp);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800165 void executeAppTransition();
166 void setAppStartingWindow(IBinder token, String pkg, int theme,
Dianne Hackborn2f0b1752011-05-31 17:59:49 -0700167 in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
Adam Powell04fe6eb2013-05-31 14:39:48 -0700168 int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800169 void setAppVisibility(IBinder token, boolean visible);
Wale Ogunwale8d5a5422016-03-03 18:28:21 -0800170 void notifyAppStopped(IBinder token, boolean stopped);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800171 void startAppFreezingScreen(IBinder token, int configChanges);
172 void stopAppFreezingScreen(IBinder token, boolean force);
173 void removeAppToken(IBinder token);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800174
Filip Gruszczynski14b4e572015-11-03 15:53:55 -0800175 /** Used by system ui to report that recents has shown itself. */
176 void endProlongedAnimations();
177
Dianne Hackborne36d6e22010-02-17 19:46:25 -0800178 // Re-evaluate the current orientation from the caller's state.
179 // If there is a change, the new Configuration is returned and the
180 // caller must call setNewConfiguration() sometime later.
181 Configuration updateOrientationFromAppTokens(in Configuration currentConfig,
182 IBinder freezeThisOneIfNeeded);
183 void setNewConfiguration(in Configuration config);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800184
Dianne Hackborn9d9ece32012-09-10 15:33:52 -0700185 void startFreezingScreen(int exitAnim, int enterAnim);
186 void stopFreezingScreen();
187
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800188 // these require DISABLE_KEYGUARD permission
189 void disableKeyguard(IBinder token, String tag);
190 void reenableKeyguard(IBinder token);
191 void exitKeyguardSecurely(IOnKeyguardExitResult callback);
Mike Lockwood520d8bc2011-02-18 13:23:13 -0500192 boolean isKeyguardLocked();
193 boolean isKeyguardSecure();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800194 boolean inKeyguardRestrictedInputMode();
Dianne Hackborn90c52de2011-09-23 12:57:44 -0700195 void dismissKeyguard();
Adrian Roosd5c2db62016-03-08 16:11:31 -0800196 void keyguardGoingAway(int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800197
Dianne Hackbornffa42482009-09-23 22:20:11 -0700198 void closeSystemDialogs(String reason);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800199
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800200 // These can only be called with the SET_ANIMATON_SCALE permission.
201 float getAnimationScale(int which);
202 float[] getAnimationScales();
203 void setAnimationScale(int which, float scale);
204 void setAnimationScales(in float[] scales);
Jim Miller4eeb4f62012-11-08 00:04:29 -0800205
Dianne Hackborneb94fa72014-06-03 17:48:12 -0700206 float getCurrentAnimatorScale();
207
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800208 // For testing
209 void setInTouchMode(boolean showFocus);
Brad Fitzpatrick68044332010-11-22 18:19:48 -0800210
211 // For StrictMode flashing a red border on violations from the UI
212 // thread. The uid/pid is implicit from the Binder call, and the Window
213 // Manager uses that to determine whether or not the red border should
214 // actually be shown. (it will be ignored that pid doesn't have windows
215 // on screen)
216 void showStrictModeViolation(boolean on);
217
Brad Fitzpatrickc1a968a2010-11-24 08:56:40 -0800218 // Proxy to set the system property for whether the flashing
219 // should be enabled. The 'enabled' value is null or blank for
220 // the system default (differs per build variant) or any valid
221 // boolean string as parsed by SystemProperties.getBoolean().
222 void setStrictModeVisualIndicatorPreference(String enabled);
223
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100224 /**
Sander Alewijnsea87863a2014-07-29 12:01:38 +0100225 * Set whether screen capture is disabled for all windows of a specific user
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100226 */
Sander Alewijnsea87863a2014-07-29 12:01:38 +0100227 void setScreenCaptureDisabled(int userId, boolean disabled);
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100228
Winsonc28098f2015-10-30 14:50:19 -0700229 /**
230 * Cancels the window transitions for the given task.
231 */
232 void cancelTaskWindowTransition(int taskId);
233
Winson13d30662015-11-06 15:30:29 -0800234 /**
235 * Cancels the thumbnail transitions for the given task.
236 */
237 void cancelTaskThumbnailTransition(int taskId);
238
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800239 // These can only be called with the SET_ORIENTATION permission.
240 /**
Jeff Brown01a98dd2011-09-20 15:08:29 -0700241 * Update the current screen rotation based on the current state of
242 * the world.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800243 * @param alwaysSendConfiguration Flag to force a new configuration to
244 * be evaluated. This can be used when there are other parameters in
245 * configuration that are changing.
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700246 * @param forceRelayout If true, the window manager will always do a relayout
247 * of its windows even if the rotation hasn't changed.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800248 */
Dianne Hackbornf87d1962012-04-04 12:48:24 -0700249 void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800250
251 /**
252 * Retrieve the current screen orientation, constants as per
253 * {@link android.view.Surface}.
254 */
255 int getRotation();
Jim Miller4eeb4f62012-11-08 00:04:29 -0800256
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800257 /**
258 * Watch the rotation of the screen. Returns the current rotation,
259 * calls back when it changes.
260 */
261 int watchRotation(IRotationWatcher watcher);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400262
Adam Powelldfee59a2011-08-05 20:48:30 -0700263 /**
Brian Colonnab1b9a8a2013-03-29 11:52:42 -0400264 * Remove a rotation watcher set using watchRotation.
265 * @hide
266 */
267 void removeRotationWatcher(IRotationWatcher watcher);
268
269 /**
Adam Powelldfee59a2011-08-05 20:48:30 -0700270 * Determine the preferred edge of the screen to pin the compact options menu against.
271 * @return a Gravity value for the options menu panel
272 * @hide
273 */
274 int getPreferredOptionsPanelGravity();
275
Jim Miller4eeb4f62012-11-08 00:04:29 -0800276 /**
277 * Lock the device orientation to the specified rotation, or to the
278 * current rotation if -1. Sensor input will be ignored until
279 * thawRotation() is called.
280 * @hide
281 */
282 void freezeRotation(int rotation);
Daniel Sandlerb73617d2010-08-17 00:41:00 -0400283
Jim Miller4eeb4f62012-11-08 00:04:29 -0800284 /**
285 * Release the orientation lock imposed by freezeRotation().
286 * @hide
287 */
288 void thawRotation();
Dianne Hackborn0aae2d42010-12-07 23:51:29 -0800289
Jim Miller4eeb4f62012-11-08 00:04:29 -0800290 /**
Svetoslav8e3feb12014-02-24 13:46:47 -0800291 * Gets whether the rotation is frozen.
Svetoslav Ganov80943d82013-01-02 10:25:37 -0800292 *
293 * @return Whether the rotation is frozen.
294 */
295 boolean isRotationFrozen();
296
297 /**
Dianne Hackborn27eac1d2015-03-16 17:15:53 -0700298 * Used only for assist -- request a screenshot of the current application.
299 */
300 boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver);
301
302 /**
Jim Miller4eeb4f62012-11-08 00:04:29 -0800303 * Create a screenshot of the applications currently displayed.
Winson8b1871d2015-11-20 09:56:20 -0800304 *
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800305 * @param frameScale the scale to apply to the frame, only used when width = -1 and
Winson8b1871d2015-11-20 09:56:20 -0800306 * height = -1
Jim Miller4eeb4f62012-11-08 00:04:29 -0800307 */
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800308 Bitmap screenshotApplications(IBinder appToken, int displayId, int maxWidth, int maxHeight,
Winson8b1871d2015-11-20 09:56:20 -0800309 float frameScale);
Joe Onorato664644d2011-01-23 17:53:23 -0800310
311 /**
312 * Called by the status bar to notify Views of changes to System UI visiblity.
313 */
John Spurlocke7c28572013-10-29 14:23:51 -0400314 oneway void statusBarVisibilityChanged(int visibility);
Jeff Brown1a84fd12011-06-02 01:26:32 -0700315
316 /**
Daniel Sandler0c4ccff2011-10-19 16:39:14 -0400317 * Device has a software navigation bar (separate from the status bar).
318 */
319 boolean hasNavigationBar();
Jim Miller93c518e2012-01-17 15:55:31 -0800320
321 /**
Adam Cohenf7522022012-10-03 20:03:18 -0700322 * Lock the device immediately with the specified options (can be null).
Jim Miller93c518e2012-01-17 15:55:31 -0800323 */
Adam Cohenf7522022012-10-03 20:03:18 -0700324 void lockNow(in Bundle options);
Svetoslav Ganovc9c9a482012-07-16 08:46:07 -0700325
326 /**
Jim Millerbfec0a82012-11-05 20:05:22 -0800327 * Device is in safe mode.
328 */
329 boolean isSafeModeEnabled();
Jorim Jaggicff0acb2014-03-31 16:35:15 +0200330
331 /**
332 * Enables the screen if all conditions are met.
333 */
334 void enableScreenIfNeeded();
Svetoslavdd137a82014-04-10 12:48:07 -0700335
336 /**
Svetoslav1376d602014-03-13 11:17:26 -0700337 * Clears the frame statistics for a given window.
338 *
339 * @param token The window token.
340 * @return Whether the frame statistics were cleared.
341 */
342 boolean clearWindowContentFrameStats(IBinder token);
343
344 /**
345 * Gets the content frame statistics for a given window.
346 *
347 * @param token The window token.
348 * @return The frame statistics or null if the window does not exist.
349 */
350 WindowContentFrameStats getWindowContentFrameStats(IBinder token);
Jorim Jaggi61f39a72015-10-29 16:54:18 +0100351
352 /**
353 * @return the dock side the current docked stack is at; must be one of the
354 * WindowManagerGlobal.DOCKED_* values
355 */
356 int getDockedStackSide();
357
358 /**
359 * Sets whether we are currently in a drag resize operation where we are changing the docked
360 * stack size.
361 */
362 void setDockedStackResizing(boolean resizing);
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800363
364 /**
Jorim Jaggid47e7e12016-03-01 09:57:38 +0100365 * Sets the region the user can touch the divider. This region will be excluded from the region
366 * which is used to cause a focus switch when dispatching touch.
367 */
368 void setDockedStackDividerTouchRegion(in Rect touchableRegion);
369
370 /**
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100371 * Registers a listener that will be called when the dock divider changes its visibility or when
372 * the docked stack gets added/removed.
Filip Gruszczynski64cdc142015-11-29 21:10:07 -0800373 */
Jorim Jaggia6c934e2015-12-21 13:22:31 +0100374 void registerDockedStackListener(IDockedStackListener listener);
Jorim Jaggi50981592015-12-29 17:54:12 +0100375
376 /**
377 * Updates the dim layer used while resizing.
378 *
379 * @param visible Whether the dim layer should be visible.
380 * @param targetStackId The id of the task stack the dim layer should be placed on.
381 * @param alpha The translucency of the dim layer, between 0 and 1.
382 */
383 void setResizeDimLayer(boolean visible, int targetStackId, float alpha);
Clara Bayarri75e09792015-07-29 16:20:40 +0100384
385 /**
386 * Requests Keyboard Shortcuts from the displayed window.
387 *
388 * @param receiver The receiver to deliver the results to.
389 */
Clara Bayarrifcd7e802016-03-10 12:58:18 +0000390 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId);
Jorim Jaggic6c89a82016-01-28 17:48:21 -0800391
392 /**
393 * Retrieves the current stable insets from the primary display.
394 */
395 void getStableInsets(out Rect outInsets);
Muyuan Li94ce94e2016-02-24 16:20:54 -0800396
397 /**
398 * Register shortcut key. Shortcut code is packed as:
399 * (MetaState << Integer.SIZE) | KeyCode
400 * @hide
401 */
402 void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800403}