From 34ff91cceae28e3fb37ff729b73f433c963a7db3 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Mon, 30 Sep 2024 23:54:18 +0200 Subject: [PATCH] fix --- .../deckers/thibault/aves/channel/calls/AppProfileHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppProfileHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppProfileHandler.kt index 57003e521..41682c0bf 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppProfileHandler.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AppProfileHandler.kt @@ -75,7 +75,7 @@ class AppProfileHandler(private val activity: Activity) : MethodCallHandler { val crossProfileApps = activity.getSystemService(Context.CROSS_PROFILE_APPS_SERVICE) as CrossProfileApps val userHandles = crossProfileApps.targetUserProfiles - val label = crossProfileApps.getProfileSwitchingLabel(userHandles.first()) + val label = if (userHandles.isEmpty()) "" else crossProfileApps.getProfileSwitchingLabel(userHandles.first()) result.success(label) }