Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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 |
| 14 | * limitations under the License |
| 15 | */ |
| 16 | |
| 17 | package com.android.server.wm; |
| 18 | |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 19 | import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW; |
| 20 | import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW; |
| 21 | import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY; |
| 22 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL; |
| 23 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; |
| 24 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA; |
| 25 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; |
| 26 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; |
| 27 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL; |
| 28 | import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS; |
| 29 | import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY; |
| 30 | import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; |
| 31 | import static android.view.WindowManager.LayoutParams.TYPE_DRAG; |
| 32 | import static android.view.WindowManager.LayoutParams.TYPE_DREAM; |
| 33 | import static android.view.WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; |
| 34 | import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; |
| 35 | import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; |
| 36 | import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 37 | import static android.view.WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY; |
| 38 | import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; |
| 39 | import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; |
| 40 | import static android.view.WindowManager.LayoutParams.TYPE_PHONE; |
| 41 | import static android.view.WindowManager.LayoutParams.TYPE_POINTER; |
Wale Ogunwale | 5b6714c | 2016-11-01 20:54:46 -0700 | [diff] [blame] | 42 | import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame^] | 43 | import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE; |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 44 | import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; |
| 45 | import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG; |
| 46 | import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT; |
| 47 | import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR; |
| 48 | import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; |
| 49 | import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; |
| 50 | import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL; |
| 51 | import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL; |
| 52 | import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; |
| 53 | import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG; |
| 54 | import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; |
| 55 | import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY; |
| 56 | import static android.view.WindowManager.LayoutParams.TYPE_TOAST; |
| 57 | import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION; |
| 58 | import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING; |
| 59 | import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY; |
| 60 | import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; |
Wale Ogunwale | cfca258 | 2016-10-19 09:53:25 -0700 | [diff] [blame] | 61 | import static org.mockito.Mockito.mock; |
| 62 | |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame^] | 63 | import android.annotation.Nullable; |
| 64 | import android.content.Context; |
| 65 | import android.content.res.CompatibilityInfo; |
| 66 | import android.content.res.Configuration; |
| 67 | import android.graphics.Rect; |
| 68 | import android.os.Bundle; |
| 69 | import android.os.IBinder; |
| 70 | import android.os.RemoteException; |
| 71 | import android.util.Log; |
| 72 | import android.view.Display; |
| 73 | import android.view.IWindowManager; |
| 74 | import android.view.KeyEvent; |
| 75 | import android.view.WindowManager; |
| 76 | import android.view.WindowManagerPolicy; |
| 77 | import android.view.animation.Animation; |
| 78 | |
| 79 | import com.android.internal.policy.IKeyguardDismissCallback; |
| 80 | import com.android.internal.policy.IShortcutService; |
| 81 | import com.android.server.input.InputManagerService; |
| 82 | |
| 83 | import java.io.PrintWriter; |
| 84 | |
Wale Ogunwale | cfca258 | 2016-10-19 09:53:25 -0700 | [diff] [blame] | 85 | class TestWindowManagerPolicy implements WindowManagerPolicy { |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 86 | private static final String TAG = "TestWindowManagerPolicy"; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 87 | |
Wale Ogunwale | 5136249 | 2016-09-08 17:49:17 -0700 | [diff] [blame] | 88 | private static WindowManagerService sWm = null; |
| 89 | |
| 90 | static synchronized WindowManagerService getWindowManagerService(Context context) { |
| 91 | if (sWm == null) { |
| 92 | // We only want to do this once for the test process as we don't want WM to try to |
| 93 | // register a bunch of local services again. |
Wale Ogunwale | cfca258 | 2016-10-19 09:53:25 -0700 | [diff] [blame] | 94 | sWm = WindowManagerService.main(context, mock(InputManagerService.class), true, false, |
| 95 | false, new TestWindowManagerPolicy()); |
Wale Ogunwale | 5136249 | 2016-09-08 17:49:17 -0700 | [diff] [blame] | 96 | } |
| 97 | return sWm; |
| 98 | } |
| 99 | |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 100 | @Override |
| 101 | public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver) |
| 102 | throws RemoteException { |
| 103 | |
| 104 | } |
| 105 | |
| 106 | @Override |
| 107 | public void init(Context context, IWindowManager windowManager, |
| 108 | WindowManagerFuncs windowManagerFuncs) { |
| 109 | |
| 110 | } |
| 111 | |
| 112 | @Override |
| 113 | public boolean isDefaultOrientationForced() { |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | @Override |
| 118 | public void setInitialDisplaySize(Display display, int width, int height, int density) { |
| 119 | |
| 120 | } |
| 121 | |
| 122 | @Override |
| 123 | public void setDisplayOverscan(Display display, int left, int top, int right, int bottom) { |
| 124 | |
| 125 | } |
| 126 | |
| 127 | @Override |
| 128 | public int checkAddPermission(WindowManager.LayoutParams attrs, int[] outAppOp) { |
| 129 | return 0; |
| 130 | } |
| 131 | |
| 132 | @Override |
| 133 | public boolean checkShowToOwnerOnly(WindowManager.LayoutParams attrs) { |
| 134 | return false; |
| 135 | } |
| 136 | |
| 137 | @Override |
| 138 | public void adjustWindowParamsLw(WindowManager.LayoutParams attrs) { |
| 139 | |
| 140 | } |
| 141 | |
| 142 | @Override |
| 143 | public void adjustConfigurationLw(Configuration config, int keyboardPresence, |
| 144 | int navigationPresence) { |
| 145 | |
| 146 | } |
| 147 | |
| 148 | @Override |
| 149 | public int windowTypeToLayerLw(int type) { |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 150 | // TODO: figure-out a good way to keep this in-sync with PhoneWindowManager...sigh! |
| 151 | if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) { |
| 152 | return 2; |
| 153 | } |
| 154 | switch (type) { |
Wale Ogunwale | 5b6714c | 2016-11-01 20:54:46 -0700 | [diff] [blame] | 155 | case TYPE_PRESENTATION: |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 156 | case TYPE_PRIVATE_PRESENTATION: |
| 157 | return 2; |
| 158 | case TYPE_WALLPAPER: |
| 159 | // wallpaper is at the bottom, though the window manager may move it. |
| 160 | return 2; |
| 161 | case TYPE_DOCK_DIVIDER: |
| 162 | return 2; |
| 163 | case TYPE_QS_DIALOG: |
| 164 | return 2; |
| 165 | case TYPE_PHONE: |
| 166 | return 3; |
| 167 | case TYPE_SEARCH_BAR: |
| 168 | case TYPE_VOICE_INTERACTION_STARTING: |
| 169 | return 4; |
| 170 | case TYPE_VOICE_INTERACTION: |
| 171 | // voice interaction layer is almost immediately above apps. |
| 172 | return 5; |
| 173 | case TYPE_INPUT_CONSUMER: |
| 174 | return 6; |
| 175 | case TYPE_SYSTEM_DIALOG: |
| 176 | return 7; |
| 177 | case TYPE_TOAST: |
| 178 | // toasts and the plugged-in battery thing |
| 179 | return 8; |
| 180 | case TYPE_PRIORITY_PHONE: |
| 181 | // SIM errors and unlock. Not sure if this really should be in a high layer. |
| 182 | return 9; |
| 183 | case TYPE_DREAM: |
| 184 | // used for Dreams (screensavers with TYPE_DREAM windows) |
| 185 | return 10; |
| 186 | case TYPE_SYSTEM_ALERT: |
| 187 | // like the ANR / app crashed dialogs |
| 188 | return 11; |
| 189 | case TYPE_INPUT_METHOD: |
| 190 | // on-screen keyboards and other such input method user interfaces go here. |
| 191 | return 12; |
| 192 | case TYPE_INPUT_METHOD_DIALOG: |
| 193 | // on-screen keyboards and other such input method user interfaces go here. |
| 194 | return 13; |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 195 | case TYPE_STATUS_BAR_SUB_PANEL: |
| 196 | return 15; |
| 197 | case TYPE_STATUS_BAR: |
| 198 | return 16; |
| 199 | case TYPE_STATUS_BAR_PANEL: |
| 200 | return 17; |
| 201 | case TYPE_KEYGUARD_DIALOG: |
| 202 | return 18; |
| 203 | case TYPE_VOLUME_OVERLAY: |
| 204 | // the on-screen volume indicator and controller shown when the user |
| 205 | // changes the device volume |
| 206 | return 19; |
| 207 | case TYPE_SYSTEM_OVERLAY: |
| 208 | // the on-screen volume indicator and controller shown when the user |
| 209 | // changes the device volume |
| 210 | return 20; |
| 211 | case TYPE_NAVIGATION_BAR: |
| 212 | // the navigation bar, if available, shows atop most things |
| 213 | return 21; |
| 214 | case TYPE_NAVIGATION_BAR_PANEL: |
| 215 | // some panels (e.g. search) need to show on top of the navigation bar |
| 216 | return 22; |
| 217 | case TYPE_SCREENSHOT: |
| 218 | // screenshot selection layer shouldn't go above system error, but it should cover |
| 219 | // navigation bars at the very least. |
| 220 | return 23; |
| 221 | case TYPE_SYSTEM_ERROR: |
| 222 | // system-level error dialogs |
| 223 | return 24; |
| 224 | case TYPE_MAGNIFICATION_OVERLAY: |
| 225 | // used to highlight the magnified portion of a display |
| 226 | return 25; |
| 227 | case TYPE_DISPLAY_OVERLAY: |
| 228 | // used to simulate secondary display devices |
| 229 | return 26; |
| 230 | case TYPE_DRAG: |
| 231 | // the drag layer: input for drag-and-drop is associated with this window, |
| 232 | // which sits above all other focusable windows |
| 233 | return 27; |
| 234 | case TYPE_ACCESSIBILITY_OVERLAY: |
| 235 | // overlay put by accessibility services to intercept user interaction |
| 236 | return 28; |
| 237 | case TYPE_SECURE_SYSTEM_OVERLAY: |
| 238 | return 29; |
| 239 | case TYPE_BOOT_PROGRESS: |
| 240 | return 30; |
| 241 | case TYPE_POINTER: |
| 242 | // the (mouse) pointer layer |
| 243 | return 31; |
| 244 | } |
| 245 | Log.e(TAG, "Unknown window type: " + type); |
| 246 | return 2; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | @Override |
| 250 | public int subWindowTypeToLayerLw(int type) { |
Wale Ogunwale | adde52e | 2016-07-16 13:11:55 -0700 | [diff] [blame] | 251 | // TODO: figure-out a good way to keep this in-sync with PhoneWindowManager... |
| 252 | switch (type) { |
| 253 | case TYPE_APPLICATION_PANEL: |
| 254 | case TYPE_APPLICATION_ATTACHED_DIALOG: |
| 255 | return 1; |
| 256 | case TYPE_APPLICATION_MEDIA: |
| 257 | return -2; |
| 258 | case TYPE_APPLICATION_MEDIA_OVERLAY: |
| 259 | return -1; |
| 260 | case TYPE_APPLICATION_SUB_PANEL: |
| 261 | return 2; |
| 262 | case TYPE_APPLICATION_ABOVE_SUB_PANEL: |
| 263 | return 3; |
| 264 | } |
| 265 | Log.e(TAG, "Unknown sub-window type: " + type); |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 266 | return 0; |
| 267 | } |
| 268 | |
| 269 | @Override |
| 270 | public int getMaxWallpaperLayer() { |
| 271 | return 0; |
| 272 | } |
| 273 | |
| 274 | @Override |
Andrii Kulian | db8e106 | 2016-11-15 18:30:27 -0800 | [diff] [blame] | 275 | public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode, |
| 276 | int displayId) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 277 | return 0; |
| 278 | } |
| 279 | |
| 280 | @Override |
Andrii Kulian | db8e106 | 2016-11-15 18:30:27 -0800 | [diff] [blame] | 281 | public int getNonDecorDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode, |
| 282 | int displayId) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 283 | return 0; |
| 284 | } |
| 285 | |
| 286 | @Override |
Andrii Kulian | db8e106 | 2016-11-15 18:30:27 -0800 | [diff] [blame] | 287 | public int getConfigDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode, |
| 288 | int displayId) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 289 | return 0; |
| 290 | } |
| 291 | |
| 292 | @Override |
Andrii Kulian | db8e106 | 2016-11-15 18:30:27 -0800 | [diff] [blame] | 293 | public int getConfigDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode, |
| 294 | int displayId) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 295 | return 0; |
| 296 | } |
| 297 | |
| 298 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 299 | public boolean isKeyguardHostWindow(WindowManager.LayoutParams attrs) { |
| 300 | return false; |
| 301 | } |
| 302 | |
| 303 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 304 | public boolean canBeHiddenByKeyguardLw(WindowState win) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 305 | return false; |
| 306 | } |
| 307 | |
| 308 | @Override |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame^] | 309 | public StartingSurface addSplashScreen(IBinder appToken, String packageName, int theme, |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 310 | CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, |
| 311 | int logo, int windowFlags, Configuration overrideConfig) { |
| 312 | return null; |
| 313 | } |
| 314 | |
| 315 | @Override |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame^] | 316 | public void removeSplashScreen(IBinder appToken, StartingSurface surface) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 317 | |
| 318 | } |
| 319 | |
| 320 | @Override |
| 321 | public int prepareAddWindowLw(WindowState win, |
| 322 | WindowManager.LayoutParams attrs) { |
| 323 | return 0; |
| 324 | } |
| 325 | |
| 326 | @Override |
| 327 | public void removeWindowLw(WindowState win) { |
| 328 | |
| 329 | } |
| 330 | |
| 331 | @Override |
| 332 | public int selectAnimationLw(WindowState win, int transit) { |
| 333 | return 0; |
| 334 | } |
| 335 | |
| 336 | @Override |
| 337 | public void selectRotationAnimationLw(int[] anim) { |
| 338 | |
| 339 | } |
| 340 | |
| 341 | @Override |
| 342 | public boolean validateRotationAnimationLw(int exitAnimId, int enterAnimId, |
| 343 | boolean forceDefault) { |
| 344 | return false; |
| 345 | } |
| 346 | |
| 347 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 348 | public Animation createHiddenByKeyguardExit(boolean onWallpaper, |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 349 | boolean goingToNotificationShade) { |
| 350 | return null; |
| 351 | } |
| 352 | |
| 353 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 354 | public Animation createKeyguardWallpaperExit(boolean goingToNotificationShade) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 355 | return null; |
| 356 | } |
| 357 | |
| 358 | @Override |
| 359 | public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { |
| 360 | return 0; |
| 361 | } |
| 362 | |
| 363 | @Override |
| 364 | public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags) { |
| 365 | return 0; |
| 366 | } |
| 367 | |
| 368 | @Override |
| 369 | public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, |
| 370 | int policyFlags) { |
| 371 | return 0; |
| 372 | } |
| 373 | |
| 374 | @Override |
| 375 | public KeyEvent dispatchUnhandledKey(WindowState win, KeyEvent event, |
| 376 | int policyFlags) { |
| 377 | return null; |
| 378 | } |
| 379 | |
| 380 | @Override |
| 381 | public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight, |
| 382 | int displayRotation, int uiMode) { |
| 383 | |
| 384 | } |
| 385 | |
| 386 | @Override |
| 387 | public int getSystemDecorLayerLw() { |
| 388 | return 0; |
| 389 | } |
| 390 | |
| 391 | @Override |
| 392 | public void getContentRectLw(Rect r) { |
| 393 | |
| 394 | } |
| 395 | |
| 396 | @Override |
| 397 | public void layoutWindowLw(WindowState win, |
| 398 | WindowState attached) { |
| 399 | |
| 400 | } |
| 401 | |
| 402 | @Override |
| 403 | public boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, |
| 404 | int displayRotation, int displayWidth, int displayHeight, Rect outContentInsets, |
| 405 | Rect outStableInsets, Rect outOutsets) { |
| 406 | return false; |
| 407 | } |
| 408 | |
| 409 | @Override |
| 410 | public void finishLayoutLw() { |
| 411 | |
| 412 | } |
| 413 | |
| 414 | @Override |
| 415 | public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) { |
| 416 | |
| 417 | } |
| 418 | |
| 419 | @Override |
| 420 | public void applyPostLayoutPolicyLw(WindowState win, |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 421 | WindowManager.LayoutParams attrs, WindowState attached, WindowState imeTarget) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | @Override |
| 425 | public int finishPostLayoutPolicyLw() { |
| 426 | return 0; |
| 427 | } |
| 428 | |
| 429 | @Override |
| 430 | public boolean allowAppAnimationsLw() { |
| 431 | return false; |
| 432 | } |
| 433 | |
| 434 | @Override |
| 435 | public int focusChangedLw(WindowState lastFocus, |
| 436 | WindowState newFocus) { |
| 437 | return 0; |
| 438 | } |
| 439 | |
| 440 | @Override |
| 441 | public void startedWakingUp() { |
| 442 | |
| 443 | } |
| 444 | |
| 445 | @Override |
| 446 | public void finishedWakingUp() { |
| 447 | |
| 448 | } |
| 449 | |
| 450 | @Override |
| 451 | public void startedGoingToSleep(int why) { |
| 452 | |
| 453 | } |
| 454 | |
| 455 | @Override |
| 456 | public void finishedGoingToSleep(int why) { |
| 457 | |
| 458 | } |
| 459 | |
| 460 | @Override |
| 461 | public void screenTurningOn(ScreenOnListener screenOnListener) { |
| 462 | |
| 463 | } |
| 464 | |
| 465 | @Override |
| 466 | public void screenTurnedOn() { |
| 467 | |
| 468 | } |
| 469 | |
| 470 | @Override |
| 471 | public void screenTurnedOff() { |
| 472 | |
| 473 | } |
| 474 | |
| 475 | @Override |
| 476 | public boolean isScreenOn() { |
| 477 | return false; |
| 478 | } |
| 479 | |
| 480 | @Override |
| 481 | public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) { |
| 482 | |
| 483 | } |
| 484 | |
| 485 | @Override |
| 486 | public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered) { |
| 487 | |
| 488 | } |
| 489 | |
| 490 | @Override |
| 491 | public void enableKeyguard(boolean enabled) { |
| 492 | |
| 493 | } |
| 494 | |
| 495 | @Override |
| 496 | public void exitKeyguardSecurely(OnKeyguardExitResult callback) { |
| 497 | |
| 498 | } |
| 499 | |
| 500 | @Override |
| 501 | public boolean isKeyguardLocked() { |
| 502 | return false; |
| 503 | } |
| 504 | |
| 505 | @Override |
| 506 | public boolean isKeyguardSecure(int userId) { |
| 507 | return false; |
| 508 | } |
| 509 | |
| 510 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 511 | public boolean isKeyguardOccluded() { |
| 512 | return false; |
| 513 | } |
| 514 | |
| 515 | @Override |
| 516 | public boolean isKeyguardTrustedLw() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 517 | return false; |
| 518 | } |
| 519 | |
| 520 | @Override |
| 521 | public boolean isKeyguardShowingAndNotOccluded() { |
| 522 | return false; |
| 523 | } |
| 524 | |
| 525 | @Override |
| 526 | public boolean inKeyguardRestrictedKeyInputMode() { |
| 527 | return false; |
| 528 | } |
| 529 | |
| 530 | @Override |
Jorim Jaggi | 241ae10 | 2016-11-02 21:57:33 -0700 | [diff] [blame] | 531 | public void dismissKeyguardLw(@Nullable IKeyguardDismissCallback callback) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 532 | } |
| 533 | |
| 534 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 535 | public boolean isKeyguardDrawnLw() { |
| 536 | return false; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 537 | } |
| 538 | |
| 539 | @Override |
Jorim Jaggi | 77e1043 | 2016-10-26 17:43:56 -0700 | [diff] [blame] | 540 | public boolean isShowingDreamLw() { |
| 541 | return false; |
| 542 | } |
| 543 | |
| 544 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 545 | public void onKeyguardOccludedChangedLw(boolean occluded) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 546 | } |
| 547 | |
| 548 | @Override |
| 549 | public int rotationForOrientationLw(int orientation, |
| 550 | int lastRotation) { |
| 551 | return 0; |
| 552 | } |
| 553 | |
| 554 | @Override |
| 555 | public boolean rotationHasCompatibleMetricsLw(int orientation, |
| 556 | int rotation) { |
| 557 | return false; |
| 558 | } |
| 559 | |
| 560 | @Override |
| 561 | public void setRotationLw(int rotation) { |
| 562 | |
| 563 | } |
| 564 | |
| 565 | @Override |
| 566 | public void setSafeMode(boolean safeMode) { |
| 567 | |
| 568 | } |
| 569 | |
| 570 | @Override |
| 571 | public void systemReady() { |
| 572 | |
| 573 | } |
| 574 | |
| 575 | @Override |
| 576 | public void systemBooted() { |
| 577 | |
| 578 | } |
| 579 | |
| 580 | @Override |
| 581 | public void showBootMessage(CharSequence msg, boolean always) { |
| 582 | |
| 583 | } |
| 584 | |
| 585 | @Override |
| 586 | public void hideBootMessages() { |
| 587 | |
| 588 | } |
| 589 | |
| 590 | @Override |
| 591 | public void userActivity() { |
| 592 | |
| 593 | } |
| 594 | |
| 595 | @Override |
| 596 | public void enableScreenAfterBoot() { |
| 597 | |
| 598 | } |
| 599 | |
| 600 | @Override |
| 601 | public void setCurrentOrientationLw(int newOrientation) { |
| 602 | |
| 603 | } |
| 604 | |
| 605 | @Override |
| 606 | public boolean performHapticFeedbackLw(WindowState win, int effectId, |
| 607 | boolean always) { |
| 608 | return false; |
| 609 | } |
| 610 | |
| 611 | @Override |
| 612 | public void keepScreenOnStartedLw() { |
| 613 | |
| 614 | } |
| 615 | |
| 616 | @Override |
| 617 | public void keepScreenOnStoppedLw() { |
| 618 | |
| 619 | } |
| 620 | |
| 621 | @Override |
| 622 | public int getUserRotationMode() { |
| 623 | return 0; |
| 624 | } |
| 625 | |
| 626 | @Override |
| 627 | public void setUserRotationMode(int mode, |
| 628 | int rotation) { |
| 629 | |
| 630 | } |
| 631 | |
| 632 | @Override |
| 633 | public int adjustSystemUiVisibilityLw(int visibility) { |
| 634 | return 0; |
| 635 | } |
| 636 | |
| 637 | @Override |
| 638 | public boolean hasNavigationBar() { |
| 639 | return false; |
| 640 | } |
| 641 | |
| 642 | @Override |
| 643 | public void lockNow(Bundle options) { |
| 644 | |
| 645 | } |
| 646 | |
| 647 | @Override |
| 648 | public void setLastInputMethodWindowLw(WindowState ime, |
| 649 | WindowState target) { |
| 650 | |
| 651 | } |
| 652 | |
| 653 | @Override |
| 654 | public void showRecentApps(boolean fromHome) { |
| 655 | |
| 656 | } |
| 657 | |
| 658 | @Override |
| 659 | public void showGlobalActions() { |
| 660 | |
| 661 | } |
| 662 | |
| 663 | @Override |
| 664 | public int getInputMethodWindowVisibleHeightLw() { |
| 665 | return 0; |
| 666 | } |
| 667 | |
| 668 | @Override |
| 669 | public void setCurrentUserLw(int newUserId) { |
| 670 | |
| 671 | } |
| 672 | |
| 673 | @Override |
Evan Rosky | 1839645 | 2016-07-27 15:19:37 -0700 | [diff] [blame] | 674 | public void setSwitchingUser(boolean switching) { |
| 675 | |
| 676 | } |
| 677 | |
| 678 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 679 | public void dump(String prefix, PrintWriter writer, String[] args) { |
| 680 | |
| 681 | } |
| 682 | |
| 683 | @Override |
| 684 | public boolean canMagnifyWindow(int windowType) { |
| 685 | return false; |
| 686 | } |
| 687 | |
| 688 | @Override |
| 689 | public boolean isTopLevelWindow(int windowType) { |
| 690 | return false; |
| 691 | } |
| 692 | |
| 693 | @Override |
| 694 | public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { |
| 695 | |
| 696 | } |
| 697 | |
| 698 | @Override |
| 699 | public void getStableInsetsLw(int displayRotation, int displayWidth, int displayHeight, |
| 700 | Rect outInsets) { |
| 701 | |
| 702 | } |
| 703 | |
| 704 | @Override |
| 705 | public boolean isNavBarForcedShownLw(WindowState win) { |
| 706 | return false; |
| 707 | } |
| 708 | |
| 709 | @Override |
| 710 | public void getNonDecorInsetsLw(int displayRotation, int displayWidth, int displayHeight, |
| 711 | Rect outInsets) { |
| 712 | |
| 713 | } |
| 714 | |
| 715 | @Override |
| 716 | public boolean isDockSideAllowed(int dockSide) { |
| 717 | return false; |
| 718 | } |
| 719 | |
| 720 | @Override |
| 721 | public void onConfigurationChanged() { |
| 722 | |
| 723 | } |
| 724 | |
| 725 | @Override |
| 726 | public boolean shouldRotateSeamlessly(int oldRotation, int newRotation) { |
| 727 | return false; |
| 728 | } |
Brian Carlstrom | 7203d62 | 2016-09-21 01:00:36 -0700 | [diff] [blame] | 729 | |
| 730 | @Override |
| 731 | public void setTvPipVisibilityLw(boolean visible) { |
| 732 | |
| 733 | } |
| 734 | |
| 735 | @Override |
| 736 | public void setRecentsVisibilityLw(boolean visible) { |
| 737 | |
| 738 | } |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 739 | } |