blob: 04aec7d99301b28fc36e9313ed7248fb157a551f [file] [log] [blame]
Craig Mautner27084302013-03-25 08:05:25 -07001/*
2 * Copyright (C) 2013 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
19import java.io.PrintWriter;
20
21public class ActivityStackSupervisor {
22
23 final ActivityManagerService mService;
24
25 /** Dismiss the keyguard after the next activity is displayed? */
26 private boolean mDismissKeyguardOnNextActivity = false;
27
28 public ActivityStackSupervisor(ActivityManagerService service) {
29 mService = service;
30 }
31
32 void dismissKeyguard() {
33 if (mDismissKeyguardOnNextActivity) {
34 mDismissKeyguardOnNextActivity = false;
35 mService.mWindowManager.dismissKeyguard();
36 }
37 }
38
39 void setDismissKeyguard(boolean dismiss) {
40 mDismissKeyguardOnNextActivity = dismiss;
41 }
42
43 public void dump(PrintWriter pw, String prefix) {
44 pw.print(prefix); pw.print("mDismissKeyguardOnNextActivity:");
45 pw.println(mDismissKeyguardOnNextActivity);
46 }
47}