fix bugs from crashlytics
This commit is contained in:
parent
b20aac2361
commit
90e23b4f78
|
@ -11,6 +11,7 @@ import android.view.inputmethod.InputMethodManager
|
|||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.StringRes
|
||||
import app.aaps.core.interfaces.extensions.runOnUiThread
|
||||
import app.aaps.core.interfaces.protection.PasswordCheck
|
||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
||||
import app.aaps.core.main.R
|
||||
|
@ -81,7 +82,7 @@ class PasswordCheckImpl @Inject constructor(
|
|||
|
||||
val alert = alertDialogBuilder.create().apply {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
show()
|
||||
runOnUiThread { show() }
|
||||
}
|
||||
|
||||
userInput.setOnEditorActionListener { _, actionId, _ ->
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:exported="false"
|
||||
android:theme="@style/AppTheme">
|
||||
<intent-filter>
|
||||
<action android:name="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
|
||||
<action android:name="info.nightscout.androidaps.plugins.pump.common.dialog.RileyLinkBLEConfigActivity" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
|
|
@ -149,7 +149,11 @@ class SPImplementation @Inject constructor(
|
|||
return try {
|
||||
sharedPreferences.getLong(context.getString(resourceID), defaultValue)
|
||||
} catch (e: Exception) {
|
||||
try {
|
||||
SafeParse.stringToLong(sharedPreferences.getString(context.getString(resourceID), defaultValue.toString()), defaultValue)
|
||||
} catch (e1: Exception) {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +161,11 @@ class SPImplementation @Inject constructor(
|
|||
return try {
|
||||
sharedPreferences.getLong(key, defaultValue)
|
||||
} catch (e: Exception) {
|
||||
try {
|
||||
SafeParse.stringToLong(sharedPreferences.getString(key, defaultValue.toString()), defaultValue)
|
||||
} catch (e1: Exception) {
|
||||
return defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue