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 |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 316 | public int prepareAddWindowLw(WindowState win, |
| 317 | WindowManager.LayoutParams attrs) { |
| 318 | return 0; |
| 319 | } |
| 320 | |
| 321 | @Override |
| 322 | public void removeWindowLw(WindowState win) { |
| 323 | |
| 324 | } |
| 325 | |
| 326 | @Override |
| 327 | public int selectAnimationLw(WindowState win, int transit) { |
| 328 | return 0; |
| 329 | } |
| 330 | |
| 331 | @Override |
| 332 | public void selectRotationAnimationLw(int[] anim) { |
| 333 | |
| 334 | } |
| 335 | |
| 336 | @Override |
| 337 | public boolean validateRotationAnimationLw(int exitAnimId, int enterAnimId, |
| 338 | boolean forceDefault) { |
| 339 | return false; |
| 340 | } |
| 341 | |
| 342 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 343 | public Animation createHiddenByKeyguardExit(boolean onWallpaper, |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 344 | boolean goingToNotificationShade) { |
| 345 | return null; |
| 346 | } |
| 347 | |
| 348 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 349 | public Animation createKeyguardWallpaperExit(boolean goingToNotificationShade) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 350 | return null; |
| 351 | } |
| 352 | |
| 353 | @Override |
| 354 | public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { |
| 355 | return 0; |
| 356 | } |
| 357 | |
| 358 | @Override |
| 359 | public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags) { |
| 360 | return 0; |
| 361 | } |
| 362 | |
| 363 | @Override |
| 364 | public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, |
| 365 | int policyFlags) { |
| 366 | return 0; |
| 367 | } |
| 368 | |
| 369 | @Override |
| 370 | public KeyEvent dispatchUnhandledKey(WindowState win, KeyEvent event, |
| 371 | int policyFlags) { |
| 372 | return null; |
| 373 | } |
| 374 | |
| 375 | @Override |
| 376 | public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight, |
| 377 | int displayRotation, int uiMode) { |
| 378 | |
| 379 | } |
| 380 | |
| 381 | @Override |
| 382 | public int getSystemDecorLayerLw() { |
| 383 | return 0; |
| 384 | } |
| 385 | |
| 386 | @Override |
| 387 | public void getContentRectLw(Rect r) { |
| 388 | |
| 389 | } |
| 390 | |
| 391 | @Override |
| 392 | public void layoutWindowLw(WindowState win, |
| 393 | WindowState attached) { |
| 394 | |
| 395 | } |
| 396 | |
| 397 | @Override |
| 398 | public boolean getInsetHintLw(WindowManager.LayoutParams attrs, Rect taskBounds, |
| 399 | int displayRotation, int displayWidth, int displayHeight, Rect outContentInsets, |
| 400 | Rect outStableInsets, Rect outOutsets) { |
| 401 | return false; |
| 402 | } |
| 403 | |
| 404 | @Override |
| 405 | public void finishLayoutLw() { |
| 406 | |
| 407 | } |
| 408 | |
| 409 | @Override |
| 410 | public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) { |
| 411 | |
| 412 | } |
| 413 | |
| 414 | @Override |
| 415 | public void applyPostLayoutPolicyLw(WindowState win, |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 416 | WindowManager.LayoutParams attrs, WindowState attached, WindowState imeTarget) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 417 | } |
| 418 | |
| 419 | @Override |
| 420 | public int finishPostLayoutPolicyLw() { |
| 421 | return 0; |
| 422 | } |
| 423 | |
| 424 | @Override |
| 425 | public boolean allowAppAnimationsLw() { |
| 426 | return false; |
| 427 | } |
| 428 | |
| 429 | @Override |
| 430 | public int focusChangedLw(WindowState lastFocus, |
| 431 | WindowState newFocus) { |
| 432 | return 0; |
| 433 | } |
| 434 | |
| 435 | @Override |
| 436 | public void startedWakingUp() { |
| 437 | |
| 438 | } |
| 439 | |
| 440 | @Override |
| 441 | public void finishedWakingUp() { |
| 442 | |
| 443 | } |
| 444 | |
| 445 | @Override |
| 446 | public void startedGoingToSleep(int why) { |
| 447 | |
| 448 | } |
| 449 | |
| 450 | @Override |
| 451 | public void finishedGoingToSleep(int why) { |
| 452 | |
| 453 | } |
| 454 | |
| 455 | @Override |
| 456 | public void screenTurningOn(ScreenOnListener screenOnListener) { |
| 457 | |
| 458 | } |
| 459 | |
| 460 | @Override |
| 461 | public void screenTurnedOn() { |
| 462 | |
| 463 | } |
| 464 | |
| 465 | @Override |
| 466 | public void screenTurnedOff() { |
| 467 | |
| 468 | } |
| 469 | |
| 470 | @Override |
| 471 | public boolean isScreenOn() { |
| 472 | return false; |
| 473 | } |
| 474 | |
| 475 | @Override |
| 476 | public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) { |
| 477 | |
| 478 | } |
| 479 | |
| 480 | @Override |
| 481 | public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered) { |
| 482 | |
| 483 | } |
| 484 | |
| 485 | @Override |
| 486 | public void enableKeyguard(boolean enabled) { |
| 487 | |
| 488 | } |
| 489 | |
| 490 | @Override |
| 491 | public void exitKeyguardSecurely(OnKeyguardExitResult callback) { |
| 492 | |
| 493 | } |
| 494 | |
| 495 | @Override |
| 496 | public boolean isKeyguardLocked() { |
| 497 | return false; |
| 498 | } |
| 499 | |
| 500 | @Override |
| 501 | public boolean isKeyguardSecure(int userId) { |
| 502 | return false; |
| 503 | } |
| 504 | |
| 505 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 506 | public boolean isKeyguardOccluded() { |
| 507 | return false; |
| 508 | } |
| 509 | |
| 510 | @Override |
| 511 | public boolean isKeyguardTrustedLw() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 512 | return false; |
| 513 | } |
| 514 | |
| 515 | @Override |
| 516 | public boolean isKeyguardShowingAndNotOccluded() { |
| 517 | return false; |
| 518 | } |
| 519 | |
| 520 | @Override |
| 521 | public boolean inKeyguardRestrictedKeyInputMode() { |
| 522 | return false; |
| 523 | } |
| 524 | |
| 525 | @Override |
Jorim Jaggi | 241ae10 | 2016-11-02 21:57:33 -0700 | [diff] [blame] | 526 | public void dismissKeyguardLw(@Nullable IKeyguardDismissCallback callback) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 527 | } |
| 528 | |
| 529 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 530 | public boolean isKeyguardDrawnLw() { |
| 531 | return false; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 532 | } |
| 533 | |
| 534 | @Override |
Jorim Jaggi | 77e1043 | 2016-10-26 17:43:56 -0700 | [diff] [blame] | 535 | public boolean isShowingDreamLw() { |
| 536 | return false; |
| 537 | } |
| 538 | |
| 539 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 540 | public void onKeyguardOccludedChangedLw(boolean occluded) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 541 | } |
| 542 | |
| 543 | @Override |
| 544 | public int rotationForOrientationLw(int orientation, |
| 545 | int lastRotation) { |
| 546 | return 0; |
| 547 | } |
| 548 | |
| 549 | @Override |
| 550 | public boolean rotationHasCompatibleMetricsLw(int orientation, |
| 551 | int rotation) { |
| 552 | return false; |
| 553 | } |
| 554 | |
| 555 | @Override |
| 556 | public void setRotationLw(int rotation) { |
| 557 | |
| 558 | } |
| 559 | |
| 560 | @Override |
| 561 | public void setSafeMode(boolean safeMode) { |
| 562 | |
| 563 | } |
| 564 | |
| 565 | @Override |
| 566 | public void systemReady() { |
| 567 | |
| 568 | } |
| 569 | |
| 570 | @Override |
| 571 | public void systemBooted() { |
| 572 | |
| 573 | } |
| 574 | |
| 575 | @Override |
| 576 | public void showBootMessage(CharSequence msg, boolean always) { |
| 577 | |
| 578 | } |
| 579 | |
| 580 | @Override |
| 581 | public void hideBootMessages() { |
| 582 | |
| 583 | } |
| 584 | |
| 585 | @Override |
| 586 | public void userActivity() { |
| 587 | |
| 588 | } |
| 589 | |
| 590 | @Override |
| 591 | public void enableScreenAfterBoot() { |
| 592 | |
| 593 | } |
| 594 | |
| 595 | @Override |
| 596 | public void setCurrentOrientationLw(int newOrientation) { |
| 597 | |
| 598 | } |
| 599 | |
| 600 | @Override |
| 601 | public boolean performHapticFeedbackLw(WindowState win, int effectId, |
| 602 | boolean always) { |
| 603 | return false; |
| 604 | } |
| 605 | |
| 606 | @Override |
| 607 | public void keepScreenOnStartedLw() { |
| 608 | |
| 609 | } |
| 610 | |
| 611 | @Override |
| 612 | public void keepScreenOnStoppedLw() { |
| 613 | |
| 614 | } |
| 615 | |
| 616 | @Override |
| 617 | public int getUserRotationMode() { |
| 618 | return 0; |
| 619 | } |
| 620 | |
| 621 | @Override |
| 622 | public void setUserRotationMode(int mode, |
| 623 | int rotation) { |
| 624 | |
| 625 | } |
| 626 | |
| 627 | @Override |
| 628 | public int adjustSystemUiVisibilityLw(int visibility) { |
| 629 | return 0; |
| 630 | } |
| 631 | |
| 632 | @Override |
| 633 | public boolean hasNavigationBar() { |
| 634 | return false; |
| 635 | } |
| 636 | |
| 637 | @Override |
| 638 | public void lockNow(Bundle options) { |
| 639 | |
| 640 | } |
| 641 | |
| 642 | @Override |
| 643 | public void setLastInputMethodWindowLw(WindowState ime, |
| 644 | WindowState target) { |
| 645 | |
| 646 | } |
| 647 | |
| 648 | @Override |
| 649 | public void showRecentApps(boolean fromHome) { |
| 650 | |
| 651 | } |
| 652 | |
| 653 | @Override |
| 654 | public void showGlobalActions() { |
| 655 | |
| 656 | } |
| 657 | |
| 658 | @Override |
| 659 | public int getInputMethodWindowVisibleHeightLw() { |
| 660 | return 0; |
| 661 | } |
| 662 | |
| 663 | @Override |
| 664 | public void setCurrentUserLw(int newUserId) { |
| 665 | |
| 666 | } |
| 667 | |
| 668 | @Override |
Evan Rosky | 1839645 | 2016-07-27 15:19:37 -0700 | [diff] [blame] | 669 | public void setSwitchingUser(boolean switching) { |
| 670 | |
| 671 | } |
| 672 | |
| 673 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 674 | public void dump(String prefix, PrintWriter writer, String[] args) { |
| 675 | |
| 676 | } |
| 677 | |
| 678 | @Override |
| 679 | public boolean canMagnifyWindow(int windowType) { |
| 680 | return false; |
| 681 | } |
| 682 | |
| 683 | @Override |
| 684 | public boolean isTopLevelWindow(int windowType) { |
| 685 | return false; |
| 686 | } |
| 687 | |
| 688 | @Override |
| 689 | public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { |
| 690 | |
| 691 | } |
| 692 | |
| 693 | @Override |
| 694 | public void getStableInsetsLw(int displayRotation, int displayWidth, int displayHeight, |
| 695 | Rect outInsets) { |
| 696 | |
| 697 | } |
| 698 | |
| 699 | @Override |
| 700 | public boolean isNavBarForcedShownLw(WindowState win) { |
| 701 | return false; |
| 702 | } |
| 703 | |
| 704 | @Override |
| 705 | public void getNonDecorInsetsLw(int displayRotation, int displayWidth, int displayHeight, |
| 706 | Rect outInsets) { |
| 707 | |
| 708 | } |
| 709 | |
| 710 | @Override |
| 711 | public boolean isDockSideAllowed(int dockSide) { |
| 712 | return false; |
| 713 | } |
| 714 | |
| 715 | @Override |
| 716 | public void onConfigurationChanged() { |
| 717 | |
| 718 | } |
| 719 | |
| 720 | @Override |
| 721 | public boolean shouldRotateSeamlessly(int oldRotation, int newRotation) { |
| 722 | return false; |
| 723 | } |
Brian Carlstrom | 7203d62 | 2016-09-21 01:00:36 -0700 | [diff] [blame] | 724 | |
| 725 | @Override |
| 726 | public void setTvPipVisibilityLw(boolean visible) { |
| 727 | |
| 728 | } |
| 729 | |
| 730 | @Override |
| 731 | public void setRecentsVisibilityLw(boolean visible) { |
| 732 | |
| 733 | } |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 734 | } |