Small cleanup
This commit is contained in:
parent
bec6cfc46d
commit
37226a1641
|
@ -1,2 +1 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.matrix.android.sdk.rx" />
|
||||
<manifest package="org.matrix.android.sdk.rx" />
|
||||
|
|
|
@ -44,7 +44,7 @@ data class CryptoDeviceInfo(
|
|||
*/
|
||||
fun fingerprint(): String? {
|
||||
return keys
|
||||
?.takeIf { !deviceId.isBlank() }
|
||||
?.takeIf { deviceId.isNotBlank() }
|
||||
?.get("ed25519:$deviceId")
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ data class CryptoDeviceInfo(
|
|||
*/
|
||||
fun identityKey(): String? {
|
||||
return keys
|
||||
?.takeIf { !deviceId.isBlank() }
|
||||
?.takeIf { deviceId.isNotBlank() }
|
||||
?.get("curve25519:$deviceId")
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ data class MXDeviceInfo(
|
|||
*/
|
||||
fun fingerprint(): String? {
|
||||
return keys
|
||||
?.takeIf { !deviceId.isBlank() }
|
||||
?.takeIf { deviceId.isNotBlank() }
|
||||
?.get("ed25519:$deviceId")
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ data class MXDeviceInfo(
|
|||
*/
|
||||
fun identityKey(): String? {
|
||||
return keys
|
||||
?.takeIf { !deviceId.isBlank() }
|
||||
?.takeIf { deviceId.isNotBlank() }
|
||||
?.get("curve25519:$deviceId")
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import javax.inject.Inject
|
|||
class AppNameProvider @Inject constructor(private val context: Context) {
|
||||
|
||||
fun getAppName(): String {
|
||||
try {
|
||||
return try {
|
||||
val appPackageName = context.applicationContext.packageName
|
||||
val pm = context.packageManager
|
||||
val appInfo = pm.getApplicationInfo(appPackageName, 0)
|
||||
|
@ -33,10 +33,10 @@ class AppNameProvider @Inject constructor(private val context: Context) {
|
|||
if (!appName.matches("\\A\\p{ASCII}*\\z".toRegex())) {
|
||||
appName = appPackageName
|
||||
}
|
||||
return appName
|
||||
appName
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "## AppNameProvider() : failed")
|
||||
return "ElementAndroid"
|
||||
"ElementAndroid"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ class DialPadFragment : Fragment() {
|
|||
}
|
||||
|
||||
private fun poll() {
|
||||
if (!input.isEmpty()) {
|
||||
if (input.isNotEmpty()) {
|
||||
input = input.substring(0, input.length - 1)
|
||||
formatter = PhoneNumberUtil.getInstance().getAsYouTypeFormatter(regionCode)
|
||||
if (formatAsYouType) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue