Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 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 | */ |
Jim Miller | 5ecd811 | 2013-01-09 18:50:26 -0800 | [diff] [blame] | 16 | package com.android.keyguard; |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 17 | |
| 18 | public interface KeyguardSecurityCallback { |
| 19 | |
| 20 | /** |
| 21 | * Dismiss the given security screen. |
| 22 | * @param securityVerified true if the user correctly entered credentials for the given screen. |
| 23 | */ |
| 24 | void dismiss(boolean securityVerified); |
| 25 | |
| 26 | /** |
Jorim Jaggi | b690f0d | 2014-07-03 23:25:44 +0200 | [diff] [blame] | 27 | * Manually report user activity to keep the device awake. |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 28 | */ |
Jorim Jaggi | b690f0d | 2014-07-03 23:25:44 +0200 | [diff] [blame] | 29 | void userActivity(); |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Checks if keyguard is in "verify credentials" mode. |
| 33 | * @return true if user has been asked to verify security. |
| 34 | */ |
| 35 | boolean isVerifyUnlockOnly(); |
| 36 | |
| 37 | /** |
Jim Miller | 5a8daad | 2014-01-14 18:57:03 -0800 | [diff] [blame] | 38 | * Call to report an unlock attempt. |
| 39 | * @param success set to 'true' if user correctly entered security credentials. |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 40 | */ |
Jim Miller | 7751ff6 | 2014-01-14 18:57:03 -0800 | [diff] [blame] | 41 | void reportUnlockAttempt(boolean success); |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
Jim Miller | 258341c | 2012-08-30 16:50:10 -0700 | [diff] [blame] | 44 | * Shows the backup security for the current method. If none available, this call is a no-op. |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 45 | */ |
Jim Miller | 258341c | 2012-08-30 16:50:10 -0700 | [diff] [blame] | 46 | void showBackupSecurity(); |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 47 | |
Jim Miller | dcb3d84 | 2012-08-23 19:18:12 -0700 | [diff] [blame] | 48 | } |