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