1/*
2 * Copyright (C) 2008 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.internal.policy.impl.keyguard_obsolete;
18
19import android.content.res.Configuration;
20
21/**
22 * Within a keyguard, there may be several screens that need a callback
23 * to the host keyguard view.
24 */
25public interface KeyguardScreenCallback extends KeyguardViewCallback {
26
27    /**
28     * Transition to the lock screen.
29     */
30    void goToLockScreen();
31
32    /**
33     * Transition to the unlock screen.
34     */
35    void goToUnlockScreen();
36
37    /**
38     * The user reported that they forgot their pattern (or not, when they want to back out of the
39     * forgot pattern screen).
40     *
41     * @param isForgotten True if the user hit the forgot pattern, false if they want to back out
42     *        of the account screen.
43     */
44    void forgotPattern(boolean isForgotten);
45
46    /**
47     * @return Whether the keyguard requires some sort of PIN.
48     */
49    boolean isSecure();
50
51    /**
52     * @return Whether we are in a mode where we only want to verify the
53     *   user can get past the keyguard.
54     */
55    boolean isVerifyUnlockOnly();
56
57    /**
58     * Stay on me, but recreate me (so I can use a different layout).
59     */
60    void recreateMe(Configuration config);
61
62    /**
63     * Take action to send an emergency call.
64     */
65    void takeEmergencyCallAction();
66
67    /**
68     * Report that the user had a failed attempt to unlock with password or pattern.
69     */
70    void reportFailedUnlockAttempt();
71
72    /**
73     * Report that the user successfully entered their password or pattern.
74     */
75    void reportSuccessfulUnlockAttempt();
76
77    /**
78     * Report whether we there's another way to unlock the device.
79     * @return true
80     */
81    boolean doesFallbackUnlockScreenExist();
82}
83