Skip to content

Commit

Permalink
Use pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Dec 20, 2024
1 parent 16edfd7 commit 0e43559
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BmwDeepObd/ActivityCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7617,7 +7617,9 @@ public bool SendTraceFile(string appDataDir, string traceFile, string message, b
try
{
StringBuilder sbPackages = new StringBuilder();
#pragma warning disable CA1416 // Plattformkompatibilit�t �berpr�fen
IList<PackageInfo> installedPackages = GetInstalledPackages(PackageInfoFlags.MatchSystemOnly);
#pragma warning restore CA1416 // Plattformkompatibilit�t �berpr�fen
if (installedPackages != null)
{
foreach (PackageInfo packageInfoLocal in installedPackages)
Expand Down
3 changes: 3 additions & 0 deletions BmwDeepObd/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2956,6 +2956,7 @@ private bool RequestNotificationPermissions(EventHandler<EventArgs> handler)
return false;
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416: Validate platform compatibilitys")]
private bool RequestStorageManagerPermissions()
{
if (_storageManagerPermissionRequested || _storageManagerPermissionGranted)
Expand Down Expand Up @@ -3786,10 +3787,12 @@ private void UpdateDisplay(bool forceUpdate = false)

if (Build.VERSION.SdkInt >= BuildVersionCodes.N)
{
#pragma warning disable CA1416 // Plattformkompatibilität überprüfen
if (ActivityCommon.SwapMultiWindowOrientation && IsInMultiWindowMode)
{
portrait = !portrait;
}
#pragma warning restore CA1416 // Plattformkompatibilität überprüfen
}

int gaugeCount = portrait ? pageInfo.GaugesPortraitValue : pageInfo.GaugesLandscapeValue;
Expand Down

0 comments on commit 0e43559

Please sign in to comment.