Skip to content

Commit 317bcda

Browse files
committed
[Mono.Android] Fix WindowManagerLayoutParams.SystemUiVisibility enumification.
1 parent c1efcb5 commit 317bcda

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

src/Mono.Android/Android.Telecom/InCallService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Android.Telecom
66
public abstract partial class InCallService : Android.App.Service
77
{
88
#if ANDROID_23
9-
[Obsolete ("Incorrect enum parameter, use the overload that takes a CallAudioRoute paramter instead.")]
9+
[Obsolete ("Incorrect enum parameter, use the overload that takes a CallAudioRoute parameter instead.")]
1010
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android23.0")]
1111
public void SetAudioRoute ([global::Android.Runtime.GeneratedEnum] Android.Telecom.VideoQuality route)
1212
{
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
3+
namespace Android.Views
4+
{
5+
partial class WindowManagerLayoutParams
6+
{
7+
#if NET
8+
[global::System.Runtime.Versioning.ObsoletedOSPlatform ("android30.0", "These flags are deprecated. Use WindowInsetsController instead.")]
9+
public SystemUiFlags SystemUiFlags {
10+
get => (SystemUiFlags) SystemUiVisibility;
11+
set => SystemUiVisibility = (Android.Views.StatusBarVisibility) value;
12+
}
13+
#endif
14+
}
15+
}

src/Mono.Android/Mono.Android.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
128128
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
129129
<Compile Include="Android.Telecom\InCallService.cs" />
130+
<Compile Include="Android.Views\WindowManagerLayoutParams.cs" />
130131
</ItemGroup>
131132

132133
<Import Project="..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('..\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />

src/Mono.Android/metadata

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,9 @@
17151715
<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']]" />
17161716
<remove-node api-since="33" path="/api/package[@name='java.util.concurrent']/class[@name='TimeUnit']/method[@name='toChronoUnit' and count(parameter)=0]" />
17171717

1718+
<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>
1719+
<attr path="/api/package[@name='android.view']/class[@name='WindowManager.LayoutParams']/field[@name='systemUiVisibility']" name="deprecated-since">0</attr>
1720+
17181721
<!--
17191722
***********************************************************************
17201723
THE FOLLOWING LINES MUST BE CREATED FOR ANY NEW PLATFORM THAT IS ADDED.

0 commit comments

Comments
 (0)