<commit_before>using Uno;
using Uno.Text;
using Uno.IO;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Uno.Permissions;
using Uno.Net.Http;
using Fuse.iOS.Bindings;
using Fuse.Android.Bindings;

namespace Fuse.LauncherImpl
{
	[ForeignInclude(Language.Java, "android.content.Intent")]
	[ForeignInclude(Language.ObjC, "UIKit/UIKit.h")]
	public static class MapsLauncher
	{
		[Foreign(Language.Java)]
		extern(Android) static string _actionView
		{
			get
			@{
				return Intent.ACTION_VIEW;
			@}
		}

		public static void LaunchMaps(double latitude, double longitude)
		{
			if defined(Android || iOS)
			{
				var latlon = latitude.ToString() + "," + longitude.ToString();

				if defined(Android)
					LaunchMapsAndroid("geo:" + latlon + "?q=" + latlon);
				else if defined(iOS)
					iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + latlon + "&ll=" + latlon);
			}
		}

		public static void LaunchMaps(string query)
		{
			if defined(Android)
				LaunchMapsAndroid("geo:0,0?q=" + query);
			else if defined(iOS)
				iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + query);
		}

		public static void LaunchMaps(double latitude, double longitude, string query)
		{
			if defined(Android || iOS)
			{
				var latlon = latitude.ToString() + "," + longitude.ToString();

				if defined(Android)
					LaunchMapsAndroid("geo:" + latlon + "?q=" + query);
				if defined(iOS)
					iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + query + "&sll=" + latlon);
			}
		}

		static extern(android) void LaunchMapsAndroid(string uri)
		{
			try
			{
				AndroidDeviceInterop.LaunchIntent(_actionView, uri, "com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
			}
			catch (Exception e)
			{
				// ignore this error. Keeps behaviour in line with iOS
			}
		}
	}
}
<commit_msg>Fuse.Launcher.Maps: uri-encode query<commit_after>using Uno;
using Uno.Text;
using Uno.IO;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Uno.Permissions;
using Uno.Net.Http;
using Fuse.iOS.Bindings;
using Fuse.Android.Bindings;

namespace Fuse.LauncherImpl
{
	[ForeignInclude(Language.Java, "android.content.Intent")]
	[ForeignInclude(Language.ObjC, "UIKit/UIKit.h")]
	public static class MapsLauncher
	{
		[Foreign(Language.Java)]
		extern(Android) static string _actionView
		{
			get
			@{
				return Intent.ACTION_VIEW;
			@}
		}

		public static void LaunchMaps(double latitude, double longitude)
		{
			if defined(Android || iOS)
			{
				var latlon = latitude.ToString() + "," + longitude.ToString();

				if defined(Android)
					LaunchMapsAndroid("geo:" + latlon + "?q=" + latlon);
				else if defined(iOS)
					iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + latlon + "&ll=" + latlon);
			}
		}

		public static void LaunchMaps(string query)
		{
			query = Uri.Encode(query);
			if defined(Android)
				LaunchMapsAndroid("geo:0,0?q=" + query);
			else if defined(iOS)
				iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + query);
		}

		public static void LaunchMaps(double latitude, double longitude, string query)
		{
			if defined(Android || iOS)
			{
				var latlon = latitude.ToString() + "," + longitude.ToString();
				query = Uri.Encode(query);

				if defined(Android)
					LaunchMapsAndroid("geo:" + latlon + "?q=" + query);
				if defined(iOS)
					iOSDeviceInterop.LaunchUriiOS("http://maps.apple.com/maps?q=" + query + "&sll=" + latlon);
			}
		}

		static extern(android) void LaunchMapsAndroid(string uri)
		{
			try
			{
				AndroidDeviceInterop.LaunchIntent(_actionView, uri, "com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
			}
			catch (Exception e)
			{
				// ignore this error. Keeps behaviour in line with iOS
			}
		}
	}
}

{'fraction_non_alphanumeric': 0.13893291072371897, 'fraction_numerical': 0.0010565240359218173, 'mean_word_length': 3.727840199750312, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2227652', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1262, 'n_words': 260}