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 |
Tadashi G. Takaoka | b6e148c | 2018-11-03 02:59:06 -0700 | [diff] [blame] | 14 | * limitations under the License. |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | package com.android.server.wm; |
| 18 | |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 19 | import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; |
Andrii Kulian | 92c9a94 | 2017-10-10 00:41:41 -0700 | [diff] [blame] | 20 | import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; |
Tarandeep Singh | e1cfcf4 | 2017-07-10 18:50:00 -0700 | [diff] [blame] | 21 | |
Tadashi G. Takaoka | bf0d57b | 2018-11-19 16:09:58 +0900 | [diff] [blame] | 22 | import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; |
| 23 | import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock; |
Wale Ogunwale | cfca258 | 2016-10-19 09:53:25 -0700 | [diff] [blame] | 24 | |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 25 | import android.annotation.Nullable; |
| 26 | import android.content.Context; |
| 27 | import android.content.res.CompatibilityInfo; |
| 28 | import android.content.res.Configuration; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 29 | import android.os.Bundle; |
| 30 | import android.os.IBinder; |
Michael Wright | e300104 | 2019-02-05 00:13:14 +0000 | [diff] [blame] | 31 | import android.os.PowerManager.WakeReason; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 32 | import android.os.RemoteException; |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 33 | import android.util.proto.ProtoOutputStream; |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 34 | import android.view.IWindow; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 35 | import android.view.IWindowManager; |
| 36 | import android.view.KeyEvent; |
| 37 | import android.view.WindowManager; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 38 | import android.view.animation.Animation; |
| 39 | |
| 40 | import com.android.internal.policy.IKeyguardDismissCallback; |
| 41 | import com.android.internal.policy.IShortcutService; |
Adrian Roos | e99bc05 | 2017-11-20 17:55:31 +0100 | [diff] [blame] | 42 | import com.android.server.policy.WindowManagerPolicy; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 43 | |
| 44 | import java.io.PrintWriter; |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 45 | import java.util.function.Supplier; |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 46 | |
Wale Ogunwale | cfca258 | 2016-10-19 09:53:25 -0700 | [diff] [blame] | 47 | class TestWindowManagerPolicy implements WindowManagerPolicy { |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 48 | private final Supplier<WindowManagerService> mWmSupplier; |
Wale Ogunwale | 5136249 | 2016-09-08 17:49:17 -0700 | [diff] [blame] | 49 | |
Tadashi G. Takaoka | bf0d57b | 2018-11-19 16:09:58 +0900 | [diff] [blame] | 50 | int mRotationToReport = 0; |
| 51 | boolean mKeyguardShowingAndNotOccluded = false; |
Andrii Kulian | 4ede3e0 | 2017-01-12 11:52:31 -0800 | [diff] [blame] | 52 | |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 53 | private Runnable mRunnableWhenAddingSplashScreen; |
| 54 | |
Tadashi G. Takaoka | b6e148c | 2018-11-03 02:59:06 -0700 | [diff] [blame] | 55 | TestWindowManagerPolicy(Supplier<WindowManagerService> wmSupplier) { |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 56 | mWmSupplier = wmSupplier; |
Wale Ogunwale | 5136249 | 2016-09-08 17:49:17 -0700 | [diff] [blame] | 57 | } |
| 58 | |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 59 | @Override |
| 60 | public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver) |
| 61 | throws RemoteException { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | @Override |
| 65 | public void init(Context context, IWindowManager windowManager, |
| 66 | WindowManagerFuncs windowManagerFuncs) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 67 | } |
| 68 | |
Riddle Hsu | 5ce4bb3 | 2018-07-18 16:11:30 +0800 | [diff] [blame] | 69 | public void setDefaultDisplay(DisplayContentInfo displayContentInfo) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 73 | public int checkAddPermission(WindowManager.LayoutParams attrs, int[] outAppOp) { |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | @Override |
| 78 | public boolean checkShowToOwnerOnly(WindowManager.LayoutParams attrs) { |
| 79 | return false; |
| 80 | } |
| 81 | |
| 82 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 83 | public void adjustConfigurationLw(Configuration config, int keyboardPresence, |
| 84 | int navigationPresence) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 88 | public int getMaxWallpaperLayer() { |
| 89 | return 0; |
| 90 | } |
| 91 | |
| 92 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 93 | public boolean isKeyguardHostWindow(WindowManager.LayoutParams attrs) { |
Andrii Kulian | 92c9a94 | 2017-10-10 00:41:41 -0700 | [diff] [blame] | 94 | return attrs.type == TYPE_STATUS_BAR; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 98 | public boolean canBeHiddenByKeyguardLw(WindowState win) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 99 | return false; |
| 100 | } |
| 101 | |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 102 | /** |
| 103 | * Sets a runnable to run when adding a splash screen which gets executed after the window has |
| 104 | * been added but before returning the surface. |
| 105 | */ |
| 106 | void setRunnableWhenAddingSplashScreen(Runnable r) { |
| 107 | mRunnableWhenAddingSplashScreen = r; |
| 108 | } |
| 109 | |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 110 | @Override |
Jorim Jaggi | ba41f4b | 2016-12-14 17:43:07 -0800 | [diff] [blame] | 111 | public StartingSurface addSplashScreen(IBinder appToken, String packageName, int theme, |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 112 | CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, |
Andrii Kulian | fb1bf69 | 2017-01-17 11:17:34 -0800 | [diff] [blame] | 113 | int logo, int windowFlags, Configuration overrideConfig, int displayId) { |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 114 | final com.android.server.wm.WindowState window; |
| 115 | final AppWindowToken atoken; |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 116 | final WindowManagerService wm = mWmSupplier.get(); |
Wale Ogunwale | db485de | 2018-10-29 09:47:07 -0700 | [diff] [blame] | 117 | synchronized (wm.mGlobalLock) { |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 118 | atoken = wm.mRoot.getAppWindowToken(appToken); |
Kazuki Takise | 5614839 | 2018-07-27 10:44:25 +0900 | [diff] [blame] | 119 | IWindow iWindow = mock(IWindow.class); |
| 120 | doReturn(mock(IBinder.class)).when(iWindow).asBinder(); |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 121 | window = WindowTestsBase.createWindow(null, TYPE_APPLICATION_STARTING, atoken, |
Adrian Roos | 3150dbf | 2018-03-28 18:06:52 +0200 | [diff] [blame] | 122 | "Starting window", 0 /* ownerId */, false /* internalWindows */, wm, |
Kazuki Takise | 5614839 | 2018-07-27 10:44:25 +0900 | [diff] [blame] | 123 | mock(Session.class), iWindow); |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 124 | atoken.startingWindow = window; |
| 125 | } |
| 126 | if (mRunnableWhenAddingSplashScreen != null) { |
| 127 | mRunnableWhenAddingSplashScreen.run(); |
| 128 | mRunnableWhenAddingSplashScreen = null; |
| 129 | } |
| 130 | return () -> { |
Wale Ogunwale | db485de | 2018-10-29 09:47:07 -0700 | [diff] [blame] | 131 | synchronized (wm.mGlobalLock) { |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 132 | atoken.removeChild(window); |
| 133 | atoken.startingWindow = null; |
| 134 | } |
| 135 | }; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | @Override |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 139 | public void setKeyguardCandidateLw(WindowState win) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 143 | public Animation createHiddenByKeyguardExit(boolean onWallpaper, |
Issei Suzuki | 5609ccb | 2019-06-13 15:04:08 +0200 | [diff] [blame] | 144 | boolean goingToNotificationShade, boolean subtleAnimation) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 145 | return null; |
| 146 | } |
| 147 | |
| 148 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 149 | public Animation createKeyguardWallpaperExit(boolean goingToNotificationShade) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 150 | return null; |
| 151 | } |
| 152 | |
| 153 | @Override |
| 154 | public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { |
| 155 | return 0; |
| 156 | } |
| 157 | |
| 158 | @Override |
Charles Chen | 4cc014e1 | 2019-01-28 16:17:16 +0800 | [diff] [blame] | 159 | public int interceptMotionBeforeQueueingNonInteractive(int displayId, long whenNanos, |
| 160 | int policyFlags) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 161 | return 0; |
| 162 | } |
| 163 | |
| 164 | @Override |
Tadashi G. Takaoka | b6e148c | 2018-11-03 02:59:06 -0700 | [diff] [blame] | 165 | public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, int policyFlags) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 166 | return 0; |
| 167 | } |
| 168 | |
| 169 | @Override |
Tadashi G. Takaoka | b6e148c | 2018-11-03 02:59:06 -0700 | [diff] [blame] | 170 | public KeyEvent dispatchUnhandledKey(WindowState win, KeyEvent event, int policyFlags) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 171 | return null; |
| 172 | } |
| 173 | |
| 174 | @Override |
Tiger Huang | 51c5a1d | 2018-12-11 20:24:51 +0800 | [diff] [blame] | 175 | public void setTopFocusedDisplay(int displayId) { |
| 176 | } |
| 177 | |
| 178 | @Override |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 179 | public void applyKeyguardPolicyLw(WindowState win, WindowState imeTarget) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | @Override |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 183 | public void setAllowLockscreenWhenOn(int displayId, boolean allow) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | @Override |
Michael Wright | e300104 | 2019-02-05 00:13:14 +0000 | [diff] [blame] | 187 | public void startedWakingUp(@WakeReason int reason) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | @Override |
Michael Wright | e300104 | 2019-02-05 00:13:14 +0000 | [diff] [blame] | 191 | public void finishedWakingUp(@WakeReason int reason) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | @Override |
| 195 | public void startedGoingToSleep(int why) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 196 | } |
| 197 | |
| 198 | @Override |
| 199 | public void finishedGoingToSleep(int why) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 200 | } |
| 201 | |
| 202 | @Override |
| 203 | public void screenTurningOn(ScreenOnListener screenOnListener) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | @Override |
| 207 | public void screenTurnedOn() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | @Override |
Jorim Jaggi | 51304d7 | 2017-05-17 17:25:32 +0200 | [diff] [blame] | 211 | public void screenTurningOff(ScreenOffListener screenOffListener) { |
Jorim Jaggi | 51304d7 | 2017-05-17 17:25:32 +0200 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 215 | public void screenTurnedOff() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | @Override |
| 219 | public boolean isScreenOn() { |
Jorim Jaggi | 9bafc71 | 2017-01-19 17:28:30 +0100 | [diff] [blame] | 220 | return true; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | @Override |
Adrian Roos | 7c89480 | 2017-07-19 12:25:34 +0200 | [diff] [blame] | 224 | public boolean okToAnimate() { |
Adrian Roos | e94c15c | 2017-05-09 13:17:54 -0700 | [diff] [blame] | 225 | return true; |
| 226 | } |
| 227 | |
| 228 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 229 | public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 230 | } |
| 231 | |
| 232 | @Override |
| 233 | public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | @Override |
| 237 | public void enableKeyguard(boolean enabled) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 238 | } |
| 239 | |
| 240 | @Override |
| 241 | public void exitKeyguardSecurely(OnKeyguardExitResult callback) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | @Override |
| 245 | public boolean isKeyguardLocked() { |
Tadashi G. Takaoka | bf0d57b | 2018-11-19 16:09:58 +0900 | [diff] [blame] | 246 | return mKeyguardShowingAndNotOccluded; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | @Override |
| 250 | public boolean isKeyguardSecure(int userId) { |
| 251 | return false; |
| 252 | } |
| 253 | |
| 254 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 255 | public boolean isKeyguardOccluded() { |
| 256 | return false; |
| 257 | } |
| 258 | |
| 259 | @Override |
| 260 | public boolean isKeyguardTrustedLw() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 261 | return false; |
| 262 | } |
| 263 | |
| 264 | @Override |
| 265 | public boolean isKeyguardShowingAndNotOccluded() { |
Tadashi G. Takaoka | bf0d57b | 2018-11-19 16:09:58 +0900 | [diff] [blame] | 266 | return mKeyguardShowingAndNotOccluded; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | @Override |
Siarhei Vishniakou | 35fbb31 | 2017-12-13 13:48:50 -0800 | [diff] [blame] | 270 | public boolean inKeyguardRestrictedKeyInputMode() { |
| 271 | return false; |
| 272 | } |
| 273 | |
| 274 | @Override |
Lucas Dupin | c80c67e | 2017-12-04 14:29:10 -0800 | [diff] [blame] | 275 | public void dismissKeyguardLw(@Nullable IKeyguardDismissCallback callback, |
| 276 | CharSequence message) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 280 | public boolean isKeyguardDrawnLw() { |
| 281 | return false; |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | @Override |
Jorim Jaggi | fe76234 | 2016-10-13 14:33:27 +0200 | [diff] [blame] | 285 | public void onKeyguardOccludedChangedLw(boolean occluded) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 286 | } |
| 287 | |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 288 | public void setSafeMode(boolean safeMode) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 289 | } |
| 290 | |
| 291 | @Override |
| 292 | public void systemReady() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | @Override |
| 296 | public void systemBooted() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | @Override |
| 300 | public void showBootMessage(CharSequence msg, boolean always) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 301 | } |
| 302 | |
| 303 | @Override |
| 304 | public void hideBootMessages() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | @Override |
| 308 | public void userActivity() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 309 | } |
| 310 | |
| 311 | @Override |
| 312 | public void enableScreenAfterBoot() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 313 | } |
| 314 | |
| 315 | @Override |
Arthur Hung | a4c5206 | 2019-02-19 11:31:44 +0800 | [diff] [blame] | 316 | public boolean performHapticFeedback(int uid, String packageName, int effectId, |
| 317 | boolean always, String reason) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 318 | return false; |
| 319 | } |
| 320 | |
| 321 | @Override |
| 322 | public void keepScreenOnStartedLw() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 323 | } |
| 324 | |
| 325 | @Override |
| 326 | public void keepScreenOnStoppedLw() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 327 | } |
| 328 | |
| 329 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 330 | public boolean hasNavigationBar() { |
| 331 | return false; |
| 332 | } |
| 333 | |
| 334 | @Override |
| 335 | public void lockNow(Bundle options) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 336 | } |
| 337 | |
| 338 | @Override |
Winson Chung | dff7a73 | 2017-12-11 12:17:06 -0800 | [diff] [blame] | 339 | public void showRecentApps() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 340 | } |
| 341 | |
| 342 | @Override |
| 343 | public void showGlobalActions() { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 344 | } |
| 345 | |
| 346 | @Override |
Tiger Huang | 7c610aa | 2018-10-27 00:01:01 +0800 | [diff] [blame] | 347 | public boolean isUserSetupComplete() { |
| 348 | return false; |
| 349 | } |
| 350 | |
| 351 | @Override |
| 352 | public int getUiMode() { |
| 353 | return 0; |
| 354 | } |
| 355 | |
| 356 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 357 | public void setCurrentUserLw(int newUserId) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 358 | } |
| 359 | |
| 360 | @Override |
Evan Rosky | 1839645 | 2016-07-27 15:19:37 -0700 | [diff] [blame] | 361 | public void setSwitchingUser(boolean switching) { |
Evan Rosky | 1839645 | 2016-07-27 15:19:37 -0700 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | @Override |
Steven Timotius | af03df6 | 2017-07-18 16:56:43 -0700 | [diff] [blame] | 365 | public void writeToProto(ProtoOutputStream proto, long fieldId) { |
Steven Timotius | af03df6 | 2017-07-18 16:56:43 -0700 | [diff] [blame] | 366 | } |
| 367 | |
| 368 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 369 | public void dump(String prefix, PrintWriter writer, String[] args) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | @Override |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 373 | public boolean isTopLevelWindow(int windowType) { |
| 374 | return false; |
| 375 | } |
| 376 | |
| 377 | @Override |
| 378 | public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | @Override |
Winson Chung | ac52f28 | 2017-03-30 14:44:52 -0700 | [diff] [blame] | 382 | public void setPipVisibilityLw(boolean visible) { |
Brian Carlstrom | 7203d62 | 2016-09-21 01:00:36 -0700 | [diff] [blame] | 383 | } |
| 384 | |
| 385 | @Override |
| 386 | public void setRecentsVisibilityLw(boolean visible) { |
Keun-young Park | 4136d2d | 2017-05-08 14:51:59 -0700 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | @Override |
Matthew Ng | 64543e6 | 2018-02-28 17:35:10 -0800 | [diff] [blame] | 390 | public void setNavBarVirtualKeyHapticFeedbackEnabledLw(boolean enabled) { |
| 391 | } |
| 392 | |
| 393 | @Override |
Keun-young Park | 4136d2d | 2017-05-08 14:51:59 -0700 | [diff] [blame] | 394 | public void onSystemUiStarted() { |
| 395 | } |
| 396 | |
| 397 | @Override |
| 398 | public boolean canDismissBootAnimation() { |
| 399 | return true; |
| 400 | } |
Phil Weaver | d755160 | 2018-02-15 15:01:04 -0800 | [diff] [blame] | 401 | |
| 402 | @Override |
Yoshiaki Naka | e1bdfc82 | 2017-09-15 15:24:34 +0900 | [diff] [blame] | 403 | public void requestUserActivityNotification() { |
| 404 | } |
Benjamin Franz | 3662b15 | 2018-01-16 17:23:44 +0000 | [diff] [blame] | 405 | |
| 406 | @Override |
chaviw | 0e9fb13 | 2018-06-05 16:29:13 -0700 | [diff] [blame] | 407 | public boolean setAodShowing(boolean aodShowing) { |
| 408 | return false; |
| 409 | } |
Wale Ogunwale | b699ce0 | 2016-07-18 12:05:30 -0700 | [diff] [blame] | 410 | } |