mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-15 11:00:38 +01:00
adding some crashfixes
This commit is contained in:
parent
ab6e661a1a
commit
8ab60426af
@ -56,6 +56,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.28.3'
|
||||
implementation 'com.simplemobiletools:commons:5.28.5'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||
}
|
||||
|
@ -255,7 +255,10 @@ class CallActivity : SimpleActivity() {
|
||||
private fun callStarted() {
|
||||
incoming_call_holder.beGone()
|
||||
ongoing_call_holder.beVisible()
|
||||
callTimer.scheduleAtFixedRate(getCallTimerUpdateTask(), 1000, 1000)
|
||||
try {
|
||||
callTimer.scheduleAtFixedRate(getCallTimerUpdateTask(), 1000, 1000)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun showPhoneAccountPicker() {
|
||||
@ -270,12 +273,16 @@ class CallActivity : SimpleActivity() {
|
||||
proximityWakeLock!!.release()
|
||||
}
|
||||
|
||||
audioManager.mode = AudioManager.MODE_NORMAL
|
||||
if (isCallEnded) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
audioManager.mode = AudioManager.MODE_NORMAL
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
|
||||
isCallEnded = true
|
||||
if (callDuration > 0) {
|
||||
runOnUiThread {
|
||||
@ -400,14 +407,19 @@ class CallActivity : SimpleActivity() {
|
||||
var bitmap: Bitmap? = null
|
||||
if (callContact?.photoUri?.isNotEmpty() == true) {
|
||||
val photoUri = Uri.parse(callContact!!.photoUri)
|
||||
bitmap = if (isQPlus()) {
|
||||
val tmbSize = resources.getDimension(R.dimen.list_avatar_size).toInt()
|
||||
contentResolver.loadThumbnail(photoUri, Size(tmbSize, tmbSize), null)
|
||||
} else {
|
||||
MediaStore.Images.Media.getBitmap(contentResolver, photoUri)
|
||||
}
|
||||
try {
|
||||
bitmap = if (isQPlus()) {
|
||||
val tmbSize = resources.getDimension(R.dimen.list_avatar_size).toInt()
|
||||
contentResolver.loadThumbnail(photoUri, Size(tmbSize, tmbSize), null)
|
||||
} else {
|
||||
MediaStore.Images.Media.getBitmap(contentResolver, photoUri)
|
||||
|
||||
bitmap = getCircularBitmap(bitmap!!)
|
||||
}
|
||||
|
||||
bitmap = getCircularBitmap(bitmap!!)
|
||||
} catch (ignored: Exception) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
return bitmap
|
||||
|
@ -162,7 +162,7 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
override fun onQueryTextChange(newText: String): Boolean {
|
||||
if (isSearchOpen) {
|
||||
contacts_fragment.onSearchQueryChanged(newText)
|
||||
contacts_fragment?.onSearchQueryChanged(newText)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user