Fix camera crash & autosave
This commit is contained in:
parent
9b6a69e227
commit
653ee1ccc1
@ -34,6 +34,7 @@ android {
|
||||
buildTypes {
|
||||
debug {
|
||||
debuggable true
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
|
@ -151,6 +151,11 @@ class CreateEntry : Fragment() {
|
||||
kpEntry.second
|
||||
)
|
||||
)
|
||||
if (!binding.checkboxProtected.isChecked) {
|
||||
val r = KeepassWrapper.entryExtract(kpEntry.first)
|
||||
CacheManager.addFidelity(r)
|
||||
}
|
||||
activity?.supportFragmentManager?.popBackStack()
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
ErrorToaster.noKP2AFound(context)
|
||||
} catch (e: Exception) {
|
||||
|
@ -68,7 +68,7 @@ class Scanner : Fragment() {
|
||||
this.fmt = format
|
||||
}
|
||||
val isDone = this.code.isNotEmpty() && this.fmt.isNotEmpty()
|
||||
requireActivity().runOnUiThread {
|
||||
activity?.runOnUiThread {
|
||||
binding.btnScanDone.isEnabled = isDone
|
||||
binding.ScanActive.isEnabled = !isDone
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ import org.json.JSONObject
|
||||
object Kp2aControl {
|
||||
|
||||
fun getAddEntryIntent(
|
||||
fields: HashMap<String?, String?>,
|
||||
protectedFields: ArrayList<String?>?
|
||||
fields: HashMap<String, String>,
|
||||
protectedFields: ArrayList<String>?
|
||||
): Intent {
|
||||
val outputData = JSONObject((fields as Map<*, *>)).toString()
|
||||
val startKp2aIntent = Intent(Strings.ACTION_START_WITH_TASK)
|
||||
|
@ -21,10 +21,10 @@ object KeepassWrapper {
|
||||
code: String,
|
||||
format: String,
|
||||
protectCode: Boolean,
|
||||
): Pair<HashMap<String?, String?>, ArrayList<String?>> {
|
||||
): Pair<HashMap<String, String>, ArrayList<String>> {
|
||||
|
||||
val fields = HashMap<String?, String?>()
|
||||
val protected = ArrayList<String?>()
|
||||
val fields = HashMap<String, String>()
|
||||
val protected = ArrayList<String>()
|
||||
fields[KeepassDef.TitleField] = title
|
||||
fields[KeepassDef.UrlField] =
|
||||
"androidapp://" + fragment.requireActivity().packageName
|
||||
|
Loading…
x
Reference in New Issue
Block a user