Work fork of an Android Jabber client for bridge users git.sr.ht/~singpolyma/cheogram-android
sopranica sgx xmpp jabber
0

Configure Feed

Select the types of activity you want to include in your feed.

Don't rely on newer URLEncoder overload

Old Android releases do not provide the URLEncoder overload that takes a
Charset, so a received geo URI could crash as soon as its notification
label was built. Go back to the older UTF-8 overload so the same label
encoding does not depend on an API that's missing at runtime.

Amolith (Apr 8, 2026, 10:23 AM -0600) 7e695e50 7ceed707

+6 -3
+6 -3
src/main/java/eu/siacs/conversations/utils/GeoHelper.java
··· 12 12 import eu.siacs.conversations.entities.Message; 13 13 import eu.siacs.conversations.ui.ShareLocationActivity; 14 14 import eu.siacs.conversations.ui.ShowLocationActivity; 15 + import java.io.UnsupportedEncodingException; 15 16 import java.net.URLEncoder; 16 - import java.nio.charset.StandardCharsets; 17 17 import java.util.ArrayList; 18 18 import java.util.regex.Matcher; 19 19 import org.osmdroid.util.GeoPoint; ··· 160 160 161 161 private static String getLabel(Context context, Message message) { 162 162 if (message.getStatus() == Message.STATUS_RECEIVED) { 163 - return URLEncoder.encode( 164 - UIHelper.getMessageDisplayName(message), StandardCharsets.UTF_8); 163 + try { 164 + return URLEncoder.encode(UIHelper.getMessageDisplayName(message), "UTF-8"); 165 + } catch (UnsupportedEncodingException e) { 166 + throw new AssertionError(e); 167 + } 165 168 } else { 166 169 return context.getString(R.string.me); 167 170 }