| | |
| | | cleanUserCard = (CleanUserCard) this.getIntent().getSerializableExtra("cleanUserCard"); |
| | | binding.cardData.setText("制作删除全部用户卡"); |
| | | } |
| | | if (this.getIntent().hasExtra("domainCard")) { |
| | | domainCard = (DomainCard) this.getIntent().getSerializableExtra("domainCard"); |
| | | binding.cardData.setText("制作设置域名卡"); |
| | | if (this.getIntent().hasExtra("domainCard_xinxiang")) { |
| | | domainCard = (DomainCard) this.getIntent().getSerializableExtra("domainCard_xinxiang"); |
| | | binding.cardData.setText("制作设置新乡域名卡"); |
| | | } |
| | | if (this.getIntent().hasExtra("domainCard_luyi")) { |
| | | domainCard = (DomainCard) this.getIntent().getSerializableExtra("domainCard_luyi"); |
| | | binding.cardData.setText("制作设置新乡域名卡"); |
| | | } |
| | | if (this.getIntent().hasExtra("testCard")) { |
| | | testCard = (TestCard) this.getIntent().getSerializableExtra("testCard"); |
| | |
| | | * 设置域名卡 |
| | | * |
| | | * @param intent |
| | | * @param domainCard |
| | | * @param domainXinXiangCard |
| | | */ |
| | | private void setDomainCard(Intent intent, DomainCard domainCard) { |
| | | private void setDomainCard(Intent intent, DomainCard domainXinXiangCard) { |
| | | try { |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainCard.getZeroByte(), 1, 0); |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainXinXiangCard.getZeroByte(), 1, 0); |
| | | if (!domainCrdFlag) { |
| | | return; |
| | | } |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainCard.getOneByte(), 1, 1); |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainXinXiangCard.getOneByte(), 1, 1); |
| | | if (!domainCrdFlag) { |
| | | return; |
| | | } |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainCard.getTwoByte(), 1, 2); |
| | | domainCrdFlag = NFCWriteHelper.getInstence(intent, this).writeData(domainXinXiangCard.getTwoByte(), 1, 2); |
| | | } catch (Exception e) { |
| | | domainCrdFlag = false; |
| | | throw new RuntimeException(e); |