blob: 5bbcc8ce4335265555c6aa414c0234d199381869 [file] [log] [blame]
Jorim Jaggi5cf17872014-03-26 18:31:48 +01001/*
2 * Copyright (C) 2014 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.keyguard;
18
19/**
20 * The callback used by the keyguard view to tell the {@link KeyguardViewMediator}
21 * various things.
22 */
23public interface ViewMediatorCallback {
24 /**
25 * Reports user activity and requests that the screen stay on.
26 */
27 void userActivity();
28
29 /**
Jorim Jaggi5cf17872014-03-26 18:31:48 +010030 * Report that the keyguard is done.
31 * @param authenticated Whether the user securely got past the keyguard.
32 * the only reason for this to be false is if the keyguard was instructed
33 * to appear temporarily to verify the user is supposed to get past the
34 * keyguard, and the user fails to do so.
35 */
36 void keyguardDone(boolean authenticated);
37
38 /**
39 * Report that the keyguard is done drawing.
40 */
41 void keyguardDoneDrawing();
42
43 /**
44 * Tell ViewMediator that the current view needs IME input
45 * @param needsInput
46 */
47 void setNeedsInput(boolean needsInput);
48
49 /**
Jorim Jaggi5cf17872014-03-26 18:31:48 +010050 * Report that the keyguard is dismissable, pending the next keyguardDone call.
51 */
52 void keyguardDonePending();
53
54 /**
55 * Report when keyguard is actually gone
56 */
57 void keyguardGone();
Jorim Jaggi8de4311c2014-08-11 22:36:20 +020058
59 /**
60 * Report when the UI is ready for dismissing the whole Keyguard.
61 */
62 void readyForKeyguardDone();
Adrian Roos49e057d2014-08-13 17:14:51 +020063
64 /**
Andrew Lee72b46d42015-01-30 13:23:21 -080065 * Reset the keyguard and bouncer.
66 */
67 void resetKeyguard();
68
69 /**
Adrian Roos49e057d2014-08-13 17:14:51 +020070 * Play the "device trusted" sound.
71 */
72 void playTrustedSound();
Jim Millerab954542014-10-10 18:21:49 -070073
74 /**
75 * @return true if and only if Keyguard is showing or if Keyguard is disabled by an external app
76 * (legacy API)
77 */
78 boolean isInputRestricted();
Jorim Jaggi5cf17872014-03-26 18:31:48 +010079}