Adjust pragma disable to fix Android compile

This commit is contained in:
Dan Balasescu 2024-02-02 02:18:22 +09:00
parent ec4f3577c0
commit 19ea484240
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -72,9 +72,9 @@ protected override void OnCreate(Bundle? savedInstanceState)
Debug.Assert(Resources?.DisplayMetrics != null); Debug.Assert(Resources?.DisplayMetrics != null);
Point displaySize = new Point(); Point displaySize = new Point();
#pragma warning disable 618 // GetSize is deprecated #pragma warning disable CA1422 // GetSize is deprecated
WindowManager.DefaultDisplay.GetSize(displaySize); WindowManager.DefaultDisplay.GetSize(displaySize);
#pragma warning restore 618 #pragma warning restore CA1422
float smallestWidthDp = Math.Min(displaySize.X, displaySize.Y) / Resources.DisplayMetrics.Density; float smallestWidthDp = Math.Min(displaySize.X, displaySize.Y) / Resources.DisplayMetrics.Density;
bool isTablet = smallestWidthDp >= 600f; bool isTablet = smallestWidthDp >= 600f;