Jorim Jaggi | 5cf1787 | 2014-03-26 18:31:48 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.keyguard; |
| 18 | |
| 19 | /** |
| 20 | * The callback used by the keyguard view to tell the {@link KeyguardViewMediator} |
| 21 | * various things. |
| 22 | */ |
| 23 | public interface ViewMediatorCallback { |
| 24 | /** |
| 25 | * Reports user activity and requests that the screen stay on. |
| 26 | */ |
| 27 | void userActivity(); |
| 28 | |
| 29 | /** |
| 30 | * Reports user activity and requests that the screen stay on for at least |
| 31 | * the specified amount of time. |
| 32 | * @param millis The amount of time in millis. This value is currently ignored. |
| 33 | */ |
| 34 | void userActivity(long millis); |
| 35 | |
| 36 | /** |
| 37 | * Report that the keyguard is done. |
| 38 | * @param authenticated Whether the user securely got past the keyguard. |
| 39 | * the only reason for this to be false is if the keyguard was instructed |
| 40 | * to appear temporarily to verify the user is supposed to get past the |
| 41 | * keyguard, and the user fails to do so. |
| 42 | */ |
| 43 | void keyguardDone(boolean authenticated); |
| 44 | |
| 45 | /** |
| 46 | * Report that the keyguard is done drawing. |
| 47 | */ |
| 48 | void keyguardDoneDrawing(); |
| 49 | |
| 50 | /** |
| 51 | * Tell ViewMediator that the current view needs IME input |
| 52 | * @param needsInput |
| 53 | */ |
| 54 | void setNeedsInput(boolean needsInput); |
| 55 | |
| 56 | /** |
| 57 | * Tell view mediator that the keyguard view's desired user activity timeout |
| 58 | * has changed and needs to be reapplied to the window. |
| 59 | */ |
| 60 | void onUserActivityTimeoutChanged(); |
| 61 | |
| 62 | /** |
| 63 | * Report that the keyguard is dismissable, pending the next keyguardDone call. |
| 64 | */ |
| 65 | void keyguardDonePending(); |
| 66 | |
| 67 | /** |
| 68 | * Report when keyguard is actually gone |
| 69 | */ |
| 70 | void keyguardGone(); |
| 71 | } |