BaseIDevicePolicyManager.java revision 031a2f1aafbc4e39ab5601567862d498e8949538
1/*
2 * Copyright (C) 2017 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 */
16package com.android.server.devicepolicy;
17
18import android.app.admin.IDevicePolicyManager;
19
20import com.android.internal.R;
21import com.android.server.SystemService;
22
23/**
24 * Defines the required interface for IDevicePolicyManager implemenation.
25 *
26 * <p>The interface consists of public parts determined by {@link IDevicePolicyManager} and also
27 * several package private methods required by internal infrastructure.
28 *
29 * <p>Whenever adding an AIDL method to {@link IDevicePolicyManager}, an empty override method
30 * should be added here to avoid build breakage in downstream branches.
31 */
32abstract class BaseIDevicePolicyManager extends IDevicePolicyManager.Stub {
33    /**
34     * To be called by {@link DevicePolicyManagerService#Lifecycle} during the various boot phases.
35     *
36     * @see {@link SystemService#onBootPhase}.
37     */
38    abstract void systemReady(int phase);
39    /**
40     * To be called by {@link DevicePolicyManagerService#Lifecycle} when a new user starts.
41     *
42     * @see {@link SystemService#onStartUser}
43     */
44    abstract void handleStartUser(int userId);
45    /**
46     * To be called by {@link DevicePolicyManagerService#Lifecycle} when a user is being unlocked.
47     *
48     * @see {@link SystemService#onUnlockUser}
49     */
50    abstract void handleUnlockUser(int userId);
51    /**
52     * To be called by {@link DevicePolicyManagerService#Lifecycle} when a user is being stopped.
53     *
54     * @see {@link SystemService#onStopUser}
55     */
56    abstract void handleStopUser(int userId);
57}
58