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 | |
Dianne Hackborn | 27eac1d | 2015-03-16 17:15:53 -0700 | [diff] [blame] | 19 | import com.android.internal.app.IAssistScreenshotReceiver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | import com.android.internal.view.IInputContext; |
| 21 | import com.android.internal.view.IInputMethodClient; |
| 22 | |
Dianne Hackborn | 2f0b175 | 2011-05-31 17:59:49 -0700 | [diff] [blame] | 23 | import android.content.res.CompatibilityInfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | import android.content.res.Configuration; |
Dianne Hackborn | 0aae2d4 | 2010-12-07 23:51:29 -0800 | [diff] [blame] | 25 | import android.graphics.Bitmap; |
Dianne Hackborn | ac8dea1 | 2011-04-20 18:18:51 -0700 | [diff] [blame] | 26 | import android.graphics.Point; |
Svetoslav Ganov | c9c9a48 | 2012-07-16 08:46:07 -0700 | [diff] [blame] | 27 | import android.graphics.Rect; |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 28 | import android.os.Bundle; |
Dianne Hackborn | 38e29a6 | 2011-09-18 14:43:08 -0700 | [diff] [blame] | 29 | import android.os.IRemoteCallback; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.view.IApplicationToken; |
| 31 | import android.view.IOnKeyguardExitResult; |
| 32 | import android.view.IRotationWatcher; |
| 33 | import android.view.IWindowSession; |
Dianne Hackborn | eb94fa7 | 2014-06-03 17:48:12 -0700 | [diff] [blame] | 34 | import android.view.IWindowSessionCallback; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 35 | import android.view.KeyEvent; |
Jeff Brown | 6ec402b | 2010-07-28 15:48:59 -0700 | [diff] [blame] | 36 | import android.view.InputEvent; |
Svetoslav Ganov | 152e9bb | 2012-10-12 20:15:29 -0700 | [diff] [blame] | 37 | import android.view.MagnificationSpec; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 38 | import android.view.MotionEvent; |
Jeff Brown | a41ca77 | 2010-08-11 14:46:32 -0700 | [diff] [blame] | 39 | import android.view.InputChannel; |
Jeff Brown | 8d60866 | 2010-08-30 03:02:23 -0700 | [diff] [blame] | 40 | import android.view.InputDevice; |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 41 | import android.view.IInputFilter; |
Svetoslav | 1376d60 | 2014-03-13 11:17:26 -0700 | [diff] [blame] | 42 | import android.view.WindowContentFrameStats; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | |
| 44 | /** |
| 45 | * System private interface to the window manager. |
| 46 | * |
| 47 | * {@hide} |
| 48 | */ |
| 49 | interface IWindowManager |
| 50 | { |
| 51 | /** |
| 52 | * ===== NOTICE ===== |
| 53 | * The first three methods must remain the first three methods. Scripts |
| 54 | * and tools rely on their transaction number to work properly. |
| 55 | */ |
| 56 | // This is used for debugging |
| 57 | boolean startViewServer(int port); // Transaction #1 |
| 58 | boolean stopViewServer(); // Transaction #2 |
| 59 | boolean isViewServerRunning(); // Transaction #3 |
| 60 | |
Dianne Hackborn | eb94fa7 | 2014-06-03 17:48:12 -0700 | [diff] [blame] | 61 | IWindowSession openSession(in IWindowSessionCallback callback, in IInputMethodClient client, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | in IInputContext inputContext); |
| 63 | boolean inputMethodClientHasFocus(IInputMethodClient client); |
Dianne Hackborn | ac8dea1 | 2011-04-20 18:18:51 -0700 | [diff] [blame] | 64 | |
Dianne Hackborn | 672cf45 | 2013-03-26 15:24:24 -0700 | [diff] [blame] | 65 | void getInitialDisplaySize(int displayId, out Point size); |
| 66 | void getBaseDisplaySize(int displayId, out Point size); |
Jeff Brown | 43aa159 | 2012-09-10 17:36:31 -0700 | [diff] [blame] | 67 | void setForcedDisplaySize(int displayId, int width, int height); |
Craig Mautner | 59c0097 | 2012-07-30 12:10:24 -0700 | [diff] [blame] | 68 | void clearForcedDisplaySize(int displayId); |
Dianne Hackborn | 672cf45 | 2013-03-26 15:24:24 -0700 | [diff] [blame] | 69 | int getInitialDisplayDensity(int displayId); |
| 70 | int getBaseDisplayDensity(int displayId); |
Dianne Hackborn | dde331c | 2012-08-03 14:01:57 -0700 | [diff] [blame] | 71 | void setForcedDisplayDensity(int displayId, int density); |
| 72 | void clearForcedDisplayDensity(int displayId); |
Jeff Brown | d46747a | 2015-04-15 19:02:36 -0700 | [diff] [blame] | 73 | void setForcedDisplayScalingMode(int displayId, int mode); // 0 = auto, 1 = disable |
Dianne Hackborn | 7916ac6 | 2011-05-16 20:45:48 -0700 | [diff] [blame] | 74 | |
Dianne Hackborn | c652de8 | 2013-02-15 16:32:56 -0800 | [diff] [blame] | 75 | void setOverscan(int displayId, int left, int top, int right, int bottom); |
| 76 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 77 | // These can only be called when holding the MANAGE_APP_TOKENS permission. |
| 78 | void pauseKeyDispatching(IBinder token); |
| 79 | void resumeKeyDispatching(IBinder token); |
| 80 | void setEventDispatching(boolean enabled); |
Dianne Hackborn | e4fbd62 | 2009-03-27 18:09:16 -0700 | [diff] [blame] | 81 | void addWindowToken(IBinder token, int type); |
| 82 | void removeWindowToken(IBinder token); |
Craig Mautner | c00204b | 2013-03-05 15:02:14 -0800 | [diff] [blame] | 83 | void addAppToken(int addPos, IApplicationToken token, int groupId, int stackId, |
Craig Mautner | 5d9f547 | 2013-11-12 14:02:52 -0800 | [diff] [blame] | 84 | int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int userId, |
Craig Mautner | bb74246 | 2014-07-07 15:28:55 -0700 | [diff] [blame] | 85 | int configChanges, boolean voiceInteraction, boolean launchTaskBehind); |
Craig Mautner | 83162a9 | 2015-01-26 14:43:30 -0800 | [diff] [blame] | 86 | void setAppTask(IBinder token, int taskId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 87 | void setAppOrientation(IApplicationToken token, int requestedOrientation); |
| 88 | int getAppOrientation(IApplicationToken token); |
| 89 | void setFocusedApp(IBinder token, boolean moveFocusNow); |
Dianne Hackborn | 7da6ac3 | 2010-12-09 19:22:04 -0800 | [diff] [blame] | 90 | void prepareAppTransition(int transit, boolean alwaysKeepCurrent); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 91 | int getPendingAppTransition(); |
Dianne Hackborn | 8437587 | 2012-06-01 19:03:50 -0700 | [diff] [blame] | 92 | void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim, |
| 93 | IRemoteCallback startedCallback); |
Dianne Hackborn | eabfb3a | 2012-04-16 16:28:22 -0700 | [diff] [blame] | 94 | void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, |
| 95 | int startHeight); |
Chet Haase | 10e23ab | 2015-02-11 15:08:38 -0800 | [diff] [blame] | 96 | void overridePendingAppTransitionClipReveal(int startX, int startY, |
| 97 | int startWidth, int startHeight); |
Dianne Hackborn | 8078d8c | 2012-03-20 11:11:26 -0700 | [diff] [blame] | 98 | void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY, |
Michael Jurka | 832cb22 | 2012-04-13 09:32:47 -0700 | [diff] [blame] | 99 | IRemoteCallback startedCallback, boolean scaleUp); |
Winson Chung | a4ccb86 | 2014-08-22 15:26:27 -0700 | [diff] [blame] | 100 | void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX, |
Winson Chung | 2e7f3bd | 2014-09-05 13:17:22 +0200 | [diff] [blame] | 101 | int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback, |
| 102 | boolean scaleUp); |
Winson Chung | 044d529 | 2014-11-06 11:05:19 -0800 | [diff] [blame] | 103 | void overridePendingAppTransitionInPlace(String packageName, int anim); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 104 | void executeAppTransition(); |
| 105 | void setAppStartingWindow(IBinder token, String pkg, int theme, |
Dianne Hackborn | 2f0b175 | 2011-05-31 17:59:49 -0700 | [diff] [blame] | 106 | in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, |
Adam Powell | 04fe6eb | 2013-05-31 14:39:48 -0700 | [diff] [blame] | 107 | int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 108 | void setAppWillBeHidden(IBinder token); |
| 109 | void setAppVisibility(IBinder token, boolean visible); |
| 110 | void startAppFreezingScreen(IBinder token, int configChanges); |
| 111 | void stopAppFreezingScreen(IBinder token, boolean force); |
| 112 | void removeAppToken(IBinder token); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 113 | |
Dianne Hackborn | e36d6e2 | 2010-02-17 19:46:25 -0800 | [diff] [blame] | 114 | // Re-evaluate the current orientation from the caller's state. |
| 115 | // If there is a change, the new Configuration is returned and the |
| 116 | // caller must call setNewConfiguration() sometime later. |
| 117 | Configuration updateOrientationFromAppTokens(in Configuration currentConfig, |
| 118 | IBinder freezeThisOneIfNeeded); |
| 119 | void setNewConfiguration(in Configuration config); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 120 | |
Dianne Hackborn | 9d9ece3 | 2012-09-10 15:33:52 -0700 | [diff] [blame] | 121 | void startFreezingScreen(int exitAnim, int enterAnim); |
| 122 | void stopFreezingScreen(); |
| 123 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 124 | // these require DISABLE_KEYGUARD permission |
| 125 | void disableKeyguard(IBinder token, String tag); |
| 126 | void reenableKeyguard(IBinder token); |
| 127 | void exitKeyguardSecurely(IOnKeyguardExitResult callback); |
Mike Lockwood | 520d8bc | 2011-02-18 13:23:13 -0500 | [diff] [blame] | 128 | boolean isKeyguardLocked(); |
| 129 | boolean isKeyguardSecure(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 130 | boolean inKeyguardRestrictedInputMode(); |
Dianne Hackborn | 90c52de | 2011-09-23 12:57:44 -0700 | [diff] [blame] | 131 | void dismissKeyguard(); |
Jorim Jaggi | 84a3e7a | 2014-08-13 17:58:58 +0200 | [diff] [blame] | 132 | void keyguardGoingAway(boolean disableWindowAnimations, |
| 133 | boolean keyguardGoingToNotificationShade); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 134 | |
Dianne Hackborn | ffa4248 | 2009-09-23 22:20:11 -0700 | [diff] [blame] | 135 | void closeSystemDialogs(String reason); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 136 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 137 | // These can only be called with the SET_ANIMATON_SCALE permission. |
| 138 | float getAnimationScale(int which); |
| 139 | float[] getAnimationScales(); |
| 140 | void setAnimationScale(int which, float scale); |
| 141 | void setAnimationScales(in float[] scales); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 142 | |
Dianne Hackborn | eb94fa7 | 2014-06-03 17:48:12 -0700 | [diff] [blame] | 143 | float getCurrentAnimatorScale(); |
| 144 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 145 | // For testing |
| 146 | void setInTouchMode(boolean showFocus); |
Brad Fitzpatrick | 6804433 | 2010-11-22 18:19:48 -0800 | [diff] [blame] | 147 | |
| 148 | // For StrictMode flashing a red border on violations from the UI |
| 149 | // thread. The uid/pid is implicit from the Binder call, and the Window |
| 150 | // Manager uses that to determine whether or not the red border should |
| 151 | // actually be shown. (it will be ignored that pid doesn't have windows |
| 152 | // on screen) |
| 153 | void showStrictModeViolation(boolean on); |
| 154 | |
Brad Fitzpatrick | c1a968a | 2010-11-24 08:56:40 -0800 | [diff] [blame] | 155 | // Proxy to set the system property for whether the flashing |
| 156 | // should be enabled. The 'enabled' value is null or blank for |
| 157 | // the system default (differs per build variant) or any valid |
| 158 | // boolean string as parsed by SystemProperties.getBoolean(). |
| 159 | void setStrictModeVisualIndicatorPreference(String enabled); |
| 160 | |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 161 | /** |
Sander Alewijnse | a87863a | 2014-07-29 12:01:38 +0100 | [diff] [blame] | 162 | * Set whether screen capture is disabled for all windows of a specific user |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 163 | */ |
Sander Alewijnse | a87863a | 2014-07-29 12:01:38 +0100 | [diff] [blame] | 164 | void setScreenCaptureDisabled(int userId, boolean disabled); |
Sander Alewijnse | d2a1eec | 2014-07-09 12:57:05 +0100 | [diff] [blame] | 165 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | // These can only be called with the SET_ORIENTATION permission. |
| 167 | /** |
Jeff Brown | 01a98dd | 2011-09-20 15:08:29 -0700 | [diff] [blame] | 168 | * Update the current screen rotation based on the current state of |
| 169 | * the world. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 170 | * @param alwaysSendConfiguration Flag to force a new configuration to |
| 171 | * be evaluated. This can be used when there are other parameters in |
| 172 | * configuration that are changing. |
Dianne Hackborn | f87d196 | 2012-04-04 12:48:24 -0700 | [diff] [blame] | 173 | * @param forceRelayout If true, the window manager will always do a relayout |
| 174 | * 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] | 175 | */ |
Dianne Hackborn | f87d196 | 2012-04-04 12:48:24 -0700 | [diff] [blame] | 176 | void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 177 | |
| 178 | /** |
| 179 | * Retrieve the current screen orientation, constants as per |
| 180 | * {@link android.view.Surface}. |
| 181 | */ |
| 182 | int getRotation(); |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 183 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 184 | /** |
| 185 | * Watch the rotation of the screen. Returns the current rotation, |
| 186 | * calls back when it changes. |
| 187 | */ |
| 188 | int watchRotation(IRotationWatcher watcher); |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 189 | |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 190 | /** |
Brian Colonna | b1b9a8a | 2013-03-29 11:52:42 -0400 | [diff] [blame] | 191 | * Remove a rotation watcher set using watchRotation. |
| 192 | * @hide |
| 193 | */ |
| 194 | void removeRotationWatcher(IRotationWatcher watcher); |
| 195 | |
| 196 | /** |
Adam Powell | dfee59a | 2011-08-05 20:48:30 -0700 | [diff] [blame] | 197 | * Determine the preferred edge of the screen to pin the compact options menu against. |
| 198 | * @return a Gravity value for the options menu panel |
| 199 | * @hide |
| 200 | */ |
| 201 | int getPreferredOptionsPanelGravity(); |
| 202 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 203 | /** |
| 204 | * Lock the device orientation to the specified rotation, or to the |
| 205 | * current rotation if -1. Sensor input will be ignored until |
| 206 | * thawRotation() is called. |
| 207 | * @hide |
| 208 | */ |
| 209 | void freezeRotation(int rotation); |
Daniel Sandler | b73617d | 2010-08-17 00:41:00 -0400 | [diff] [blame] | 210 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 211 | /** |
| 212 | * Release the orientation lock imposed by freezeRotation(). |
| 213 | * @hide |
| 214 | */ |
| 215 | void thawRotation(); |
Dianne Hackborn | 0aae2d4 | 2010-12-07 23:51:29 -0800 | [diff] [blame] | 216 | |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 217 | /** |
Svetoslav | 8e3feb1 | 2014-02-24 13:46:47 -0800 | [diff] [blame] | 218 | * Gets whether the rotation is frozen. |
Svetoslav Ganov | 80943d8 | 2013-01-02 10:25:37 -0800 | [diff] [blame] | 219 | * |
| 220 | * @return Whether the rotation is frozen. |
| 221 | */ |
| 222 | boolean isRotationFrozen(); |
| 223 | |
| 224 | /** |
Dianne Hackborn | 27eac1d | 2015-03-16 17:15:53 -0700 | [diff] [blame] | 225 | * Used only for assist -- request a screenshot of the current application. |
| 226 | */ |
| 227 | boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver); |
| 228 | |
| 229 | /** |
Jim Miller | 4eeb4f6 | 2012-11-08 00:04:29 -0800 | [diff] [blame] | 230 | * Create a screenshot of the applications currently displayed. |
| 231 | */ |
Dianne Hackborn | 27eac1d | 2015-03-16 17:15:53 -0700 | [diff] [blame] | 232 | Bitmap screenshotApplications(IBinder appToken, int displayId, int maxWidth, int maxHeight); |
Joe Onorato | 664644d | 2011-01-23 17:53:23 -0800 | [diff] [blame] | 233 | |
| 234 | /** |
| 235 | * Called by the status bar to notify Views of changes to System UI visiblity. |
| 236 | */ |
John Spurlock | e7c2857 | 2013-10-29 14:23:51 -0400 | [diff] [blame] | 237 | oneway void statusBarVisibilityChanged(int visibility); |
Jeff Brown | 1a84fd1 | 2011-06-02 01:26:32 -0700 | [diff] [blame] | 238 | |
| 239 | /** |
Daniel Sandler | 0c4ccff | 2011-10-19 16:39:14 -0400 | [diff] [blame] | 240 | * Device has a software navigation bar (separate from the status bar). |
| 241 | */ |
| 242 | boolean hasNavigationBar(); |
Jim Miller | 93c518e | 2012-01-17 15:55:31 -0800 | [diff] [blame] | 243 | |
| 244 | /** |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 245 | * Lock the device immediately with the specified options (can be null). |
Jim Miller | 93c518e | 2012-01-17 15:55:31 -0800 | [diff] [blame] | 246 | */ |
Adam Cohen | f752202 | 2012-10-03 20:03:18 -0700 | [diff] [blame] | 247 | void lockNow(in Bundle options); |
Svetoslav Ganov | c9c9a48 | 2012-07-16 08:46:07 -0700 | [diff] [blame] | 248 | |
| 249 | /** |
Jim Miller | bfec0a8 | 2012-11-05 20:05:22 -0800 | [diff] [blame] | 250 | * Device is in safe mode. |
| 251 | */ |
| 252 | boolean isSafeModeEnabled(); |
Jorim Jaggi | cff0acb | 2014-03-31 16:35:15 +0200 | [diff] [blame] | 253 | |
| 254 | /** |
| 255 | * Enables the screen if all conditions are met. |
| 256 | */ |
| 257 | void enableScreenIfNeeded(); |
Svetoslav | dd137a8 | 2014-04-10 12:48:07 -0700 | [diff] [blame] | 258 | |
| 259 | /** |
Svetoslav | 1376d60 | 2014-03-13 11:17:26 -0700 | [diff] [blame] | 260 | * Clears the frame statistics for a given window. |
| 261 | * |
| 262 | * @param token The window token. |
| 263 | * @return Whether the frame statistics were cleared. |
| 264 | */ |
| 265 | boolean clearWindowContentFrameStats(IBinder token); |
| 266 | |
| 267 | /** |
| 268 | * Gets the content frame statistics for a given window. |
| 269 | * |
| 270 | * @param token The window token. |
| 271 | * @return The frame statistics or null if the window does not exist. |
| 272 | */ |
| 273 | WindowContentFrameStats getWindowContentFrameStats(IBinder token); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 274 | } |