UserStartedState.java revision 80a4af2bbc6af42ae605e454bf89558e564f5244
1/*
2 * Copyright (C) 2012 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;
20import java.util.ArrayList;
21
22import android.app.IStopUserCallback;
23import android.os.UserHandle;
24
25public class UserStartedState {
26    public final static int STATE_BOOTING = 0;
27    public final static int STATE_RUNNING = 1;
28    public final static int STATE_STOPPING = 2;
29
30    public final UserHandle mHandle;
31    public final ArrayList<IStopUserCallback> mStopCallbacks
32            = new ArrayList<IStopUserCallback>();
33
34    public int mState = STATE_BOOTING;
35
36    public UserStartedState(UserHandle handle, boolean initial) {
37        mHandle = handle;
38    }
39
40    void dump(String prefix, PrintWriter pw) {
41        pw.print(prefix); pw.print("mState="); pw.println(mState);
42    }
43}
44