@onekeyfe/react-native-lite-card 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,9 +52,12 @@ class OKLiteManager(private val context: ReactApplicationContext) :
|
|
|
52
52
|
private var mCurrentCardState: CardState? = null
|
|
53
53
|
|
|
54
54
|
private val mActivityEventListener = object : BaseActivityEventListener() {
|
|
55
|
-
override fun onNewIntent(intent: Intent
|
|
55
|
+
override fun onNewIntent(intent: Intent) {
|
|
56
56
|
super.onNewIntent(intent)
|
|
57
|
-
val action = intent
|
|
57
|
+
val action = intent.action
|
|
58
|
+
if (action == null) {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
58
61
|
if ((action == NfcAdapter.ACTION_NDEF_DISCOVERED)
|
|
59
62
|
|| action == NfcAdapter.ACTION_TECH_DISCOVERED
|
|
60
63
|
|| action == NfcAdapter.ACTION_TAG_DISCOVERED
|
|
@@ -345,8 +345,12 @@ public final class Utils {
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
private void setTopActivity(final Activity activity) {
|
|
348
|
+
if (activity == null || mActivityList == null) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
348
351
|
if (mActivityList.contains(activity)) {
|
|
349
|
-
|
|
352
|
+
Activity lastActivity = mActivityList.getLast();
|
|
353
|
+
if (lastActivity != null && !lastActivity.equals(activity)) {
|
|
350
354
|
mActivityList.remove(activity);
|
|
351
355
|
mActivityList.addLast(activity);
|
|
352
356
|
}
|