Created
June 29, 2015 12:52
-
-
Save shunsugai/d4f5b2f31ceb71538939 to your computer and use it in GitHub Desktop.
FingerprintServiceを読んで気になったこと
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://tools.oesf.biz/android-MNC/xref/com/android/server/fingerprint/FingerprintService.java | |
===== | |
532 @Override | |
533 // Binder call | |
534 public void authenticate(final IBinder token, final long opId, final int groupId, | |
535 final IFingerprintServiceReceiver receiver, final int flags, String opPackageName) { | |
536 checkPermission(USE_FINGERPRINT); | |
537 if (!canUserFingerPrint(opPackageName)) { | |
538 return; | |
539 } | |
540 mHandler.post(new Runnable() { | |
541 @Override | |
542 public void run() { | |
543 startAuthentication(token, opId, groupId, receiver, flags); | |
544 } | |
545 }); | |
546 } | |
===== | |
authenticate()の536行目で | |
checkPermission(USE_FINGERPRINT); | |
した後で | |
===== | |
367 private boolean canUserFingerPrint(String opPackageName) { | |
368 checkPermission(USE_FINGERPRINT); | |
369 | |
370 return mAppOps.noteOp(AppOpsManager.OP_USE_FINGERPRINT, Binder.getCallingUid(), | |
371 opPackageName) == AppOpsManager.MODE_ALLOWED; | |
372 } | |
===== | |
もう一度canUserFingerPrint(String)の中で何故か | |
checkPermission(USE_FINGERPRINT); | |
している。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment