1dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller/* 2dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * Copyright (C) 2012 The Android Open Source Project 3dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * 4dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * Licensed under the Apache License, Version 2.0 (the "License"); 5dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * you may not use this file except in compliance with the License. 6dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * You may obtain a copy of the License at 7dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * 8dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * http://www.apache.org/licenses/LICENSE-2.0 9dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * 10dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * Unless required by applicable law or agreed to in writing, software 11dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * distributed under the License is distributed on an "AS IS" BASIS, 12dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * See the License for the specific language governing permissions and 14dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * limitations under the License. 15dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 165ecd81154fa039961f65bb4e36d18ac555b0d1d6Jim Millerpackage com.android.keyguard; 17dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 1814adfe425e67c9ec12b0841a62c5c03ce00838eaJohn Spurlockpublic interface KeyguardSecurityCallback { 1934c4fe523ad96fb59cec28832b38806d04a6bebfJohn Spurlock 20dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller /** 21dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * Dismiss the given security screen. 22dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * @param securityVerified true if the user correctly entered credentials for the given screen. 23dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 24dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller void dismiss(boolean securityVerified); 25dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 26dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller /** 27b690f0d5023fcf144f2701058d5a6f88d66cc97aJorim Jaggi * Manually report user activity to keep the device awake. 28dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 29b690f0d5023fcf144f2701058d5a6f88d66cc97aJorim Jaggi void userActivity(); 30dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 31dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller /** 32dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * Checks if keyguard is in "verify credentials" mode. 33dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller * @return true if user has been asked to verify security. 34dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 35dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller boolean isVerifyUnlockOnly(); 36dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 37dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller /** 385a8daad469c22b9b48fdf3ac478991e4ddefdf1eJim Miller * Call to report an unlock attempt. 395a8daad469c22b9b48fdf3ac478991e4ddefdf1eJim Miller * @param success set to 'true' if user correctly entered security credentials. 40dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 417751ff6cd079e59e3c1f2404198774cd371ea69fJim Miller void reportUnlockAttempt(boolean success); 42dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 43dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller /** 44258341c377b6aa9f1bd29a9b507a97967e432dfeJim Miller * Shows the backup security for the current method. If none available, this call is a no-op. 45dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller */ 46258341c377b6aa9f1bd29a9b507a97967e432dfeJim Miller void showBackupSecurity(); 47dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller 48dcb3d84b82cc2448d04e73359a716581bfb657dbJim Miller} 49