Code quality

This commit is contained in:
Benoit Marty 2019-06-11 10:15:50 +02:00
parent 6dacb9894e
commit 2e39a678db
5 changed files with 5 additions and 5 deletions

View File

@ -133,7 +133,7 @@ open class VectorPreference : Preference {
} }
} catch (e: Exception) { } catch (e: Exception) {
Timber.e("onBindView " + e.message, e) Timber.e(e, "onBindView")
} }
super.onBindViewHolder(holder) super.onBindViewHolder(holder)

View File

@ -494,7 +494,7 @@ class EventStreamServiceX : VectorService() {
isVideo = sdpValue?.contains("m=video") == true isVideo = sdpValue?.contains("m=video") == true
} catch (e: Exception) { } catch (e: Exception) {
Timber.e("prepareNotification : getContentAsJsonObject " + e.message, e) Timber.e(e, "prepareNotification : getContentAsJsonObject")
} }
if (!TextUtils.isEmpty(callId)) { if (!TextUtils.isEmpty(callId)) {

View File

@ -120,7 +120,7 @@ class NotificationBroadcastReceiver : BroadcastReceiver(), KoinComponent {
} }
override fun onNetworkError(e: Exception) { override fun onNetworkError(e: Exception) {
Timber.v("Send message : onNetworkError " + e.message, e) Timber.e(e, "Send message : onNetworkError")
onSmartReplyFailed(e.localizedMessage) onSmartReplyFailed(e.localizedMessage)
} }

View File

@ -231,7 +231,7 @@ class VectorSettingsAdvancedNotificationPreferenceFragment : VectorPreferenceFra
try { try {
isEnabled = !TextUtils.equals(actions[0] as String, BingRule.ACTION_DONT_NOTIFY) isEnabled = !TextUtils.equals(actions[0] as String, BingRule.ACTION_DONT_NOTIFY)
} catch (e: Exception) { } catch (e: Exception) {
Timber.e("## refreshPreferences failed " + e.message, e) Timber.e(e, "## refreshPreferences failed")
} }
} }

View File

@ -2646,7 +2646,7 @@ if (sharedDataItems.isNotEmpty() && thisActivity != null) {
val password = passPhraseEditText.text.toString() val password = passPhraseEditText.text.toString()
val resource = openResource(appContext, sharedDataItem.uri, sharedDataItem.getMimeType(appContext)) val resource = openResource(appContext, sharedDataItem.uri, sharedDataItem.getMimeType(appContext))
if(resource?.mContentStream == null) { if (resource?.mContentStream == null) {
appContext.toast("Error") appContext.toast("Error")
return@OnClickListener return@OnClickListener