blob: 57643822b1a4355a1a1b92236384f56310efdccf [file] [log] [blame]
Jorim Jaggife762342016-10-13 14:33:27 +02001/*
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
17package com.android.server.am;
18
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -070019import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
David Stevens9440dc82017-03-16 19:00:20 -070020import static android.view.Display.DEFAULT_DISPLAY;
David Stevens53a39ea2017-08-23 18:41:49 -070021import static android.view.Display.INVALID_DISPLAY;
Adrian Roose99bc052017-11-20 17:55:31 +010022import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS;
23import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_TO_SHADE;
24import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER;
Jorim Jaggi241ae102016-11-02 21:57:33 -070025import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
26import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
Jorim Jaggife762342016-10-13 14:33:27 +020027import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS;
Yi Jin6c6e9ca2018-03-20 16:53:35 -070028import static com.android.server.am.KeyguardControllerProto.KEYGUARD_OCCLUDED;
29import static com.android.server.am.KeyguardControllerProto.KEYGUARD_SHOWING;
Jorim Jaggif84e2f62018-01-16 14:17:59 +010030import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION;
31import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE;
32import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER;
33import static android.view.WindowManager.TRANSIT_KEYGUARD_GOING_AWAY;
34import static android.view.WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
35import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
36import static android.view.WindowManager.TRANSIT_UNSET;
Jorim Jaggife762342016-10-13 14:33:27 +020037
David Stevens9440dc82017-03-16 19:00:20 -070038import android.app.ActivityManagerInternal.SleepToken;
Jorim Jaggi241ae102016-11-02 21:57:33 -070039import android.os.IBinder;
40import android.os.RemoteException;
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -070041import android.os.Trace;
Jorim Jaggi241ae102016-11-02 21:57:33 -070042import android.util.Slog;
Steven Timotius4346f0a2017-09-12 11:07:21 -070043import android.util.proto.ProtoOutputStream;
Adrian Roose99bc052017-11-20 17:55:31 +010044
Jorim Jaggi241ae102016-11-02 21:57:33 -070045import com.android.internal.policy.IKeyguardDismissCallback;
Adrian Roose99bc052017-11-20 17:55:31 +010046import com.android.server.policy.WindowManagerPolicy;
Jorim Jaggife762342016-10-13 14:33:27 +020047import com.android.server.wm.WindowManagerService;
Adrian Roose99bc052017-11-20 17:55:31 +010048
Jorim Jaggi8d786932016-10-26 19:08:36 -070049import java.io.PrintWriter;
Jorim Jaggife762342016-10-13 14:33:27 +020050
51/**
52 * Controls Keyguard occluding, dismissing and transitions depending on what kind of activities are
53 * currently visible.
54 * <p>
55 * Note that everything in this class should only be accessed with the AM lock being held.
56 */
57class KeyguardController {
58
Jorim Jaggi241ae102016-11-02 21:57:33 -070059 private static final String TAG = TAG_WITH_CLASS_NAME ? "KeyguardController" : TAG_AM;
60
Jorim Jaggife762342016-10-13 14:33:27 +020061 private final ActivityManagerService mService;
62 private final ActivityStackSupervisor mStackSupervisor;
63 private WindowManagerService mWindowManager;
Jorim Jaggife762342016-10-13 14:33:27 +020064 private boolean mKeyguardShowing;
Lucas Dupin47a65c72018-02-15 14:16:18 -080065 private boolean mAodShowing;
Jorim Jaggi8d786932016-10-26 19:08:36 -070066 private boolean mKeyguardGoingAway;
Jorim Jaggife762342016-10-13 14:33:27 +020067 private boolean mOccluded;
Jorim Jaggi07961872016-11-23 11:28:57 +010068 private boolean mDismissalRequested;
Jorim Jaggife762342016-10-13 14:33:27 +020069 private ActivityRecord mDismissingKeyguardActivity;
70 private int mBeforeUnoccludeTransit;
71 private int mVisibilityTransactionDepth;
David Stevens9440dc82017-03-16 19:00:20 -070072 private SleepToken mSleepToken;
David Stevens53a39ea2017-08-23 18:41:49 -070073 private int mSecondaryDisplayShowing = INVALID_DISPLAY;
Jorim Jaggife762342016-10-13 14:33:27 +020074
75 KeyguardController(ActivityManagerService service,
76 ActivityStackSupervisor stackSupervisor) {
77 mService = service;
78 mStackSupervisor = stackSupervisor;
79 }
80
81 void setWindowManager(WindowManagerService windowManager) {
82 mWindowManager = windowManager;
83 }
84
85 /**
Lucas Dupin47a65c72018-02-15 14:16:18 -080086 * @return true if either Keyguard or AOD are showing, not going away, and not being occluded
87 * on the given display, false otherwise
88 */
89 boolean isKeyguardOrAodShowing(int displayId) {
90 return (mKeyguardShowing || mAodShowing) && !mKeyguardGoingAway &&
91 (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing);
92 }
93
94 /**
David Stevens53a39ea2017-08-23 18:41:49 -070095 * @return true if Keyguard is showing, not going away, and not being occluded on the given
96 * display, false otherwise
Jorim Jaggife762342016-10-13 14:33:27 +020097 */
David Stevens53a39ea2017-08-23 18:41:49 -070098 boolean isKeyguardShowing(int displayId) {
Bryce Leed939cf02018-03-12 09:04:44 -070099 return mKeyguardShowing && !mKeyguardGoingAway &&
100 (displayId == DEFAULT_DISPLAY ? !mOccluded : displayId == mSecondaryDisplayShowing);
Jorim Jaggife762342016-10-13 14:33:27 +0200101 }
102
103 /**
104 * @return true if Keyguard is either showing or occluded, but not going away
105 */
106 boolean isKeyguardLocked() {
107 return mKeyguardShowing && !mKeyguardGoingAway;
108 }
109
110 /**
Bryce Lee271617a2018-03-15 10:39:12 -0700111 * @return {@code true} if the keyguard is going away, {@code false} otherwise.
112 */
113 boolean isKeyguardGoingAway() {
114 // Also check keyguard showing in case value is stale.
115 return mKeyguardGoingAway && mKeyguardShowing;
116 }
117
118 /**
Jorim Jaggife762342016-10-13 14:33:27 +0200119 * Update the Keyguard showing state.
120 */
Lucas Dupin47a65c72018-02-15 14:16:18 -0800121 void setKeyguardShown(boolean keyguardShowing, boolean aodShowing,
122 int secondaryDisplayShowing) {
123 boolean showingChanged = keyguardShowing != mKeyguardShowing || aodShowing != mAodShowing;
Adrian Roos6ec76b72018-04-25 14:01:11 +0200124 // If keyguard is going away, but SystemUI aborted the transition, need to reset state.
125 showingChanged |= mKeyguardGoingAway && keyguardShowing;
David Stevens53a39ea2017-08-23 18:41:49 -0700126 if (!showingChanged && secondaryDisplayShowing == mSecondaryDisplayShowing) {
Jorim Jaggife762342016-10-13 14:33:27 +0200127 return;
128 }
Lucas Dupin47a65c72018-02-15 14:16:18 -0800129 mKeyguardShowing = keyguardShowing;
130 mAodShowing = aodShowing;
David Stevens53a39ea2017-08-23 18:41:49 -0700131 mSecondaryDisplayShowing = secondaryDisplayShowing;
132 if (showingChanged) {
133 dismissDockedStackIfNeeded();
Andrii Kulian0d595f32018-02-21 15:47:33 -0800134 setKeyguardGoingAway(false);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800135 if (keyguardShowing) {
David Stevens53a39ea2017-08-23 18:41:49 -0700136 mDismissalRequested = false;
137 }
Jorim Jaggife762342016-10-13 14:33:27 +0200138 }
139 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
David Stevens9440dc82017-03-16 19:00:20 -0700140 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200141 }
142
143 /**
144 * Called when Keyguard is going away.
145 *
Adrian Roose99bc052017-11-20 17:55:31 +0100146 * @param flags See {@link WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
Jorim Jaggife762342016-10-13 14:33:27 +0200147 * etc.
148 */
149 void keyguardGoingAway(int flags) {
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700150 if (!mKeyguardShowing) {
151 return;
152 }
153 Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "keyguardGoingAway");
154 mWindowManager.deferSurfaceLayout();
155 try {
156 setKeyguardGoingAway(true);
157 mWindowManager.prepareAppTransition(TRANSIT_KEYGUARD_GOING_AWAY,
158 false /* alwaysKeepCurrent */, convertTransitFlags(flags),
159 false /* forceOverride */);
David Stevens9440dc82017-03-16 19:00:20 -0700160 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200161
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700162 // Some stack visibility might change (e.g. docked stack)
Andrii Kulian0d595f32018-02-21 15:47:33 -0800163 mStackSupervisor.resumeFocusedStackTopActivityLocked();
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700164 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
165 mStackSupervisor.addStartingWindowsForVisibleActivities(true /* taskSwitch */);
166 mWindowManager.executeAppTransition();
167 } finally {
168 Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "keyguardGoingAway: surfaceLayout");
169 mWindowManager.continueSurfaceLayout();
170 Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
171
172 Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
Jorim Jaggife762342016-10-13 14:33:27 +0200173 }
174 }
175
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800176 void dismissKeyguard(IBinder token, IKeyguardDismissCallback callback, CharSequence message) {
Jorim Jaggi241ae102016-11-02 21:57:33 -0700177 final ActivityRecord activityRecord = ActivityRecord.forTokenLocked(token);
178 if (activityRecord == null || !activityRecord.visibleIgnoringKeyguard) {
179 failCallback(callback);
180 return;
181 }
Jorim Jaggid7214892017-07-18 14:05:19 +0200182 Slog.i(TAG, "Activity requesting to dismiss Keyguard: " + activityRecord);
chaviw59b98852017-06-13 12:05:44 -0700183
184 // If the client has requested to dismiss the keyguard and the Activity has the flag to
185 // turn the screen on, wakeup the screen if it's the top Activity.
186 if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) {
187 mStackSupervisor.wakeUp("dismissKeyguard");
188 }
189
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800190 mWindowManager.dismissKeyguard(callback, message);
Jorim Jaggi241ae102016-11-02 21:57:33 -0700191 }
192
Wale Ogunwalebfa81ad2017-05-24 15:14:42 -0700193 private void setKeyguardGoingAway(boolean keyguardGoingAway) {
194 mKeyguardGoingAway = keyguardGoingAway;
195 mWindowManager.setKeyguardGoingAway(keyguardGoingAway);
196 }
197
Jorim Jaggi241ae102016-11-02 21:57:33 -0700198 private void failCallback(IKeyguardDismissCallback callback) {
199 try {
200 callback.onDismissError();
201 } catch (RemoteException e) {
202 Slog.w(TAG, "Failed to call callback", e);
203 }
204 }
205
Jorim Jaggife762342016-10-13 14:33:27 +0200206 private int convertTransitFlags(int keyguardGoingAwayFlags) {
207 int result = 0;
208 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_TO_SHADE) != 0) {
209 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE;
210 }
211 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS) != 0) {
212 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION;
213 }
214 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER) != 0) {
215 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER;
216 }
217 return result;
218 }
219
220 /**
221 * Starts a batch of visibility updates.
222 */
223 void beginActivityVisibilityUpdate() {
224 mVisibilityTransactionDepth++;
225 }
226
227 /**
228 * Ends a batch of visibility updates. After all batches are done, this method makes sure to
229 * update lockscreen occluded/dismiss state if needed.
230 */
231 void endActivityVisibilityUpdate() {
232 mVisibilityTransactionDepth--;
233 if (mVisibilityTransactionDepth == 0) {
234 visibilitiesUpdated();
235 }
236 }
237
Jorim Jaggie69c9312016-10-31 18:24:38 -0700238 /**
239 * @return True if we may show an activity while Keyguard is showing because we are in the
240 * process of dismissing it anyways, false otherwise.
241 */
Jorim Jaggi07961872016-11-23 11:28:57 +0100242 boolean canShowActivityWhileKeyguardShowing(ActivityRecord r, boolean dismissKeyguard) {
243
244 // Allow to show it when we are about to dismiss Keyguard. This isn't allowed if r is
245 // already the dismissing activity, in which case we don't allow it to repeatedly dismiss
246 // Keyguard.
Lucas Dupin47a65c72018-02-15 14:16:18 -0800247 return dismissKeyguard && canDismissKeyguard() && !mAodShowing
248 && (mDismissalRequested || r != mDismissingKeyguardActivity);
Jorim Jaggi07961872016-11-23 11:28:57 +0100249 }
250
251 /**
252 * @return True if we may show an activity while Keyguard is occluded, false otherwise.
253 */
254 boolean canShowWhileOccluded(boolean dismissKeyguard, boolean showWhenLocked) {
255 return showWhenLocked || dismissKeyguard && !mWindowManager.isKeyguardSecure();
Jorim Jaggie69c9312016-10-31 18:24:38 -0700256 }
257
Jorim Jaggife762342016-10-13 14:33:27 +0200258 private void visibilitiesUpdated() {
259 final boolean lastOccluded = mOccluded;
260 final ActivityRecord lastDismissingKeyguardActivity = mDismissingKeyguardActivity;
261 mOccluded = false;
262 mDismissingKeyguardActivity = null;
Jorim Jaggife762342016-10-13 14:33:27 +0200263
Pat Plunkett40426e02017-10-31 14:06:29 -0700264 for (int displayNdx = mStackSupervisor.getChildCount() - 1; displayNdx >= 0; displayNdx--) {
265 final ActivityDisplay display = mStackSupervisor.getChildAt(displayNdx);
266 for (int stackNdx = display.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
267 final ActivityStack stack = display.getChildAt(stackNdx);
Jorim Jaggi07961872016-11-23 11:28:57 +0100268
Pat Plunkett40426e02017-10-31 14:06:29 -0700269 // Only the top activity of the focused stack on the default display may control
270 // occluded state.
271 if (display.mDisplayId == DEFAULT_DISPLAY
272 && mStackSupervisor.isFocusedStack(stack)) {
273
274 // A dismissing activity occludes Keyguard in the insecure case for legacy
275 // reasons.
276 final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity();
277 mOccluded =
278 stack.topActivityOccludesKeyguard()
279 || (topDismissing != null
280 && stack.topRunningActivityLocked() == topDismissing
281 && canShowWhileOccluded(
282 true /* dismissKeyguard */,
283 false /* showWhenLocked */));
284 }
285
286 if (mDismissingKeyguardActivity == null
287 && stack.getTopDismissingKeyguardActivity() != null) {
288 mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity();
289 }
Jorim Jaggife762342016-10-13 14:33:27 +0200290 }
291 }
Jorim Jaggi77e10432016-10-26 17:43:56 -0700292 mOccluded |= mWindowManager.isShowingDream();
Jorim Jaggife762342016-10-13 14:33:27 +0200293 if (mOccluded != lastOccluded) {
294 handleOccludedChanged();
295 }
296 if (mDismissingKeyguardActivity != lastDismissingKeyguardActivity) {
297 handleDismissKeyguard();
298 }
299 }
300
301 /**
302 * Called when occluded state changed.
303 */
304 private void handleOccludedChanged() {
305 mWindowManager.onKeyguardOccludedChanged(mOccluded);
306 if (isKeyguardLocked()) {
307 mWindowManager.deferSurfaceLayout();
308 try {
309 mWindowManager.prepareAppTransition(resolveOccludeTransit(),
310 false /* alwaysKeepCurrent */, 0 /* flags */, true /* forceOverride */);
David Stevens9440dc82017-03-16 19:00:20 -0700311 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200312 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
313 mWindowManager.executeAppTransition();
314 } finally {
315 mWindowManager.continueSurfaceLayout();
316 }
317 }
318 dismissDockedStackIfNeeded();
319 }
320
321 /**
322 * Called when somebody might want to dismiss the Keyguard.
323 */
324 private void handleDismissKeyguard() {
Jorim Jaggi07961872016-11-23 11:28:57 +0100325 // We only allow dismissing Keyguard via the flag when Keyguard is secure for legacy
326 // reasons, because that's how apps used to dismiss Keyguard in the secure case. In the
327 // insecure case, we actually show it on top of the lockscreen. See #canShowWhileOccluded.
328 if (!mOccluded && mDismissingKeyguardActivity != null
329 && mWindowManager.isKeyguardSecure()) {
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800330 mWindowManager.dismissKeyguard(null /* callback */, null /* message */);
Jorim Jaggi07961872016-11-23 11:28:57 +0100331 mDismissalRequested = true;
Jorim Jaggife762342016-10-13 14:33:27 +0200332
333 // If we are about to unocclude the Keyguard, but we can dismiss it without security,
334 // we immediately dismiss the Keyguard so the activity gets shown without a flicker.
335 if (mKeyguardShowing && canDismissKeyguard()
336 && mWindowManager.getPendingAppTransition() == TRANSIT_KEYGUARD_UNOCCLUDE) {
337 mWindowManager.prepareAppTransition(mBeforeUnoccludeTransit,
338 false /* alwaysKeepCurrent */, 0 /* flags */, true /* forceOverride */);
Jorim Jaggife762342016-10-13 14:33:27 +0200339 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
340 mWindowManager.executeAppTransition();
341 }
342 }
343 }
344
345 /**
346 * @return true if Keyguard can be currently dismissed without entering credentials.
347 */
Andrii Kulianfc8f82b2017-01-26 13:17:27 -0800348 boolean canDismissKeyguard() {
Jorim Jaggife762342016-10-13 14:33:27 +0200349 return mWindowManager.isKeyguardTrusted() || !mWindowManager.isKeyguardSecure();
350 }
351
352 private int resolveOccludeTransit() {
353 if (mBeforeUnoccludeTransit != TRANSIT_UNSET
354 && mWindowManager.getPendingAppTransition() == TRANSIT_KEYGUARD_UNOCCLUDE
355 && mOccluded) {
356
357 // Reuse old transit in case we are occluding Keyguard again, meaning that we never
358 // actually occclude/unocclude Keyguard, but just run a normal transition.
359 return mBeforeUnoccludeTransit;
360 } else if (!mOccluded) {
361
362 // Save transit in case we dismiss/occlude Keyguard shortly after.
363 mBeforeUnoccludeTransit = mWindowManager.getPendingAppTransition();
364 return TRANSIT_KEYGUARD_UNOCCLUDE;
365 } else {
366 return TRANSIT_KEYGUARD_OCCLUDE;
367 }
368 }
369
370 private void dismissDockedStackIfNeeded() {
371 if (mKeyguardShowing && mOccluded) {
372 // The lock screen is currently showing, but is occluded by a window that can
373 // show on top of the lock screen. In this can we want to dismiss the docked
374 // stack since it will be complicated/risky to try to put the activity on top
375 // of the lock screen in the right fullscreen configuration.
Wale Ogunwalea0f5b5e2017-10-11 09:37:23 -0700376 final ActivityStack stack = mStackSupervisor.getDefaultDisplay().getSplitScreenPrimaryStack();
Wale Ogunwale9dcf9462017-09-19 15:13:01 -0700377 if (stack == null) {
378 return;
379 }
380 mStackSupervisor.moveTasksToFullscreenStackLocked(stack,
381 mStackSupervisor.mFocusedStack == stack);
Jorim Jaggife762342016-10-13 14:33:27 +0200382 }
383 }
Jorim Jaggi8d786932016-10-26 19:08:36 -0700384
David Stevens9440dc82017-03-16 19:00:20 -0700385 private void updateKeyguardSleepToken() {
Lucas Dupin47a65c72018-02-15 14:16:18 -0800386 if (mSleepToken == null && isKeyguardOrAodShowing(DEFAULT_DISPLAY)) {
David Stevens9440dc82017-03-16 19:00:20 -0700387 mSleepToken = mService.acquireSleepToken("Keyguard", DEFAULT_DISPLAY);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800388 } else if (mSleepToken != null && !isKeyguardOrAodShowing(DEFAULT_DISPLAY)) {
David Stevens9440dc82017-03-16 19:00:20 -0700389 mSleepToken.release();
390 mSleepToken = null;
391 }
392 }
393
Jorim Jaggi8d786932016-10-26 19:08:36 -0700394 void dump(PrintWriter pw, String prefix) {
395 pw.println(prefix + "KeyguardController:");
396 pw.println(prefix + " mKeyguardShowing=" + mKeyguardShowing);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800397 pw.println(prefix + " mAodShowing=" + mAodShowing);
Jorim Jaggi8d786932016-10-26 19:08:36 -0700398 pw.println(prefix + " mKeyguardGoingAway=" + mKeyguardGoingAway);
399 pw.println(prefix + " mOccluded=" + mOccluded);
400 pw.println(prefix + " mDismissingKeyguardActivity=" + mDismissingKeyguardActivity);
Jorim Jaggi07961872016-11-23 11:28:57 +0100401 pw.println(prefix + " mDismissalRequested=" + mDismissalRequested);
Jorim Jaggi8d786932016-10-26 19:08:36 -0700402 pw.println(prefix + " mVisibilityTransactionDepth=" + mVisibilityTransactionDepth);
403 }
Steven Timotius4346f0a2017-09-12 11:07:21 -0700404
405 void writeToProto(ProtoOutputStream proto, long fieldId) {
406 final long token = proto.start(fieldId);
407 proto.write(KEYGUARD_SHOWING, mKeyguardShowing);
408 proto.write(KEYGUARD_OCCLUDED, mOccluded);
409 proto.end(token);
410 }
Jorim Jaggife762342016-10-13 14:33:27 +0200411}