blob: 1b7f75b2d52cd7aa537a580ec96c1d4cf78ab002 [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;
David Stevens53a39ea2017-08-23 18:41:49 -0700124 if (!showingChanged && secondaryDisplayShowing == mSecondaryDisplayShowing) {
Jorim Jaggife762342016-10-13 14:33:27 +0200125 return;
126 }
Lucas Dupin47a65c72018-02-15 14:16:18 -0800127 mKeyguardShowing = keyguardShowing;
128 mAodShowing = aodShowing;
David Stevens53a39ea2017-08-23 18:41:49 -0700129 mSecondaryDisplayShowing = secondaryDisplayShowing;
130 if (showingChanged) {
131 dismissDockedStackIfNeeded();
Andrii Kulian0d595f32018-02-21 15:47:33 -0800132 setKeyguardGoingAway(false);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800133 if (keyguardShowing) {
David Stevens53a39ea2017-08-23 18:41:49 -0700134 mDismissalRequested = false;
135 }
Jorim Jaggife762342016-10-13 14:33:27 +0200136 }
137 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
David Stevens9440dc82017-03-16 19:00:20 -0700138 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200139 }
140
141 /**
142 * Called when Keyguard is going away.
143 *
Adrian Roose99bc052017-11-20 17:55:31 +0100144 * @param flags See {@link WindowManagerPolicy#KEYGUARD_GOING_AWAY_FLAG_TO_SHADE}
Jorim Jaggife762342016-10-13 14:33:27 +0200145 * etc.
146 */
147 void keyguardGoingAway(int flags) {
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700148 if (!mKeyguardShowing) {
149 return;
150 }
151 Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "keyguardGoingAway");
152 mWindowManager.deferSurfaceLayout();
153 try {
154 setKeyguardGoingAway(true);
155 mWindowManager.prepareAppTransition(TRANSIT_KEYGUARD_GOING_AWAY,
156 false /* alwaysKeepCurrent */, convertTransitFlags(flags),
157 false /* forceOverride */);
David Stevens9440dc82017-03-16 19:00:20 -0700158 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200159
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700160 // Some stack visibility might change (e.g. docked stack)
Andrii Kulian0d595f32018-02-21 15:47:33 -0800161 mStackSupervisor.resumeFocusedStackTopActivityLocked();
Wale Ogunwaledfb7fb22017-06-23 14:52:40 -0700162 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
163 mStackSupervisor.addStartingWindowsForVisibleActivities(true /* taskSwitch */);
164 mWindowManager.executeAppTransition();
165 } finally {
166 Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "keyguardGoingAway: surfaceLayout");
167 mWindowManager.continueSurfaceLayout();
168 Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
169
170 Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
Jorim Jaggife762342016-10-13 14:33:27 +0200171 }
172 }
173
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800174 void dismissKeyguard(IBinder token, IKeyguardDismissCallback callback, CharSequence message) {
Jorim Jaggi241ae102016-11-02 21:57:33 -0700175 final ActivityRecord activityRecord = ActivityRecord.forTokenLocked(token);
176 if (activityRecord == null || !activityRecord.visibleIgnoringKeyguard) {
177 failCallback(callback);
178 return;
179 }
Jorim Jaggid7214892017-07-18 14:05:19 +0200180 Slog.i(TAG, "Activity requesting to dismiss Keyguard: " + activityRecord);
chaviw59b98852017-06-13 12:05:44 -0700181
182 // If the client has requested to dismiss the keyguard and the Activity has the flag to
183 // turn the screen on, wakeup the screen if it's the top Activity.
184 if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) {
185 mStackSupervisor.wakeUp("dismissKeyguard");
186 }
187
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800188 mWindowManager.dismissKeyguard(callback, message);
Jorim Jaggi241ae102016-11-02 21:57:33 -0700189 }
190
Wale Ogunwalebfa81ad2017-05-24 15:14:42 -0700191 private void setKeyguardGoingAway(boolean keyguardGoingAway) {
192 mKeyguardGoingAway = keyguardGoingAway;
193 mWindowManager.setKeyguardGoingAway(keyguardGoingAway);
194 }
195
Jorim Jaggi241ae102016-11-02 21:57:33 -0700196 private void failCallback(IKeyguardDismissCallback callback) {
197 try {
198 callback.onDismissError();
199 } catch (RemoteException e) {
200 Slog.w(TAG, "Failed to call callback", e);
201 }
202 }
203
Jorim Jaggife762342016-10-13 14:33:27 +0200204 private int convertTransitFlags(int keyguardGoingAwayFlags) {
205 int result = 0;
206 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_TO_SHADE) != 0) {
207 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE;
208 }
209 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS) != 0) {
210 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION;
211 }
212 if ((keyguardGoingAwayFlags & KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER) != 0) {
213 result |= TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER;
214 }
215 return result;
216 }
217
218 /**
219 * Starts a batch of visibility updates.
220 */
221 void beginActivityVisibilityUpdate() {
222 mVisibilityTransactionDepth++;
223 }
224
225 /**
226 * Ends a batch of visibility updates. After all batches are done, this method makes sure to
227 * update lockscreen occluded/dismiss state if needed.
228 */
229 void endActivityVisibilityUpdate() {
230 mVisibilityTransactionDepth--;
231 if (mVisibilityTransactionDepth == 0) {
232 visibilitiesUpdated();
233 }
234 }
235
Jorim Jaggie69c9312016-10-31 18:24:38 -0700236 /**
237 * @return True if we may show an activity while Keyguard is showing because we are in the
238 * process of dismissing it anyways, false otherwise.
239 */
Jorim Jaggi07961872016-11-23 11:28:57 +0100240 boolean canShowActivityWhileKeyguardShowing(ActivityRecord r, boolean dismissKeyguard) {
241
242 // Allow to show it when we are about to dismiss Keyguard. This isn't allowed if r is
243 // already the dismissing activity, in which case we don't allow it to repeatedly dismiss
244 // Keyguard.
Lucas Dupin47a65c72018-02-15 14:16:18 -0800245 return dismissKeyguard && canDismissKeyguard() && !mAodShowing
246 && (mDismissalRequested || r != mDismissingKeyguardActivity);
Jorim Jaggi07961872016-11-23 11:28:57 +0100247 }
248
249 /**
250 * @return True if we may show an activity while Keyguard is occluded, false otherwise.
251 */
252 boolean canShowWhileOccluded(boolean dismissKeyguard, boolean showWhenLocked) {
253 return showWhenLocked || dismissKeyguard && !mWindowManager.isKeyguardSecure();
Jorim Jaggie69c9312016-10-31 18:24:38 -0700254 }
255
Jorim Jaggife762342016-10-13 14:33:27 +0200256 private void visibilitiesUpdated() {
257 final boolean lastOccluded = mOccluded;
258 final ActivityRecord lastDismissingKeyguardActivity = mDismissingKeyguardActivity;
259 mOccluded = false;
260 mDismissingKeyguardActivity = null;
Jorim Jaggife762342016-10-13 14:33:27 +0200261
Pat Plunkett40426e02017-10-31 14:06:29 -0700262 for (int displayNdx = mStackSupervisor.getChildCount() - 1; displayNdx >= 0; displayNdx--) {
263 final ActivityDisplay display = mStackSupervisor.getChildAt(displayNdx);
264 for (int stackNdx = display.getChildCount() - 1; stackNdx >= 0; --stackNdx) {
265 final ActivityStack stack = display.getChildAt(stackNdx);
Jorim Jaggi07961872016-11-23 11:28:57 +0100266
Pat Plunkett40426e02017-10-31 14:06:29 -0700267 // Only the top activity of the focused stack on the default display may control
268 // occluded state.
269 if (display.mDisplayId == DEFAULT_DISPLAY
270 && mStackSupervisor.isFocusedStack(stack)) {
271
272 // A dismissing activity occludes Keyguard in the insecure case for legacy
273 // reasons.
274 final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity();
275 mOccluded =
276 stack.topActivityOccludesKeyguard()
277 || (topDismissing != null
278 && stack.topRunningActivityLocked() == topDismissing
279 && canShowWhileOccluded(
280 true /* dismissKeyguard */,
281 false /* showWhenLocked */));
282 }
283
284 if (mDismissingKeyguardActivity == null
285 && stack.getTopDismissingKeyguardActivity() != null) {
286 mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity();
287 }
Jorim Jaggife762342016-10-13 14:33:27 +0200288 }
289 }
Jorim Jaggi77e10432016-10-26 17:43:56 -0700290 mOccluded |= mWindowManager.isShowingDream();
Jorim Jaggife762342016-10-13 14:33:27 +0200291 if (mOccluded != lastOccluded) {
292 handleOccludedChanged();
293 }
294 if (mDismissingKeyguardActivity != lastDismissingKeyguardActivity) {
295 handleDismissKeyguard();
296 }
297 }
298
299 /**
300 * Called when occluded state changed.
301 */
302 private void handleOccludedChanged() {
303 mWindowManager.onKeyguardOccludedChanged(mOccluded);
304 if (isKeyguardLocked()) {
305 mWindowManager.deferSurfaceLayout();
306 try {
307 mWindowManager.prepareAppTransition(resolveOccludeTransit(),
308 false /* alwaysKeepCurrent */, 0 /* flags */, true /* forceOverride */);
David Stevens9440dc82017-03-16 19:00:20 -0700309 updateKeyguardSleepToken();
Jorim Jaggife762342016-10-13 14:33:27 +0200310 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
311 mWindowManager.executeAppTransition();
312 } finally {
313 mWindowManager.continueSurfaceLayout();
314 }
315 }
316 dismissDockedStackIfNeeded();
317 }
318
319 /**
320 * Called when somebody might want to dismiss the Keyguard.
321 */
322 private void handleDismissKeyguard() {
Jorim Jaggi07961872016-11-23 11:28:57 +0100323 // We only allow dismissing Keyguard via the flag when Keyguard is secure for legacy
324 // reasons, because that's how apps used to dismiss Keyguard in the secure case. In the
325 // insecure case, we actually show it on top of the lockscreen. See #canShowWhileOccluded.
326 if (!mOccluded && mDismissingKeyguardActivity != null
327 && mWindowManager.isKeyguardSecure()) {
Lucas Dupinc80c67e2017-12-04 14:29:10 -0800328 mWindowManager.dismissKeyguard(null /* callback */, null /* message */);
Jorim Jaggi07961872016-11-23 11:28:57 +0100329 mDismissalRequested = true;
Jorim Jaggife762342016-10-13 14:33:27 +0200330
331 // If we are about to unocclude the Keyguard, but we can dismiss it without security,
332 // we immediately dismiss the Keyguard so the activity gets shown without a flicker.
333 if (mKeyguardShowing && canDismissKeyguard()
334 && mWindowManager.getPendingAppTransition() == TRANSIT_KEYGUARD_UNOCCLUDE) {
335 mWindowManager.prepareAppTransition(mBeforeUnoccludeTransit,
336 false /* alwaysKeepCurrent */, 0 /* flags */, true /* forceOverride */);
Jorim Jaggife762342016-10-13 14:33:27 +0200337 mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
338 mWindowManager.executeAppTransition();
339 }
340 }
341 }
342
343 /**
344 * @return true if Keyguard can be currently dismissed without entering credentials.
345 */
Andrii Kulianfc8f82b2017-01-26 13:17:27 -0800346 boolean canDismissKeyguard() {
Jorim Jaggife762342016-10-13 14:33:27 +0200347 return mWindowManager.isKeyguardTrusted() || !mWindowManager.isKeyguardSecure();
348 }
349
350 private int resolveOccludeTransit() {
351 if (mBeforeUnoccludeTransit != TRANSIT_UNSET
352 && mWindowManager.getPendingAppTransition() == TRANSIT_KEYGUARD_UNOCCLUDE
353 && mOccluded) {
354
355 // Reuse old transit in case we are occluding Keyguard again, meaning that we never
356 // actually occclude/unocclude Keyguard, but just run a normal transition.
357 return mBeforeUnoccludeTransit;
358 } else if (!mOccluded) {
359
360 // Save transit in case we dismiss/occlude Keyguard shortly after.
361 mBeforeUnoccludeTransit = mWindowManager.getPendingAppTransition();
362 return TRANSIT_KEYGUARD_UNOCCLUDE;
363 } else {
364 return TRANSIT_KEYGUARD_OCCLUDE;
365 }
366 }
367
368 private void dismissDockedStackIfNeeded() {
369 if (mKeyguardShowing && mOccluded) {
370 // The lock screen is currently showing, but is occluded by a window that can
371 // show on top of the lock screen. In this can we want to dismiss the docked
372 // stack since it will be complicated/risky to try to put the activity on top
373 // of the lock screen in the right fullscreen configuration.
Wale Ogunwalea0f5b5e2017-10-11 09:37:23 -0700374 final ActivityStack stack = mStackSupervisor.getDefaultDisplay().getSplitScreenPrimaryStack();
Wale Ogunwale9dcf9462017-09-19 15:13:01 -0700375 if (stack == null) {
376 return;
377 }
378 mStackSupervisor.moveTasksToFullscreenStackLocked(stack,
379 mStackSupervisor.mFocusedStack == stack);
Jorim Jaggife762342016-10-13 14:33:27 +0200380 }
381 }
Jorim Jaggi8d786932016-10-26 19:08:36 -0700382
David Stevens9440dc82017-03-16 19:00:20 -0700383 private void updateKeyguardSleepToken() {
Lucas Dupin47a65c72018-02-15 14:16:18 -0800384 if (mSleepToken == null && isKeyguardOrAodShowing(DEFAULT_DISPLAY)) {
David Stevens9440dc82017-03-16 19:00:20 -0700385 mSleepToken = mService.acquireSleepToken("Keyguard", DEFAULT_DISPLAY);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800386 } else if (mSleepToken != null && !isKeyguardOrAodShowing(DEFAULT_DISPLAY)) {
David Stevens9440dc82017-03-16 19:00:20 -0700387 mSleepToken.release();
388 mSleepToken = null;
389 }
390 }
391
Jorim Jaggi8d786932016-10-26 19:08:36 -0700392 void dump(PrintWriter pw, String prefix) {
393 pw.println(prefix + "KeyguardController:");
394 pw.println(prefix + " mKeyguardShowing=" + mKeyguardShowing);
Lucas Dupin47a65c72018-02-15 14:16:18 -0800395 pw.println(prefix + " mAodShowing=" + mAodShowing);
Jorim Jaggi8d786932016-10-26 19:08:36 -0700396 pw.println(prefix + " mKeyguardGoingAway=" + mKeyguardGoingAway);
397 pw.println(prefix + " mOccluded=" + mOccluded);
398 pw.println(prefix + " mDismissingKeyguardActivity=" + mDismissingKeyguardActivity);
Jorim Jaggi07961872016-11-23 11:28:57 +0100399 pw.println(prefix + " mDismissalRequested=" + mDismissalRequested);
Jorim Jaggi8d786932016-10-26 19:08:36 -0700400 pw.println(prefix + " mVisibilityTransactionDepth=" + mVisibilityTransactionDepth);
401 }
Steven Timotius4346f0a2017-09-12 11:07:21 -0700402
403 void writeToProto(ProtoOutputStream proto, long fieldId) {
404 final long token = proto.start(fieldId);
405 proto.write(KEYGUARD_SHOWING, mKeyguardShowing);
406 proto.write(KEYGUARD_OCCLUDED, mOccluded);
407 proto.end(token);
408 }
Jorim Jaggife762342016-10-13 14:33:27 +0200409}