계속 작성중입니다.
1> frameworks/base/core/java/android/hardware/fingerprint/IFingerprintService.aidl
package android.hardware.fingerprint;
interface IFingerprintService { ….
int postEnroll(IBinder token); …. }
2> frameworks/base/core/java/android/hardware/fingerprint/FingerprintManager.java
public class FingerprintManager { ….
private IFingerprintService mService;
FingerprintManager(Context ctx, IFingerprintService service) {
mService = service; .... }
long postEnroll() { .... mService.postEnroll(mToken); ... }
3> frameworks/base/core/java/android/app/SystemServiceRegistry.java
registerService(Context.xxx_SERVICE,FingerprintManager.class,...
--> createService(....)
--> IBinder bi = ServiceManager.getServiceOrThrow
(Context.FINGERPRINT_SERVICE);
IFingerprintService svc = IFingerprintService.Stub.asInterface(bi);
return new FingerprintManager(ctx.getOuterContext(), svc);
4> frameworks/base/services/core/java/com/android/server/fingerprint/FingerprintService.java
class FingerprintService ... implements IHwBinder.DeathRecipient{
....
private IBiometricsFingerprint mDaemon;
int startPostEnroll(IBinder token) {
IBiometricsFingerprint daemon = getFingerprintDaemon();
return daemon.postEnroll(); }
IBiometricsFingerprint getFingerprintDaemon() { ...
mDaemon = IBiometricsFingerprint.getService();
mDaemon.asBinder().linkToDeath(this, 0);
mDaemon.setNotify(mDaemonCallback); .... return mDaemon }
void onStart() { ...
publishBinderService(..., new FingerprintServiceWrapper()); ... }
class FingerprintServiceWrapper extends IFingerprintService.Stub{
.... int postEnroll(IBinder token) { .....
return startPostEnroll(token); }
반응형