From 72c257c004d520851205c0cf0482a367c80cae76 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期二, 19 十二月 2023 14:10:25 +0800
Subject: [PATCH] 密钥保存在cpp文件里 防止反编破解
---
app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
index 650415d..e8ed9d6 100644
--- a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
+++ b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
@@ -1,5 +1,6 @@
package com.dayu.recharge.tools;
+import android.app.Activity;
import android.content.Intent;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
@@ -11,7 +12,6 @@
import java.io.IOException;
import java.util.ArrayList;
-
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -29,7 +29,8 @@
private static NfcReadHelper helper;
- public NfcReadHelper(Intent intent) {
+ public NfcReadHelper(Intent intent, Activity activity) {
+ super(activity);
this.tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
}
@@ -40,9 +41,9 @@
* @param intent
* @return
*/
- public static NfcReadHelper getInstence(Intent intent) {
+ public static NfcReadHelper getInstence(Intent intent, Activity activity) {
if (helper == null) {
- helper = new NfcReadHelper(intent);
+ helper = new NfcReadHelper(intent, activity);
}
return helper;
}
--
Gitblit v1.8.0