Skip to content

Commit 3201e05

Browse files
fix(device_info_plus): handle nullability on getString(DEVICE_NAME) (#3507)
1 parent 9ec7eb4 commit 3201e05

File tree

1 file changed

+1
-1
lines changed
  • packages/device_info_plus/device_info_plus/android/src/main/kotlin/dev/fluttercommunity/plus/device_info

1 file changed

+1
-1
lines changed

packages/device_info_plus/device_info_plus/android/src/main/kotlin/dev/fluttercommunity/plus/device_info/MethodCallHandlerImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ internal class MethodCallHandlerImpl(
3939
build["product"] = Build.PRODUCT
4040

4141
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
42-
build["name"] = Settings.Global.getString(contentResolver, Settings.Global.DEVICE_NAME)
42+
build["name"] = Settings.Global.getString(contentResolver, Settings.Global.DEVICE_NAME) ?: ""
4343
}
4444

4545
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy