导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - NfcDispatchActivity.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 NfcDispatchActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.finogeeks.lib.applet.api.nfc;

import android.content.Intent;
import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
import android.nfc.Tag;
import android.nfc.tech.Ndef;
import android.os.Bundle;
import android.view.View;
import com.finogeeks.lib.applet.R;
import com.finogeeks.lib.applet.modules.base.BaseActivity;
import java.util.HashMap;
import kotlin.Metadata;
import kotlin.jvm.internal.n;
import tj0.t;

@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0019\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014¢\u0006\u0004\b\u0007\u0010\bJ\u0019\u0010\u000b\u001a\u00020\u00062\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0014¢\u0006\u0004\b\u000b\u0010\fJ\u0019\u0010\r\u001a\u00020\u00062\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0002¢\u0006\u0004\b\r\u0010\f¨\u0006\u000e"}, d2 = {"Lcom/finogeeks/lib/applet/api/nfc/NfcDispatchActivity;", "Lcom/finogeeks/lib/applet/modules/base/BaseActivity;", "<init>", "()V", "Landroid/os/Bundle;", "savedInstanceState", "Llg0/e0;", "onCreate", "(Landroid/os/Bundle;)V", "Landroid/content/Intent;", "intent", "onNewIntent", "(Landroid/content/Intent;)V", "parseNfcIntent", "finapplet_release"}, k = 1, mv = {1, 4, 0})
public final class NfcDispatchActivity extends BaseActivity {
    private HashMap a;

    private final void a(Intent intent) {
        if (intent == null) {
            finish();
            return;
        }
        try {
            if (!n.d("android.nfc.action.NDEF_DISCOVERED", intent.getAction())) {
                finish();
                return;
            }
            Tag tag = (Tag) intent.getParcelableExtra("android.nfc.extra.TAG");
            if (tag == null) {
                finish();
                return;
            }
            n.e(tag, "intent.getParcelableExtr…     return\n            }");
            Ndef ndef = Ndef.get(tag);
            if (ndef == null) {
                finish();
                return;
            }
            ndef.connect();
            NdefMessage ndefMessage = ndef.getNdefMessage();
            String string = getString(R.string.fin_applet_router_url_scheme);
            n.e(string, "getString(R.string.fin_applet_router_url_scheme)");
            n.e(ndefMessage, "ndefMsg");
            for (NdefRecord ndefRecord : ndefMessage.getRecords()) {
                String uri = ndefRecord.toUri().toString();
                n.e(uri, "r.toUri().toString()");
                if (t.J(uri, string, true)) {
                    new com.finogeeks.lib.applet.modules.urlrouter.a(this, string).a(uri);
                    finish();
                    return;
                }
            }
            finish();
        } catch (Exception e) {
            e.printStackTrace();
            finish();
        }
    }

    @Override
    public void _$_clearFindViewByIdCache() {
        HashMap hashMap = this.a;
        if (hashMap != null) {
            hashMap.clear();
        }
    }

    @Override
    public View _$_findCachedViewById(int i) {
        if (this.a == null) {
            this.a = new HashMap();
        }
        View view = (View) this.a.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.a.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        a(getIntent());
    }

    public void onNewIntent(Intent intent) {
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        a(intent);
    }
}