Skip to content

Commit 9100fc3

Browse files
authored
Make sure Deeplink URL parameters is not stripped (#5664)
1 parent 31b94be commit 9100fc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/kotlin/io/homeassistant/companion/android/launch/LaunchActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class LaunchActivity :
121121
}
122122

123123
if (serverParameter != null) {
124-
startActivity(WebViewActivity.newInstance(this, intent.data?.path, serverParameter))
124+
startActivity(WebViewActivity.newInstance(this, intent.data?.toString(), serverParameter))
125125
} else { // Show server chooser
126126
supportFragmentManager.setFragmentResultListener(ServerChooserFragment.RESULT_KEY, this) { _, bundle ->
127127
val serverId = if (bundle.containsKey(ServerChooserFragment.RESULT_SERVER)) {
@@ -130,15 +130,15 @@ class LaunchActivity :
130130
null
131131
}
132132
supportFragmentManager.clearFragmentResultListener(ServerChooserFragment.RESULT_KEY)
133-
startActivity(WebViewActivity.newInstance(this, intent.data?.path, serverId))
133+
startActivity(WebViewActivity.newInstance(this, intent.data?.toString(), serverId))
134134
finish()
135135
overridePendingTransition(0, 0) // Disable activity start/stop animation
136136
}
137137
ServerChooserFragment().show(supportFragmentManager, ServerChooserFragment.TAG)
138138
return
139139
}
140140
} else {
141-
startActivity(WebViewActivity.newInstance(this, intent.data?.path))
141+
startActivity(WebViewActivity.newInstance(this, intent.data?.toString()))
142142
}
143143
finish()
144144
overridePendingTransition(0, 0) // Disable activity start/stop animation

0 commit comments

Comments
 (0)