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