remove logcat
This commit is contained in:
@@ -9,7 +9,6 @@ import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.util.Log
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -87,10 +86,8 @@ class CredentialsFragment : Fragment() {
|
||||
val password = binding.etPassword.text.toString()
|
||||
val otpSeed = binding.etOtpSeed.text.toString().trim()
|
||||
|
||||
Log.d(TAG, "Login button pressed for username=$username")
|
||||
|
||||
if (username.isEmpty() || password.isEmpty() || otpSeed.isEmpty()) {
|
||||
Log.w(TAG, "Validation failed: empty fields")
|
||||
binding.tvError.text = "Please fill in all fields"
|
||||
binding.tvError.visibility = View.VISIBLE
|
||||
return
|
||||
@@ -106,11 +103,9 @@ class CredentialsFragment : Fragment() {
|
||||
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
try {
|
||||
Log.d(TAG, "Starting login flow on IO dispatcher")
|
||||
val accounts = withContext(Dispatchers.IO) {
|
||||
flow.login(username, passwordHash, otpSeed)
|
||||
}
|
||||
Log.d(TAG, "Login succeeded, got ${accounts.size} accounts")
|
||||
CredentialStore(requireContext()).saveMibCredentials(username, passwordHash, otpSeed)
|
||||
AccountCache.save(requireContext(), accounts)
|
||||
val app = requireActivity().application as BasedBankApp
|
||||
@@ -121,7 +116,6 @@ class CredentialsFragment : Fragment() {
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Login failed: ${e.message}", e)
|
||||
binding.tvError.text = e.message ?: "Login failed"
|
||||
binding.tvError.visibility = View.VISIBLE
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user