chore: Adjust for android deprecated members
This commit is contained in:
Родитель
300d0e1032
Коммит
a83520f7c7
|
@ -282,6 +282,8 @@ namespace Windows.UI.Xaml
|
|||
Windows.UI.Xaml.Application.Current.OnSystemThemeChanged();
|
||||
}
|
||||
|
||||
#pragma warning disable CS0618 // deprecated members
|
||||
#pragma warning disable CS0672 // deprecated members
|
||||
public override void OnBackPressed()
|
||||
{
|
||||
var handled = Windows.UI.Core.SystemNavigationManager.GetForCurrentView().RequestBack();
|
||||
|
@ -290,6 +292,8 @@ namespace Windows.UI.Xaml
|
|||
base.OnBackPressed();
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0618 // deprecated members
|
||||
#pragma warning restore CS0672 // deprecated members
|
||||
|
||||
protected override void OnNewIntent(Intent intent)
|
||||
{
|
||||
|
|
|
@ -417,6 +417,8 @@ namespace Windows.UI.Xaml
|
|||
return jObject;
|
||||
}
|
||||
|
||||
#pragma warning disable CS0618 // deprecated members
|
||||
|
||||
var type = dpValue.GetType();
|
||||
if (type == typeof(bool))
|
||||
{
|
||||
|
@ -424,9 +426,7 @@ namespace Windows.UI.Xaml
|
|||
}
|
||||
else if (type == typeof(sbyte))
|
||||
{
|
||||
#pragma warning disable CS0618 // Byte.Byte(sbyte) is obsolete in API 31
|
||||
return new Java.Lang.Byte((sbyte)dpValue);
|
||||
#pragma warning restore CS0618 // Byte.Byte(sbyte) is obsolete in API 31
|
||||
}
|
||||
else if (type == typeof(char))
|
||||
{
|
||||
|
@ -434,9 +434,7 @@ namespace Windows.UI.Xaml
|
|||
}
|
||||
else if (type == typeof(short))
|
||||
{
|
||||
#pragma warning disable CS0618 // Short.Short(short) is obsolete in API 31
|
||||
return new Java.Lang.Short((short)dpValue);
|
||||
#pragma warning restore CS0618 // Short.Short(short) is obsolete in API 31
|
||||
}
|
||||
else if (type == typeof(int))
|
||||
{
|
||||
|
@ -461,6 +459,7 @@ namespace Windows.UI.Xaml
|
|||
|
||||
// If all else fails, just return the string representation of the DP's value
|
||||
return new Java.Lang.String(dpValue.ToString());
|
||||
#pragma warning restore CS0618 // deprecated members
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#if __ANDROID__
|
||||
#pragma warning disable CS0618 // obsolete members
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#nullable enable
|
||||
#pragma warning disable CS0618 // obsolete members
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#nullable enable
|
||||
#pragma warning disable CS0618 // obsolete members
|
||||
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Content;
|
||||
|
|
Загрузка…
Ссылка в новой задаче