Skip to content

Commit 8cac3eb

Browse files
committed
Persist debug server host changes
Change Bundle Location updates PackagerConnectionSettings.debugServerHost, but the setter only updated the in-memory cached host. After the app process restarted, PackagerConnectionSettings read debug_http_host from default SharedPreferences and fell back to the previous value. Persist the selected host to the same debug_http_host preference used by DevSettingsActivity so both entry points share the same storage path.
1 parent 803456d commit 8cac3eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/PackagerConnectionSettings.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public open class PackagerConnectionSettings(private val appContext: Context) {
5454
} else {
5555
_cachedOrOverrideHost = host
5656
}
57+
preferences.edit().putString(PREFS_DEBUG_SERVER_HOST_KEY, host).apply()
5758
}
5859

5960
public open fun resetDebugServerHost() {

0 commit comments

Comments
 (0)