隐藏toast

This commit is contained in:
mazengfei
2026-01-26 17:32:50 +08:00
parent 8f788529d2
commit 1d0e6d4bca
@@ -674,13 +674,13 @@ public class FaceHelper implements FaceListener {
} else { } else {
similar = 0f; similar = 0f;
} }
new Handler(Looper.getMainLooper()).post(()-> { // new Handler(Looper.getMainLooper()).post(()-> {
try { // try {
Toast.makeText(App.getContext(),"识别失败"+failCount+"次,similar="+similar, Toast.LENGTH_SHORT).show(); // Toast.makeText(App.getContext(),"识别失败"+failCount+"次,similar="+similar, Toast.LENGTH_SHORT).show();
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
}); // });
Log.d(TAG, "collectFace,searchFace查询失败"+failCount+"次,similar="+similar); Log.d(TAG, "collectFace,searchFace查询失败"+failCount+"次,similar="+similar);
if (failCount >= 2) { if (failCount >= 2) {
recognizeCallback.onRecognized(null, LivenessInfo.UNKNOWN, false); recognizeCallback.onRecognized(null, LivenessInfo.UNKNOWN, false);