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 */
16package com.android.internal.policy.impl.keyguard_obsolete;
17
18import android.app.admin.DevicePolicyManager;
19import android.media.AudioManager;
20
21import com.android.internal.telephony.IccCardConstants;
22
23/**
24 * Callback for general information relevant to lock screen.
25 */
26class KeyguardUpdateMonitorCallback {
27    /**
28     * Called when the battery status changes, e.g. when plugged in or unplugged, charge
29     * level, etc. changes.
30     *
31     * @param status current battery status
32     */
33    void onRefreshBatteryInfo(KeyguardUpdateMonitor.BatteryStatus status) { }
34
35    /**
36     * Called once per minute or when the time changes.
37     */
38    void onTimeChanged() { }
39
40    /**
41     * Called when the carrier PLMN or SPN changes.
42     *
43     * @param plmn The operator name of the registered network.  May be null if it shouldn't
44     *   be displayed.
45     * @param spn The service provider name.  May be null if it shouldn't be displayed.
46     */
47    void onRefreshCarrierInfo(CharSequence plmn, CharSequence spn) { }
48
49    /**
50     * Called when the ringer mode changes.
51     * @param state the current ringer state, as defined in
52     * {@link AudioManager#RINGER_MODE_CHANGED_ACTION}
53     */
54    void onRingerModeChanged(int state) { }
55
56    /**
57     * Called when the phone state changes. String will be one of:
58     * {@link TelephonyManager#EXTRA_STATE_IDLE}
59     * {@link TelephonyManager@EXTRA_STATE_RINGING}
60     * {@link TelephonyManager#EXTRA_STATE_OFFHOOK
61     */
62    void onPhoneStateChanged(int phoneState) { }
63
64    /**
65     * Called when visibility of lockscreen clock changes, such as when
66     * obscured by a widget.
67     */
68    void onClockVisibilityChanged() { }
69
70    /**
71     * Called when the device becomes provisioned
72     */
73    void onDeviceProvisioned() { }
74
75    /**
76     * Called when the device policy changes.
77     * See {@link DevicePolicyManager#ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED}
78     */
79    void onDevicePolicyManagerStateChanged() { }
80
81    /**
82     * Called when the user changes.
83     */
84    void onUserSwitched(int userId) { }
85
86    /**
87     * Called when the SIM state changes.
88     * @param simState
89     */
90    void onSimStateChanged(IccCardConstants.State simState) { }
91
92    /**
93     * Called when a user is removed.
94     */
95    void onUserRemoved(int userId) { }
96}
97