Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Microsoft.Maui-dev.sln
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.DeviceTests", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.UnitTests", "src\Essentials\test\UnitTests\Essentials.UnitTests.csproj", "{A9BAB840-A53E-405A-9458-CA0E02319FB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.ExternalBackend.UnitTests", "src\Essentials\test\ExternalBackendTests\Essentials.ExternalBackend.UnitTests.csproj", "{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps", "src\Controls\Maps\src\Controls.Maps.csproj", "{5C40FA00-7D48-4F54-898C-01C8942E451D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{25D0D27A-C5FE-443D-8B65-D6C987F4A80E}"
Expand Down Expand Up @@ -379,6 +381,10 @@ Global
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.Build.0 = Release|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -705,6 +711,7 @@ Global
{420BC8CC-EE70-49A1-964A-CB63414A882D} = {94F3C036-A5F4-4ACC-A028-8506802ADB88}
{66528BE6-FF53-4A3B-8675-46C0B929C83B} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{A9BAB840-A53E-405A-9458-CA0E02319FB4} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{5C40FA00-7D48-4F54-898C-01C8942E451D} = {50C758FE-4E10-409A-94F5-A75480960864}
{25D0D27A-C5FE-443D-8B65-D6C987F4A80E} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{094FB109-1CBC-4B84-8CFB-072E7B3EC637} = {25D0D27A-C5FE-443D-8B65-D6C987F4A80E}
Expand Down
1 change: 1 addition & 0 deletions Microsoft.Maui-mac.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"src\\Essentials\\samples\\Samples\\Essentials.Sample.csproj",
"src\\Essentials\\src\\Essentials.csproj",
"src\\Essentials\\test\\DeviceTests\\Essentials.DeviceTests.csproj",
"src\\Essentials\\test\\ExternalBackendTests\\Essentials.ExternalBackend.UnitTests.csproj",
"src\\Essentials\\test\\UnitTests\\Essentials.UnitTests.csproj",
"src\\Graphics\\src\\Graphics.Skia\\Graphics.Skia.csproj",
"src\\Graphics\\src\\Graphics\\Graphics.csproj",
Expand Down
7 changes: 7 additions & 0 deletions Microsoft.Maui-vscode.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.DeviceTests", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.UnitTests", "src\Essentials\test\UnitTests\Essentials.UnitTests.csproj", "{A9BAB840-A53E-405A-9458-CA0E02319FB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.ExternalBackend.UnitTests", "src\Essentials\test\ExternalBackendTests\Essentials.ExternalBackend.UnitTests.csproj", "{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps", "src\Controls\Maps\src\Controls.Maps.csproj", "{5C40FA00-7D48-4F54-898C-01C8942E451D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{25D0D27A-C5FE-443D-8B65-D6C987F4A80E}"
Expand Down Expand Up @@ -342,6 +344,10 @@ Global
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.Build.0 = Release|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -617,6 +623,7 @@ Global
{420BC8CC-EE70-49A1-964A-CB63414A882D} = {94F3C036-A5F4-4ACC-A028-8506802ADB88}
{66528BE6-FF53-4A3B-8675-46C0B929C83B} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{A9BAB840-A53E-405A-9458-CA0E02319FB4} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{5C40FA00-7D48-4F54-898C-01C8942E451D} = {50C758FE-4E10-409A-94F5-A75480960864}
{25D0D27A-C5FE-443D-8B65-D6C987F4A80E} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{094FB109-1CBC-4B84-8CFB-072E7B3EC637} = {25D0D27A-C5FE-443D-8B65-D6C987F4A80E}
Expand Down
1 change: 1 addition & 0 deletions Microsoft.Maui-windows.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"src\\Essentials\\samples\\Samples\\Essentials.Sample.csproj",
"src\\Essentials\\src\\Essentials.csproj",
"src\\Essentials\\test\\DeviceTests\\Essentials.DeviceTests.csproj",
"src\\Essentials\\test\\ExternalBackendTests\\Essentials.ExternalBackend.UnitTests.csproj",
"src\\Essentials\\test\\UnitTests\\Essentials.UnitTests.csproj",
"src\\Graphics\\samples\\GraphicsTester.Android\\GraphicsTester.Android.csproj",
"src\\Graphics\\samples\\GraphicsTester.Portable\\GraphicsTester.Portable.csproj",
Expand Down
7 changes: 7 additions & 0 deletions Microsoft.Maui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.DeviceTests", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.UnitTests", "src\Essentials\test\UnitTests\Essentials.UnitTests.csproj", "{A9BAB840-A53E-405A-9458-CA0E02319FB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.ExternalBackend.UnitTests", "src\Essentials\test\ExternalBackendTests\Essentials.ExternalBackend.UnitTests.csproj", "{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps", "src\Controls\Maps\src\Controls.Maps.csproj", "{5C40FA00-7D48-4F54-898C-01C8942E451D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{25D0D27A-C5FE-443D-8B65-D6C987F4A80E}"
Expand Down Expand Up @@ -368,6 +370,10 @@ Global
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9BAB840-A53E-405A-9458-CA0E02319FB4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71}.Release|Any CPU.Build.0 = Release|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C40FA00-7D48-4F54-898C-01C8942E451D}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -686,6 +692,7 @@ Global
{420BC8CC-EE70-49A1-964A-CB63414A882D} = {94F3C036-A5F4-4ACC-A028-8506802ADB88}
{66528BE6-FF53-4A3B-8675-46C0B929C83B} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{A9BAB840-A53E-405A-9458-CA0E02319FB4} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{7C6A0D6E-9B4E-4C0E-9E3C-2F1A5D8B4E71} = {420BC8CC-EE70-49A1-964A-CB63414A882D}
{5C40FA00-7D48-4F54-898C-01C8942E451D} = {50C758FE-4E10-409A-94F5-A75480960864}
{25D0D27A-C5FE-443D-8B65-D6C987F4A80E} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{094FB109-1CBC-4B84-8CFB-072E7B3EC637} = {25D0D27A-C5FE-443D-8B65-D6C987F4A80E}
Expand Down
1 change: 1 addition & 0 deletions eng/cake/dotnet.cake
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ Task("dotnet-test")
"**/Controls.BindingSourceGen.UnitTests.csproj",
"**/Core.UnitTests.csproj",
"**/Essentials.UnitTests.csproj",
"**/Essentials.ExternalBackend.UnitTests.csproj",
"**/Resizetizer.UnitTests.csproj",
"**/Graphics.Tests.csproj",
"**/MauiBlazorWebView.UnitTests.csproj",
Expand Down
1 change: 1 addition & 0 deletions eng/helix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<XUnitProject Include="$(RepoRoot)src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj" />
<XUnitProject Include="$(RepoRoot)src/Core/tests/UnitTests/Core.UnitTests.csproj" />
<XUnitProject Include="$(RepoRoot)src/Essentials/test/UnitTests/Essentials.UnitTests.csproj" />
<XUnitProject Include="$(RepoRoot)src/Essentials/test/ExternalBackendTests/Essentials.ExternalBackend.UnitTests.csproj" />
<XUnitProject Include="$(RepoRoot)src/Graphics/tests/Graphics.Tests/Graphics.Tests.csproj" />
<XUnitProject Include="$(RepoRoot)src/BlazorWebView/tests/MauiBlazorWebView.UnitTests/MauiBlazorWebView.UnitTests.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
1 change: 1 addition & 0 deletions src/Essentials/src/PublicAPI/net/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ static Microsoft.Maui.Authentication.Passkeys.CreateAsync(Microsoft.Maui.Authent
static Microsoft.Maui.Authentication.Passkeys.CreateAsync(string! creationOptionsJson, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.PasskeyCreationResponse!>!
static Microsoft.Maui.Authentication.Passkeys.Default.get -> Microsoft.Maui.Authentication.IPasskeys!
static Microsoft.Maui.Authentication.Passkeys.IsSupported.get -> bool
Microsoft.Maui.Media.Locale.Locale(string? language, string? country, string? name, string? id) -> void
4 changes: 2 additions & 2 deletions src/Essentials/src/TextToSpeech/TextToSpeech.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ public async Task SpeakAsync(string text, int max, SpeechOptions options, Cancel
});
}

if (options?.Locale?.Language != null)
if (!string.IsNullOrWhiteSpace(options?.Locale?.Language))
{
JavaLocale locale = null;
if (!string.IsNullOrWhiteSpace(options?.Locale.Country))
if (!string.IsNullOrWhiteSpace(options.Locale.Country))
locale = new JavaLocale(options.Locale.Language, options.Locale.Country);
else
locale = new JavaLocale(options.Locale.Language);
Expand Down
16 changes: 10 additions & 6 deletions src/Essentials/src/TextToSpeech/TextToSpeech.ios.tvos.watchos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ static AVSpeechUtterance GetSpeechUtterance(string text, SpeechOptions options)

if (options != null)
{
// null voice if fine - it is the default
// select the voice by identifier else by Language, otherwise set for default
// Select the voice by identifier, else by language, otherwise use the default.
// Each step falls through when it yields no voice, including when a caller supplies
// an identifier this platform does not recognize.
speechUtterance.Voice =
options.Locale?.Id != null
? AVSpeechSynthesisVoice.FromIdentifier(options.Locale.Id)
: AVSpeechSynthesisVoice.FromLanguage(options.Locale?.Language)
?? AVSpeechSynthesisVoice.FromLanguage(AVSpeechSynthesisVoice.CurrentLanguageCode);
(string.IsNullOrWhiteSpace(options.Locale?.Id)
? null
: AVSpeechSynthesisVoice.FromIdentifier(options.Locale.Id))
?? (string.IsNullOrWhiteSpace(options.Locale?.Language)
? null
: AVSpeechSynthesisVoice.FromLanguage(options.Locale.Language))
?? AVSpeechSynthesisVoice.FromLanguage(AVSpeechSynthesisVoice.CurrentLanguageCode);

// the platform has a range of 0.5 - 2.0
// anything lower than 0.5 is set to 0.5
Expand Down
5 changes: 4 additions & 1 deletion src/Essentials/src/TextToSpeech/TextToSpeech.macos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ async Task PlatformSpeakAsync(string text, SpeechOptions options, CancellationTo
if (options.Volume.HasValue)
ss.Volume = NormalizeVolume(options.Volume);

// Assigning null resets the synthesizer to the system default voice. The
// synthesizer instance is cached, so skipping the assignment would let a
// voice from a previous utterance leak into this one.
if (options.Locale != null)
ss.Voice = options.Locale.Id;
ss.Voice = string.IsNullOrWhiteSpace(options.Locale.Id) ? null : options.Locale.Id;

if (options.Rate.HasValue)
ss.Rate = options.Rate.Value;
Expand Down
Loading
Loading