Skip to content

Commit

Permalink
[Mono.Android] Fix WindowManagerLayoutParams.SystemUiVisibility enumi…
Browse files Browse the repository at this point in the history
…fication.
  • Loading branch information
jpobst committed Jan 23, 2023
1 parent c1efcb5 commit 317bcda
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mono.Android/Android.Telecom/InCallService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Android.Telecom
public abstract partial class InCallService : Android.App.Service
{
#if ANDROID_23
[Obsolete ("Incorrect enum parameter, use the overload that takes a CallAudioRoute paramter instead.")]
[Obsolete ("Incorrect enum parameter, use the overload that takes a CallAudioRoute parameter instead.")]
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android23.0")]
public void SetAudioRoute ([global::Android.Runtime.GeneratedEnum] Android.Telecom.VideoQuality route)
{
Expand Down
15 changes: 15 additions & 0 deletions src/Mono.Android/Android.Views/WindowManagerLayoutParams.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;

namespace Android.Views
{
partial class WindowManagerLayoutParams
{
#if NET
[global::System.Runtime.Versioning.ObsoletedOSPlatform ("android30.0", "These flags are deprecated. Use WindowInsetsController instead.")]
public SystemUiFlags SystemUiFlags {
get => (SystemUiFlags) SystemUiVisibility;
set => SystemUiVisibility = (Android.Views.StatusBarVisibility) value;
}
#endif
}
}
1 change: 1 addition & 0 deletions src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
<Compile Include="Android.Telecom\InCallService.cs" />
<Compile Include="Android.Views\WindowManagerLayoutParams.cs" />
</ItemGroup>

<Import Project="..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
Expand Down
3 changes: 3 additions & 0 deletions src/Mono.Android/metadata
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,9 @@
<remove-node api-since="33" path="/api/package[@name='java.util.concurrent']/class[@name='TimeUnit']/method[@name='of' and count(parameter)=1 and parameter[1][@type='java.time.temporal.ChronoUnit']]" />
<remove-node api-since="33" path="/api/package[@name='java.util.concurrent']/class[@name='TimeUnit']/method[@name='toChronoUnit' and count(parameter)=0]" />

<attr path="/api/package[@name='android.view']/class[@name='WindowManager.LayoutParams']/field[@name='systemUiVisibility']" name="deprecated">This property has an incorrect enumeration type. Use the SystemUiFlags property instead.</attr>
<attr path="/api/package[@name='android.view']/class[@name='WindowManager.LayoutParams']/field[@name='systemUiVisibility']" name="deprecated-since">0</attr>

<!--
***********************************************************************
THE FOLLOWING LINES MUST BE CREATED FOR ANY NEW PLATFORM THAT IS ADDED.
Expand Down

0 comments on commit 317bcda

Please sign in to comment.