mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-26 23:50:32 +00:00
Check if Android device name is not blank (#1013)
* fix(android): check if device name is not blank * refactor: use `!isNullOrBlank()`
This commit is contained in:
parent
9e66cfa66d
commit
eb255a7ae8
@ -10,7 +10,7 @@ private fun Context.getDeviceName(): String {
|
||||
// Use name from device settings
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
||||
val name = Settings.Global.getString(contentResolver, Settings.Global.DEVICE_NAME)
|
||||
if (name != null) return name
|
||||
if (!name.isNullOrBlank()) return name
|
||||
}
|
||||
|
||||
// Concatenate the name based on manufacturer and model
|
||||
|
Loading…
Reference in New Issue
Block a user