1 package android.service.fingerprint; 2 /** 3 * Copyright (C) 2014 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /** 19 * @hide 20 */ 21 public class FingerprintManagerReceiver { 22 /** 23 * Fingerprint enrollment progress update. Enrollment is considered complete if 24 * remaining hits 0 without {@link #onError(int)} being called. 25 * 26 * @param fingerprintId the fingerprint we're currently enrolling 27 * @param remaining the number of samples required to complete enrollment. It's up to 28 * the hardware to define what each step in enrollment means. Some hardware 29 * requires multiple samples of the same part of the finger. Others require sampling of 30 * different parts of the finger. The enrollment flow can use remaining to 31 * mean "step x" of the process or "just need another sample." 32 */ onEnrollResult(int fingerprintId, int remaining)33 public void onEnrollResult(int fingerprintId, int remaining) { } 34 35 /** 36 * Fingerprint touch detected, but not processed yet. Clients will use this message to 37 * determine a good or bad scan before the fingerprint is processed. This is meant for the 38 * client to provide feedback about the scan or alert the user that recognition is to follow. 39 * 40 * @param acquiredInfo one of: 41 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_GOOD}, 42 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_PARTIAL}, 43 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_INSUFFICIENT}, 44 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_IMAGER_DIRTY}, 45 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_TOO_SLOW}, 46 * {@link FingerprintManager#FINGERPRINT_ACQUIRED_TOO_FAST} 47 */ onAcquired(int acquiredInfo)48 public void onAcquired(int acquiredInfo) { } 49 50 /** 51 * Fingerprint has been detected and processed. A non-zero return indicates a valid 52 * fingerprint was detected. 53 * 54 * @param fingerprintId the finger id, or 0 if not recognized. 55 */ onProcessed(int fingerprintId)56 public void onProcessed(int fingerprintId) { } 57 58 /** 59 * An error was detected during scan or enrollment. One of 60 * {@link FingerprintManager#FINGERPRINT_ERROR_HW_UNAVAILABLE}, 61 * {@link FingerprintManager#FINGERPRINT_ERROR_UNABLE_TO_PROCESS} or 62 * {@link FingerprintManager#FINGERPRINT_ERROR_TIMEOUT} 63 * {@link FingerprintManager#FINGERPRINT_ERROR_NO_SPACE} 64 * 65 * @param error one of the above error codes 66 */ onError(int error)67 public void onError(int error) { } 68 69 /** 70 * The given fingerprint template was successfully removed by the driver. 71 * See {@link FingerprintManager#remove(int)} 72 * 73 * @param fingerprintId id of template to remove. 74 */ onRemoved(int fingerprintId)75 public void onRemoved(int fingerprintId) { } 76 }