Dianne Hackborn | 7da6ac3 | 2010-12-09 19:22:04 -0800 | [diff] [blame] | 1 | /* |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 2 | ** Copyright 2006, The Android Open Source Project |
| 3 | ** |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 4 | ** 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 Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 7 | ** |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 8 | ** http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 9 | ** |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 10 | ** 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 Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 14 | ** limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.view; |
| 18 | |
Clara Bayarri | 75e0979 | 2015-07-29 16:20:40 +0100 | [diff] [blame] | 19 | import com.android.internal.os.IResultReceiver; |
Jorim Jaggi | 241ae10 | 2016-11-02 21:57:33 -0700 | [diff] [blame] | 20 | import com.android.internal.policy.IKeyguardDismissCallback; |
Muyuan Li | 94ce94e | 2016-02-24 16:20:54 -0800 | [diff] [blame] | 21 | import com.android.internal.policy.IShortcutService; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | |
Winson Chung | e210468 | 2017-11-08 17:31:14 -0800 | [diff] [blame] | 23 | import android.app.IAssistDataReceiver; |
Dianne Hackborn | 2f0b175 | 2011-05-31 17:59:49 -0700 | [diff] [blame] | 24 | import android.content.res.CompatibilityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 25 | import android.content.res.Configuration; |
Dianne Hackborn | 0aae2d4 | 2010-12-07 23:51:29 -0800 | [diff] [blame] | 26 | import android.graphics.Bitmap; |
Winson Chung | a31922f | 2017-05-24 15:50:06 -0700 | [diff] [blame] | 27 | import android.graphics.GraphicBuffer; |
Issei Suzuki | a5dbf52 | 2019-02-01 17:58:15 +0100 | [diff] [blame] | 28 | import android.graphics.Insets; |
Dianne Hackborn | ac8dea1 | 2011-04-20 18:18:51 -0700 | [diff] [blame] | 29 | import android.graphics.Point; |
Svetoslav Ganov | c9c9a48 | 2012-07-16 08:46:07 -0700 | [diff] [blame] | 30 | import android.graphics.Rect; |
Albert Chaulk | 56162a0 | 2017-06-05 19:35:23 -0400 | [diff] [blame] | 31 | import android.graphics.Region; |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 32 | import android.os.Bundle; |
Dianne Hackborn | 38e29a6 | 2011-09-18 14:43:08 -0700 | [diff] [blame] | 33 | import android.os.IRemoteCallback; |
Robert Carr | 3b71624 | 2016-08-16 16:02:21 -0700 | [diff] [blame] | 34 | import android.os.ParcelFileDescriptor; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | import android.view.IApplicationToken; |
Jorim Jaggi | 2f7d292 | 2015-10-29 13:08:29 +0100 | [diff] [blame] | 36 | import android.view.IAppTransitionAnimationSpecsFuture; |
Jorim Jaggi | a6c934e | 2015-12-21 13:22:31 +0100 | [diff] [blame] | 37 | import android.view.IDockedStackListener; |
Adrian Roos | 962017e | 2018-11-27 15:11:46 +0100 | [diff] [blame] | 38 | import android.view.IDisplayFoldListener; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | import android.view.IOnKeyguardExitResult; |
Winson Chung | 655332c | 2016-10-31 13:14:28 -0700 | [diff] [blame] | 40 | import android.view.IPinnedStackListener; |
Jorim Jaggi | 33a701a | 2017-12-01 14:58:18 +0100 | [diff] [blame] | 41 | import android.view.RemoteAnimationAdapter; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 42 | import android.view.IRotationWatcher; |
Lucas Dupin | e157170 | 2017-05-24 14:14:44 -0700 | [diff] [blame] | 43 | import android.view.IWallpaperVisibilityListener; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | import android.view.IWindowSession; |
Dianne Hackborn | eb94fa7 | 2014-06-03 17:48:12 -0700 | [diff] [blame] | 45 | import android.view.IWindowSessionCallback; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 46 | import android.view.KeyEvent; |
Jeff Brown | 6ec402b | 2010-07-28 15:48:59 -0700 | [diff] [blame] | 47 | import android.view.InputEvent; |
Svetoslav Ganov | 152e9bb | 2012-10-12 20:15:29 -0700 | [diff] [blame] | 48 | import android.view.MagnificationSpec; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | import android.view.MotionEvent; |
Jeff Brown | a41ca77 | 2010-08-11 14:46:32 -0700 | [diff] [blame] | 50 | import android.view.InputChannel; |
Jeff Brown | 8d60866 | 2010-08-30 03:02:23 -0700 | [diff] [blame] | 51 | import android.view.InputDevice; |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 52 | import android.view.IInputFilter; |
Filip Gruszczynski | 170192a | 2015-08-16 17:46:34 -0700 | [diff] [blame] | 53 | import android.view.AppTransitionAnimationSpec; |
Svetoslav | 1376d60 | 2014-03-13 11:17:26 -0700 | [diff] [blame] | 54 | import android.view.WindowContentFrameStats; |
Jorim Jaggi | e2c77f9 | 2016-12-29 14:57:22 +0100 | [diff] [blame] | 55 | import android.view.WindowManager; |
Robert Carr | 10584fa | 2019-01-14 15:55:19 -0800 | [diff] [blame] | 56 | import android.view.SurfaceControl; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * System private interface to the window manager. |
| 60 | * |
| 61 | * {@hide} |
| 62 | */ |
| 63 | interface IWindowManager |
| 64 | { |
| 65 | /** |
| 66 | * ===== NOTICE ===== |
| 67 | * The first three methods must remain the first three methods. Scripts |
| 68 | * and tools rely on their transaction number to work properly. |
| 69 | */ |
| 70 | // This is used for debugging |
| 71 | boolean startViewServer(int port); // Transaction #1 |
| 72 | boolean stopViewServer(); // Transaction #2 |
| 73 | boolean isViewServerRunning(); // Transaction #3 |
| 74 | |
Yohei Yukawa | a71bb25 | 2018-09-19 19:21:24 -0700 | [diff] [blame] | 75 | IWindowSession openSession(in IWindowSessionCallback callback); |
Dianne Hackborn | ac8dea1 | 2011-04-20 18:18:51 -0700 | [diff] [blame] | 76 | |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 77 | @UnsupportedAppUsage |
Dianne Hackborn | 672cf45 | 2013-03-26 15:24:24 -0700 | [diff] [blame] | 78 | void getInitialDisplaySize(int displayId, out Point size); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 79 | @UnsupportedAppUsage |
Dianne Hackborn | 672cf45 | 2013-03-26 15:24:24 -0700 | [diff] [blame] | 80 | void getBaseDisplaySize(int displayId, out Point size); |
Jeff Brown | 43aa159 | 2012-09-10 17:36:31 -0700 | [diff] [blame] | 81 | void setForcedDisplaySize(int displayId, int width, int height); |
Craig Mautner | 59c0097 | 2012-07-30 12:10:24 -0700 | [diff] [blame] | 82 | void clearForcedDisplaySize(int displayId); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 83 | @UnsupportedAppUsage |
Dianne Hackborn | 672cf45 | 2013-03-26 15:24:24 -0700 | [diff] [blame] | 84 | int getInitialDisplayDensity(int displayId); |
| 85 | int getBaseDisplayDensity(int displayId); |
Alan Viverette | df3a7ca | 2016-09-06 17:13:41 -0400 | [diff] [blame] | 86 | void setForcedDisplayDensityForUser(int displayId, int density, int userId); |
| 87 | void clearForcedDisplayDensityForUser(int displayId, int userId); |
Jeff Brown | d46747a | 2015-04-15 19:02:36 -0700 | [diff] [blame] | 88 | void setForcedDisplayScalingMode(int displayId, int mode); // 0 = auto, 1 = disable |
Dianne Hackborn | 7916ac6 | 2011-05-16 20:45:48 -0700 | [diff] [blame] | 89 | |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 90 | void setOverscan(int displayId, int left, int top, int right, int bottom); |
| 91 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 92 | // These can only be called when holding the MANAGE_APP_TOKENS permission. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | void setEventDispatching(boolean enabled); |
Wale Ogunwale | ac2561e | 2016-11-01 15:43:46 -0700 | [diff] [blame] | 94 | void addWindowToken(IBinder token, int type, int displayId); |
| 95 | void removeWindowToken(IBinder token, int displayId); |
Dianne Hackborn | 7da6ac3 | 2010-12-09 19:22:04 -0800 | [diff] [blame] | 96 | void prepareAppTransition(int transit, boolean alwaysKeepCurrent); |
Jorim Jaggi | 2f7d292 | 2015-10-29 13:08:29 +0100 | [diff] [blame] | 97 | |
| 98 | /** |
| 99 | * Like overridePendingAppTransitionMultiThumb, but uses a future to supply the specs. This is |
| 100 | * used for recents, where generating the thumbnails of the specs takes a non-trivial amount of |
| 101 | * time, so we want to move that off the critical path for starting the new activity. |
| 102 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 103 | @UnsupportedAppUsage |
Jorim Jaggi | 2f7d292 | 2015-10-29 13:08:29 +0100 | [diff] [blame] | 104 | void overridePendingAppTransitionMultiThumbFuture( |
| 105 | IAppTransitionAnimationSpecsFuture specsFuture, IRemoteCallback startedCallback, |
lumark | a483f31 | 2018-11-20 15:24:05 +0800 | [diff] [blame] | 106 | boolean scaleUp, int displayId); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 107 | @UnsupportedAppUsage |
lumark | a483f31 | 2018-11-20 15:24:05 +0800 | [diff] [blame] | 108 | void overridePendingAppTransitionRemote(in RemoteAnimationAdapter remoteAnimationAdapter, |
| 109 | int displayId); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 110 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 111 | void executeAppTransition(); |
Wale Ogunwale | 3b23239 | 2016-05-13 15:37:13 -0700 | [diff] [blame] | 112 | |
Jorim Jaggi | 66b48df | 2018-04-20 16:23:48 +0200 | [diff] [blame] | 113 | /** |
| 114 | * Used by system ui to report that recents has shown itself. |
| 115 | * @deprecated to be removed once prebuilts are updated |
| 116 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 117 | @UnsupportedAppUsage |
Filip Gruszczynski | 14b4e57 | 2015-11-03 15:53:55 -0800 | [diff] [blame] | 118 | void endProlongedAnimations(); |
| 119 | |
Dianne Hackborn | 9d9ece3 | 2012-09-10 15:33:52 -0700 | [diff] [blame] | 120 | void startFreezingScreen(int exitAnim, int enterAnim); |
| 121 | void stopFreezingScreen(); |
| 122 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 123 | // these require DISABLE_KEYGUARD permission |
Adrian Roos | 1c8e3c0 | 2018-11-20 20:07:55 +0100 | [diff] [blame] | 124 | /** @deprecated use Activity.setShowWhenLocked instead. */ |
| 125 | void disableKeyguard(IBinder token, String tag, int userId); |
| 126 | /** @deprecated use Activity.setShowWhenLocked instead. */ |
| 127 | void reenableKeyguard(IBinder token, int userId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 128 | void exitKeyguardSecurely(IOnKeyguardExitResult callback); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 129 | @UnsupportedAppUsage |
Mike Lockwood | 520d8bc | 2011-02-18 13:23:13 -0500 | [diff] [blame] | 130 | boolean isKeyguardLocked(); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 131 | @UnsupportedAppUsage |
Mike Lockwood | 520d8bc | 2011-02-18 13:23:13 -0500 | [diff] [blame] | 132 | boolean isKeyguardSecure(); |
Lucas Dupin | c80c67e | 2017-12-04 14:29:10 -0800 | [diff] [blame] | 133 | void dismissKeyguard(IKeyguardDismissCallback callback, CharSequence message); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 134 | |
Evan Rosky | 1839645 | 2016-07-27 15:19:37 -0700 | [diff] [blame] | 135 | // Requires INTERACT_ACROSS_USERS_FULL permission |
| 136 | void setSwitchingUser(boolean switching); |
| 137 | |
Dianne Hackborn | ffa4248 | 2009-09-23 22:20:11 -0700 | [diff] [blame] | 138 | void closeSystemDialogs(String reason); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 139 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 140 | // These can only be called with the SET_ANIMATON_SCALE permission. |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 141 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 142 | float getAnimationScale(int which); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 143 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 144 | float[] getAnimationScales(); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 145 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 146 | void setAnimationScale(int which, float scale); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 147 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 148 | void setAnimationScales(in float[] scales); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 149 | |
Dianne Hackborn | eb94fa7 | 2014-06-03 17:48:12 -0700 | [diff] [blame] | 150 | float getCurrentAnimatorScale(); |
| 151 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 152 | // For testing |
| 153 | void setInTouchMode(boolean showFocus); |
Brad Fitzpatrick | 6804433 | 2010-11-22 18:19:48 -0800 | [diff] [blame] | 154 | |
| 155 | // For StrictMode flashing a red border on violations from the UI |
| 156 | // thread. The uid/pid is implicit from the Binder call, and the Window |
| 157 | // Manager uses that to determine whether or not the red border should |
| 158 | // actually be shown. (it will be ignored that pid doesn't have windows |
| 159 | // on screen) |
| 160 | void showStrictModeViolation(boolean on); |
| 161 | |
Brad Fitzpatrick | c1a968a | 2010-11-24 08:56:40 -0800 | [diff] [blame] | 162 | // Proxy to set the system property for whether the flashing |
| 163 | // should be enabled. The 'enabled' value is null or blank for |
| 164 | // the system default (differs per build variant) or any valid |
| 165 | // boolean string as parsed by SystemProperties.getBoolean(). |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 166 | @UnsupportedAppUsage |
Brad Fitzpatrick | c1a968a | 2010-11-24 08:56:40 -0800 | [diff] [blame] | 167 | void setStrictModeVisualIndicatorPreference(String enabled); |
| 168 | |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 169 | /** |
Makoto Onuki | 04ef447 | 2018-03-12 17:29:49 -0700 | [diff] [blame] | 170 | * Set whether screen capture is disabled for all windows of a specific user from |
| 171 | * the device policy cache. |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 172 | */ |
Makoto Onuki | 04ef447 | 2018-03-12 17:29:49 -0700 | [diff] [blame] | 173 | void refreshScreenCaptureDisabled(int userId); |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 174 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 175 | // These can only be called with the SET_ORIENTATION permission. |
| 176 | /** |
Jeff Brown | 01a98dd | 2011-09-20 15:08:29 -0700 | [diff] [blame] | 177 | * Update the current screen rotation based on the current state of |
| 178 | * the world. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 179 | * @param alwaysSendConfiguration Flag to force a new configuration to |
| 180 | * be evaluated. This can be used when there are other parameters in |
| 181 | * configuration that are changing. |
Dianne Hackborn | f87d196 | 2012-04-04 12:48:24 -0700 | [diff] [blame] | 182 | * @param forceRelayout If true, the window manager will always do a relayout |
| 183 | * of its windows even if the rotation hasn't changed. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 184 | */ |
Dianne Hackborn | f87d196 | 2012-04-04 12:48:24 -0700 | [diff] [blame] | 185 | void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 186 | |
| 187 | /** |
Andrii Kulian | 8ee7285 | 2017-03-10 10:36:45 -0800 | [diff] [blame] | 188 | * Retrieve the current orientation of the primary screen. |
| 189 | * @return Constant as per {@link android.view.Surface.Rotation}. |
| 190 | * |
| 191 | * @see android.view.Display#DEFAULT_DISPLAY |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 192 | */ |
Andrii Kulian | 8ee7285 | 2017-03-10 10:36:45 -0800 | [diff] [blame] | 193 | int getDefaultDisplayRotation(); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 194 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 195 | /** |
Andrii Kulian | 35fa3c2 | 2017-03-11 09:37:28 -0800 | [diff] [blame] | 196 | * Watch the rotation of the specified screen. Returns the current rotation, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 197 | * calls back when it changes. |
| 198 | */ |
Andrii Kulian | 35fa3c2 | 2017-03-11 09:37:28 -0800 | [diff] [blame] | 199 | int watchRotation(IRotationWatcher watcher, int displayId); |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 200 | |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 201 | /** |
Brian Colonna | b1b9a8a | 2013-03-29 11:52:42 -0400 | [diff] [blame] | 202 | * Remove a rotation watcher set using watchRotation. |
| 203 | * @hide |
| 204 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 205 | @UnsupportedAppUsage |
Brian Colonna | b1b9a8a | 2013-03-29 11:52:42 -0400 | [diff] [blame] | 206 | void removeRotationWatcher(IRotationWatcher watcher); |
| 207 | |
| 208 | /** |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 209 | * Determine the preferred edge of the screen to pin the compact options menu against. |
Riddle Hsu | a4d6fa2 | 2018-08-11 00:50:39 +0800 | [diff] [blame] | 210 | * |
| 211 | * @param displayId Id of the display where the menu window currently resides. |
| 212 | * @return a Gravity value for the options menu panel. |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 213 | * @hide |
| 214 | */ |
Riddle Hsu | a4d6fa2 | 2018-08-11 00:50:39 +0800 | [diff] [blame] | 215 | int getPreferredOptionsPanelGravity(int displayId); |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 216 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 217 | /** |
Garfield Tan | 90c9005 | 2018-10-08 12:29:41 -0700 | [diff] [blame] | 218 | * Equivalent to calling {@link #freezeDisplayRotation(int, int)} with {@link |
| 219 | * android.view.Display#DEFAULT_DISPLAY} and given rotation. |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 220 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 221 | @UnsupportedAppUsage |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 222 | void freezeRotation(int rotation); |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 223 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 224 | /** |
Garfield Tan | 90c9005 | 2018-10-08 12:29:41 -0700 | [diff] [blame] | 225 | * Equivalent to calling {@link #thawDisplayRotation(int)} with {@link |
| 226 | * android.view.Display#DEFAULT_DISPLAY}. |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 227 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 228 | @UnsupportedAppUsage |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 229 | void thawRotation(); |
Dianne Hackborn | 0aae2d4 | 2010-12-07 23:51:29 -0800 | [diff] [blame] | 230 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 231 | /** |
Garfield Tan | 90c9005 | 2018-10-08 12:29:41 -0700 | [diff] [blame] | 232 | * Equivelant to call {@link #isDisplayRotationFrozen(int)} with {@link |
| 233 | * android.view.Display#DEFAULT_DISPLAY}. |
Svetoslav Ganov | 80943d8 | 2013-01-02 10:25:37 -0800 | [diff] [blame] | 234 | */ |
| 235 | boolean isRotationFrozen(); |
| 236 | |
| 237 | /** |
Garfield Tan | 90c9005 | 2018-10-08 12:29:41 -0700 | [diff] [blame] | 238 | * Lock the display orientation to the specified rotation, or to the current |
| 239 | * rotation if -1. Sensor input will be ignored until thawRotation() is called. |
| 240 | * |
| 241 | * @param displayId the ID of display which rotation should be frozen. |
| 242 | * @param rotation one of {@link android.view.Surface#ROTATION_0}, |
| 243 | * {@link android.view.Surface#ROTATION_90}, {@link android.view.Surface#ROTATION_180}, |
| 244 | * {@link android.view.Surface#ROTATION_270} or -1 to freeze it to current rotation. |
| 245 | * @hide |
| 246 | */ |
| 247 | void freezeDisplayRotation(int displayId, int rotation); |
| 248 | |
| 249 | /** |
| 250 | * Release the orientation lock imposed by freezeRotation() on the display. |
| 251 | * |
| 252 | * @param displayId the ID of display which rotation should be thawed. |
| 253 | * @hide |
| 254 | */ |
| 255 | void thawDisplayRotation(int displayId); |
| 256 | |
| 257 | /** |
| 258 | * Gets whether the rotation is frozen on the display. |
| 259 | * |
| 260 | * @param displayId the ID of display which frozen is needed. |
| 261 | * @return Whether the rotation is frozen. |
| 262 | */ |
| 263 | boolean isDisplayRotationFrozen(int displayId); |
| 264 | |
| 265 | /** |
Zak Cohen | 3683fb1 | 2016-07-11 19:47:37 +0100 | [diff] [blame] | 266 | * Screenshot the current wallpaper layer, including the whole screen. |
| 267 | */ |
| 268 | Bitmap screenshotWallpaper(); |
| 269 | |
| 270 | /** |
Lucas Dupin | e157170 | 2017-05-24 14:14:44 -0700 | [diff] [blame] | 271 | * Registers a wallpaper visibility listener. |
| 272 | * @return Current visibility. |
| 273 | */ |
| 274 | boolean registerWallpaperVisibilityListener(IWallpaperVisibilityListener listener, |
| 275 | int displayId); |
| 276 | |
| 277 | /** |
| 278 | * Remove a visibility watcher that was added using registerWallpaperVisibilityListener. |
| 279 | */ |
| 280 | void unregisterWallpaperVisibilityListener(IWallpaperVisibilityListener listener, |
| 281 | int displayId); |
| 282 | |
| 283 | /** |
Dianne Hackborn | 27eac1d | 2015-03-16 17:15:53 -0700 | [diff] [blame] | 284 | * Used only for assist -- request a screenshot of the current application. |
| 285 | */ |
Winson Chung | da2818f | 2017-10-23 16:25:49 -0700 | [diff] [blame] | 286 | boolean requestAssistScreenshot(IAssistDataReceiver receiver); |
Dianne Hackborn | 27eac1d | 2015-03-16 17:15:53 -0700 | [diff] [blame] | 287 | |
| 288 | /** |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 289 | * Called by the status bar to notify Views of changes to System UI visiblity. |
| 290 | */ |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 291 | oneway void statusBarVisibilityChanged(int displayId, int visibility); |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 292 | |
| 293 | /** |
Winson | ab21660 | 2016-08-09 14:05:20 -0700 | [diff] [blame] | 294 | * Called by System UI to notify of changes to the visibility of Recents. |
| 295 | */ |
| 296 | oneway void setRecentsVisibility(boolean visible); |
| 297 | |
| 298 | /** |
| 299 | * Called by System UI to notify of changes to the visibility of PIP. |
| 300 | */ |
Winson Chung | ac52f28 | 2017-03-30 14:44:52 -0700 | [diff] [blame] | 301 | oneway void setPipVisibility(boolean visible); |
Winson | ab21660 | 2016-08-09 14:05:20 -0700 | [diff] [blame] | 302 | |
Tracy Zhou | 4351308 | 2018-03-08 21:58:36 -0800 | [diff] [blame] | 303 | /** |
| 304 | * Called by System UI to notify of changes to the visibility and height of the shelf. |
| 305 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 306 | @UnsupportedAppUsage |
Tracy Zhou | 4351308 | 2018-03-08 21:58:36 -0800 | [diff] [blame] | 307 | void setShelfHeight(boolean visible, int shelfHeight); |
| 308 | |
| 309 | /** |
Matthew Ng | 64543e6 | 2018-02-28 17:35:10 -0800 | [diff] [blame] | 310 | * Called by System UI to enable or disable haptic feedback on the navigation bar buttons. |
| 311 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 312 | @UnsupportedAppUsage |
Matthew Ng | 64543e6 | 2018-02-28 17:35:10 -0800 | [diff] [blame] | 313 | void setNavBarVirtualKeyHapticFeedbackEnabled(boolean enabled); |
| 314 | |
Winson | ab21660 | 2016-08-09 14:05:20 -0700 | [diff] [blame] | 315 | /** |
Charles Chen | ea6e7f0 | 2018-11-19 21:37:45 +0800 | [diff] [blame] | 316 | * Device has a software navigation bar (separate from the status bar) on specific display. |
| 317 | * |
| 318 | * @param displayId the id of display to check if there is a software navigation bar. |
Daniel Sandler | 0c4ccff | 2011-10-19 16:39:14 -0400 | [diff] [blame] | 319 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 320 | @UnsupportedAppUsage |
Charles Chen | ea6e7f0 | 2018-11-19 21:37:45 +0800 | [diff] [blame] | 321 | boolean hasNavigationBar(int displayId); |
Jim Miller | 93c518e | 2012-01-17 15:55:31 -0800 | [diff] [blame] | 322 | |
| 323 | /** |
Tracy Zhou | 4351308 | 2018-03-08 21:58:36 -0800 | [diff] [blame] | 324 | * Get the position of the nav bar |
| 325 | */ |
Tiger Huang | 44c0455 | 2018-11-29 20:06:45 +0800 | [diff] [blame] | 326 | int getNavBarPosition(int displayId); |
Matthew Ng | a8f2426 | 2017-12-19 11:54:24 -0800 | [diff] [blame] | 327 | |
| 328 | /** |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 329 | * Lock the device immediately with the specified options (can be null). |
Jim Miller | 93c518e | 2012-01-17 15:55:31 -0800 | [diff] [blame] | 330 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 331 | @UnsupportedAppUsage |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 332 | void lockNow(in Bundle options); |
Svetoslav Ganov | c9c9a48 | 2012-07-16 08:46:07 -0700 | [diff] [blame] | 333 | |
| 334 | /** |
Jim Miller | bfec0a8 | 2012-11-05 20:05:22 -0800 | [diff] [blame] | 335 | * Device is in safe mode. |
| 336 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 337 | @UnsupportedAppUsage |
Jim Miller | bfec0a8 | 2012-11-05 20:05:22 -0800 | [diff] [blame] | 338 | boolean isSafeModeEnabled(); |
Jorim Jaggi | cff0acb | 2014-03-31 16:35:15 +0200 | [diff] [blame] | 339 | |
| 340 | /** |
| 341 | * Enables the screen if all conditions are met. |
| 342 | */ |
| 343 | void enableScreenIfNeeded(); |
Svetoslav | dd137a8 | 2014-04-10 12:48:07 -0700 | [diff] [blame] | 344 | |
| 345 | /** |
Svetoslav | 1376d60 | 2014-03-13 11:17:26 -0700 | [diff] [blame] | 346 | * Clears the frame statistics for a given window. |
| 347 | * |
| 348 | * @param token The window token. |
| 349 | * @return Whether the frame statistics were cleared. |
| 350 | */ |
| 351 | boolean clearWindowContentFrameStats(IBinder token); |
| 352 | |
| 353 | /** |
| 354 | * Gets the content frame statistics for a given window. |
| 355 | * |
| 356 | * @param token The window token. |
| 357 | * @return The frame statistics or null if the window does not exist. |
| 358 | */ |
| 359 | WindowContentFrameStats getWindowContentFrameStats(IBinder token); |
Jorim Jaggi | 61f39a7 | 2015-10-29 16:54:18 +0100 | [diff] [blame] | 360 | |
| 361 | /** |
| 362 | * @return the dock side the current docked stack is at; must be one of the |
| 363 | * WindowManagerGlobal.DOCKED_* values |
| 364 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 365 | @UnsupportedAppUsage |
Jorim Jaggi | 61f39a7 | 2015-10-29 16:54:18 +0100 | [diff] [blame] | 366 | int getDockedStackSide(); |
| 367 | |
| 368 | /** |
Jorim Jaggi | d47e7e1 | 2016-03-01 09:57:38 +0100 | [diff] [blame] | 369 | * Sets the region the user can touch the divider. This region will be excluded from the region |
| 370 | * which is used to cause a focus switch when dispatching touch. |
| 371 | */ |
| 372 | void setDockedStackDividerTouchRegion(in Rect touchableRegion); |
| 373 | |
| 374 | /** |
Jorim Jaggi | a6c934e | 2015-12-21 13:22:31 +0100 | [diff] [blame] | 375 | * Registers a listener that will be called when the dock divider changes its visibility or when |
| 376 | * the docked stack gets added/removed. |
Filip Gruszczynski | 64cdc14 | 2015-11-29 21:10:07 -0800 | [diff] [blame] | 377 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 378 | @UnsupportedAppUsage |
Jorim Jaggi | a6c934e | 2015-12-21 13:22:31 +0100 | [diff] [blame] | 379 | void registerDockedStackListener(IDockedStackListener listener); |
Jorim Jaggi | 5098159 | 2015-12-29 17:54:12 +0100 | [diff] [blame] | 380 | |
| 381 | /** |
Winson Chung | 655332c | 2016-10-31 13:14:28 -0700 | [diff] [blame] | 382 | * Registers a listener that will be called when the pinned stack state changes. |
| 383 | */ |
| 384 | void registerPinnedStackListener(int displayId, IPinnedStackListener listener); |
| 385 | |
| 386 | /** |
Jorim Jaggi | 5098159 | 2015-12-29 17:54:12 +0100 | [diff] [blame] | 387 | * Updates the dim layer used while resizing. |
| 388 | * |
| 389 | * @param visible Whether the dim layer should be visible. |
Wale Ogunwale | 6827856 | 2017-09-23 17:13:55 -0700 | [diff] [blame] | 390 | * @param targetWindowingMode The windowing mode of the stack the dim layer should be placed on. |
Jorim Jaggi | 5098159 | 2015-12-29 17:54:12 +0100 | [diff] [blame] | 391 | * @param alpha The translucency of the dim layer, between 0 and 1. |
| 392 | */ |
Wale Ogunwale | 6827856 | 2017-09-23 17:13:55 -0700 | [diff] [blame] | 393 | void setResizeDimLayer(boolean visible, int targetWindowingMode, float alpha); |
Clara Bayarri | 75e0979 | 2015-07-29 16:20:40 +0100 | [diff] [blame] | 394 | |
| 395 | /** |
| 396 | * Requests Keyboard Shortcuts from the displayed window. |
| 397 | * |
| 398 | * @param receiver The receiver to deliver the results to. |
| 399 | */ |
Clara Bayarri | fcd7e80 | 2016-03-10 12:58:18 +0000 | [diff] [blame] | 400 | void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId); |
Jorim Jaggi | c6c89a8 | 2016-01-28 17:48:21 -0800 | [diff] [blame] | 401 | |
| 402 | /** |
| 403 | * Retrieves the current stable insets from the primary display. |
| 404 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 405 | @UnsupportedAppUsage |
Winson Chung | 303c6b7 | 2016-10-24 17:12:49 -0700 | [diff] [blame] | 406 | void getStableInsets(int displayId, out Rect outInsets); |
Muyuan Li | 94ce94e | 2016-02-24 16:20:54 -0800 | [diff] [blame] | 407 | |
| 408 | /** |
Issei Suzuki | a5dbf52 | 2019-02-01 17:58:15 +0100 | [diff] [blame] | 409 | * Set the forwarded insets on the display. |
| 410 | * <p> |
| 411 | * This is only used in case a virtual display is displayed on another display that has insets, |
| 412 | * and the bounds of the virtual display is overlapping with the insets from the host display. |
| 413 | * In that case, the contents on the virtual display won't be placed over the forwarded insets. |
| 414 | * Only the owner of the display is permitted to set the forwarded insets on it. |
| 415 | */ |
| 416 | void setForwardedInsets(int displayId, in Insets insets); |
| 417 | |
| 418 | /** |
Muyuan Li | 94ce94e | 2016-02-24 16:20:54 -0800 | [diff] [blame] | 419 | * Register shortcut key. Shortcut code is packed as: |
| 420 | * (MetaState << Integer.SIZE) | KeyCode |
| 421 | * @hide |
| 422 | */ |
| 423 | void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber); |
Vladislav Kaznacheev | 0d50d86 | 2016-03-29 15:43:28 -0700 | [diff] [blame] | 424 | |
| 425 | /** |
Arthur Hung | 39134b2 | 2018-08-14 11:58:28 +0800 | [diff] [blame] | 426 | * Create an input consumer by name and display id. |
Vladislav Kaznacheev | 0d50d86 | 2016-03-29 15:43:28 -0700 | [diff] [blame] | 427 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 428 | @UnsupportedAppUsage |
Arthur Hung | 39134b2 | 2018-08-14 11:58:28 +0800 | [diff] [blame] | 429 | void createInputConsumer(IBinder token, String name, int displayId, |
| 430 | out InputChannel inputChannel); |
Vladislav Kaznacheev | 0d50d86 | 2016-03-29 15:43:28 -0700 | [diff] [blame] | 431 | |
| 432 | /** |
Arthur Hung | 39134b2 | 2018-08-14 11:58:28 +0800 | [diff] [blame] | 433 | * Destroy an input consumer by name and display id. |
| 434 | * This method will also dispose the input channels associated with that InputConsumer. |
Vladislav Kaznacheev | 0d50d86 | 2016-03-29 15:43:28 -0700 | [diff] [blame] | 435 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 436 | @UnsupportedAppUsage |
Arthur Hung | 39134b2 | 2018-08-14 11:58:28 +0800 | [diff] [blame] | 437 | boolean destroyInputConsumer(String name, int displayId); |
Albert Chaulk | 56162a0 | 2017-06-05 19:35:23 -0400 | [diff] [blame] | 438 | |
| 439 | /** |
| 440 | * Return the touch region for the current IME window, or an empty region if there is none. |
| 441 | */ |
| 442 | Region getCurrentImeTouchRegion(); |
Vishnu Nair | c961504 | 2018-01-09 07:23:31 -0800 | [diff] [blame] | 443 | |
| 444 | /** |
Adrian Roos | 962017e | 2018-11-27 15:11:46 +0100 | [diff] [blame] | 445 | * Registers an IDisplayFoldListener. |
| 446 | */ |
| 447 | void registerDisplayFoldListener(IDisplayFoldListener listener); |
| 448 | |
| 449 | /** |
| 450 | * Unregisters an IDisplayFoldListener. |
| 451 | */ |
| 452 | void unregisterDisplayFoldListener(IDisplayFoldListener listener); |
| 453 | |
| 454 | /** |
Vishnu Nair | c961504 | 2018-01-09 07:23:31 -0800 | [diff] [blame] | 455 | * Starts a window trace. |
| 456 | */ |
| 457 | void startWindowTrace(); |
| 458 | |
| 459 | /** |
| 460 | * Stops a window trace. |
| 461 | */ |
| 462 | void stopWindowTrace(); |
| 463 | |
| 464 | /** |
| 465 | * Returns true if window trace is enabled. |
| 466 | */ |
| 467 | boolean isWindowTraceEnabled(); |
Yoshiaki Naka | e1bdfc82 | 2017-09-15 15:24:34 +0900 | [diff] [blame] | 468 | |
| 469 | /** |
Jordan Liu | c022876 | 2018-07-13 11:39:42 -0700 | [diff] [blame] | 470 | * Requests that the WindowManager sends |
| 471 | * WindowManagerPolicyConstants#ACTION_USER_ACTIVITY_NOTIFICATION on the next user activity. |
Yoshiaki Naka | e1bdfc82 | 2017-09-15 15:24:34 +0900 | [diff] [blame] | 472 | */ |
| 473 | void requestUserActivityNotification(); |
Andrii Kulian | f0379de | 2018-03-14 16:24:07 -0700 | [diff] [blame] | 474 | |
| 475 | /** |
| 476 | * Notify WindowManager that it should not override the info in DisplayManager for the specified |
| 477 | * display. This can disable letter- or pillar-boxing applied in DisplayManager when the metrics |
| 478 | * of the logical display reported from WindowManager do not correspond to the metrics of the |
| 479 | * physical display it is based on. |
| 480 | * |
| 481 | * @param displayId The id of the display. |
| 482 | */ |
| 483 | void dontOverrideDisplayInfo(int displayId); |
Chilun | 8753ad3 | 2018-10-09 15:56:45 +0800 | [diff] [blame] | 484 | |
| 485 | /** |
| 486 | * Gets the windowing mode of the display. |
| 487 | * |
| 488 | * @param displayId The id of the display. |
| 489 | * @return {@link WindowConfiguration.WindowingMode} |
| 490 | */ |
| 491 | int getWindowingMode(int displayId); |
| 492 | |
| 493 | /** |
| 494 | * Sets the windowing mode of the display. |
| 495 | * |
| 496 | * @param displayId The id of the display. |
| 497 | * @param mode {@link WindowConfiguration.WindowingMode} |
| 498 | */ |
| 499 | void setWindowingMode(int displayId, int mode); |
| 500 | |
| 501 | /** |
| 502 | * Gets current remove content mode of the display. |
| 503 | * <p> |
| 504 | * What actions should be performed with the display's content when it is removed. Default |
| 505 | * behavior for public displays in this case is to move all activities to the primary display |
| 506 | * and make it focused. For private display is to destroy all activities. |
| 507 | * </p> |
| 508 | * |
| 509 | * @param displayId The id of the display. |
| 510 | * @return The remove content mode of the display. |
| 511 | * @see WindowManager#REMOVE_CONTENT_MODE_MOVE_TO_PRIMARY |
| 512 | * @see WindowManager#REMOVE_CONTENT_MODE_DESTROY |
| 513 | */ |
| 514 | int getRemoveContentMode(int displayId); |
| 515 | |
| 516 | /** |
| 517 | * Sets the remove content mode of the display. |
| 518 | * <p> |
| 519 | * This mode indicates what actions should be performed with the display's content when it is |
| 520 | * removed. |
| 521 | * </p> |
| 522 | * |
| 523 | * @param displayId The id of the display. |
| 524 | * @param mode Remove content mode. |
| 525 | * @see WindowManager#REMOVE_CONTENT_MODE_MOVE_TO_PRIMARY |
| 526 | * @see WindowManager#REMOVE_CONTENT_MODE_DESTROY |
| 527 | */ |
| 528 | void setRemoveContentMode(int displayId, int mode); |
| 529 | |
| 530 | /** |
| 531 | * Indicates that the display should show its content when non-secure keyguard is shown. |
| 532 | * <p> |
| 533 | * This flag identifies secondary displays that will continue showing content if keyguard can be |
| 534 | * dismissed without entering credentials. |
| 535 | * </p><p> |
| 536 | * An example of usage is a virtual display which content is displayed on external hardware |
| 537 | * display that is not visible to the system directly. |
| 538 | * </p> |
| 539 | * |
| 540 | * @param displayId The id of the display. |
| 541 | * @return {@code true} if the display should show its content when non-secure keyguard is |
| 542 | * shown. |
| 543 | * @see KeyguardManager#isDeviceSecure() |
| 544 | * @see KeyguardManager#isDeviceLocked() |
| 545 | */ |
| 546 | boolean shouldShowWithInsecureKeyguard(int displayId); |
| 547 | |
| 548 | /** |
| 549 | * Sets that the display should show its content when non-secure keyguard is shown. |
| 550 | * |
| 551 | * @param displayId The id of the display. |
| 552 | * @param shouldShow Indicates that the display should show its content when non-secure keyguard |
| 553 | * is shown. |
| 554 | * @see KeyguardManager#isDeviceSecure() |
| 555 | * @see KeyguardManager#isDeviceLocked() |
| 556 | */ |
| 557 | void setShouldShowWithInsecureKeyguard(int displayId, boolean shouldShow); |
| 558 | |
| 559 | /** |
| 560 | * Indicates the display should show system decors. |
| 561 | * <p> |
| 562 | * System decors include status bar, navigation bar, launcher. |
| 563 | * </p> |
| 564 | * |
| 565 | * @param displayId The id of the display. |
| 566 | * @return {@code true} if the display should show system decors. |
| 567 | */ |
| 568 | boolean shouldShowSystemDecors(int displayId); |
| 569 | |
| 570 | /** |
| 571 | * Sets that the display should show system decors. |
| 572 | * <p> |
| 573 | * System decors include status bar, navigation bar, launcher. |
| 574 | * </p> |
| 575 | * |
| 576 | * @param displayId The id of the display. |
| 577 | * @param shouldShow Indicates that the display should show system decors. |
| 578 | */ |
| 579 | void setShouldShowSystemDecors(int displayId, boolean shouldShow); |
| 580 | |
| 581 | /** |
| 582 | * Indicates that the display should show IME. |
| 583 | * |
| 584 | * @param displayId The id of the display. |
| 585 | * @return {@code true} if the display should show IME. |
| 586 | * @see KeyguardManager#isDeviceSecure() |
| 587 | * @see KeyguardManager#isDeviceLocked() |
| 588 | */ |
| 589 | boolean shouldShowIme(int displayId); |
| 590 | |
| 591 | /** |
| 592 | * Sets that the display should show IME. |
| 593 | * |
| 594 | * @param displayId The id of the display. |
| 595 | * @param shouldShow Indicates that the display should show IME. |
| 596 | * @see KeyguardManager#isDeviceSecure() |
| 597 | * @see KeyguardManager#isDeviceLocked() |
| 598 | */ |
| 599 | void setShouldShowIme(int displayId, boolean shouldShow); |
chaviw | ff2e7d8 | 2018-11-02 11:11:27 -0700 | [diff] [blame] | 600 | |
| 601 | /** |
| 602 | * Reparent the top layers for a display to the requested surfaceControl. The display that |
| 603 | * is going to be re-parented (the displayId passed in) needs to have been created by the same |
| 604 | * process that is requesting the re-parent. This is to ensure clients can't just re-parent |
| 605 | * display content info to any SurfaceControl, as this would be a security issue. |
| 606 | * |
| 607 | * @param displayId The id of the display. |
Robert Carr | 10584fa | 2019-01-14 15:55:19 -0800 | [diff] [blame] | 608 | * @param surfaceControlHandle The SurfaceControl that the top level layers for the |
chaviw | ff2e7d8 | 2018-11-02 11:11:27 -0700 | [diff] [blame] | 609 | * display should be re-parented to. |
| 610 | */ |
Robert Carr | 10584fa | 2019-01-14 15:55:19 -0800 | [diff] [blame] | 611 | void reparentDisplayContent(int displayId, in SurfaceControl sc); |
chaviw | 504715c | 2019-02-14 11:02:43 -0800 | [diff] [blame] | 612 | |
| 613 | /** |
| 614 | * Waits for transactions to get applied before injecting input. |
| 615 | * This includes waiting for the input windows to get sent to InputManager. |
| 616 | * |
| 617 | * This is needed for testing since the system add windows and injects input |
| 618 | * quick enough that the windows don't have time to get sent to InputManager. |
| 619 | */ |
| 620 | boolean injectInputAfterTransactionsApplied(in InputEvent ev, int mode); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 621 | } |