Updated on 2026-08-14
This commit is contained in:
parent
840499c35a
commit
cee9c927ab
8 changed files with 26 additions and 123 deletions
|
|
@ -147,12 +147,6 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
// set listeners
|
||||
fab.setOnClickListener { showMenu(it) }
|
||||
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// fab.setOnLongClickListener {
|
||||
// startActivity(Intent(this, SettingsDebugActivity::class.java))
|
||||
// false
|
||||
// }
|
||||
// }
|
||||
|
||||
val apiHelper = ServerApiHelper()
|
||||
apiHelper.setLastVersionListener { response ->
|
||||
|
|
@ -315,7 +309,7 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback, CardProtoco
|
|||
val cardInfo = Bundle()
|
||||
cardInfo.putString("UID", cardProtocol.card.uid)
|
||||
val bCard = Bundle()
|
||||
cardProtocol.card.SaveToBundle(bCard)
|
||||
cardProtocol.card.saveToBundle(bCard)
|
||||
cardInfo.putBundle("Card", bCard)
|
||||
|
||||
val uid = cardInfo.getString("UID")
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
package com.tangem.presentation.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
|
||||
import com.tangem.wallet.R
|
||||
|
||||
class SettingsDebugActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_settings_debug)
|
||||
|
||||
initToolbar()
|
||||
}
|
||||
|
||||
private fun initToolbar() {
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)!!
|
||||
toolbar.title = getString(R.string.debug_settings)
|
||||
setSupportActionBar(toolbar)
|
||||
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp)
|
||||
toolbar.setNavigationOnClickListener {
|
||||
if (fragmentManager.backStackEntryCount == 0)
|
||||
finish()
|
||||
else
|
||||
fragmentManager.popBackStack()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -698,15 +698,16 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
|
||||
if (cardProtocol != null) {
|
||||
if (cardProtocol.error == null) {
|
||||
rlProgressBar.post {
|
||||
rlProgressBar.visibility = View.GONE
|
||||
|
||||
rlProgressBar?.post {
|
||||
rlProgressBar?.visibility = View.GONE
|
||||
this.cardProtocol = cardProtocol
|
||||
if (!cardProtocol.card.isWalletPublicKeyValid) refresh()
|
||||
else updateViews()
|
||||
}
|
||||
} else {
|
||||
// remove last UIDs because of error and no card read
|
||||
rlProgressBar.post {
|
||||
rlProgressBar?.post {
|
||||
lastReadSuccess = false
|
||||
if (cardProtocol.error is CardProtocol.TangemException_ExtendedLengthNotSupported)
|
||||
if (!NoExtendedLengthSupportDialog.allReadyShowed)
|
||||
|
|
@ -717,9 +718,9 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
}
|
||||
}
|
||||
|
||||
rlProgressBar.postDelayed({
|
||||
rlProgressBar?.postDelayed({
|
||||
try {
|
||||
rlProgressBar.visibility = View.GONE
|
||||
rlProgressBar?.visibility = View.GONE
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
@ -728,9 +729,9 @@ class LoadedWallet : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
|
|||
|
||||
override fun onReadCancel() {
|
||||
verifyCardTask = null
|
||||
rlProgressBar.postDelayed({
|
||||
rlProgressBar?.postDelayed({
|
||||
try {
|
||||
rlProgressBar.visibility = View.GONE
|
||||
rlProgressBar?.visibility = View.GONE
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
package com.tangem.presentation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.preference.PreferenceFragment
|
||||
import android.preference.SwitchPreference
|
||||
import com.tangem.wallet.R
|
||||
|
||||
class SettingsDebug : PreferenceFragment() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
addPreferencesFromResource(R.xml.fr_settings_debug)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue