Small fix to address cheogram adding "+1" when making calls from the default dialer. Now only adds "+1" or "+" when necessary.

root21 created

Change summary

src/cheogram/java/com/cheogram/android/ConnectionService.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

src/cheogram/java/com/cheogram/android/ConnectionService.java 🔗

@@ -37,7 +37,9 @@ public class ConnectionService extends android.telecom.ConnectionService {
 		// TODO: jabber:iq:gateway
 		String tel = request.getAddress().getSchemeSpecificPart().
 		           replaceAll("[^\\+0-9]", "");
-		if (!tel.startsWith("+1")) {
+		if (tel.startsWith("1")) {
+			tel = "+" + tel;
+		} else if (!tel.startsWith("+")) {
 			tel = "+1" + tel;
 		}