mirror of
https://github.com/bitwarden/mobile
synced 2025-12-13 14:53:18 +00:00
[PS-1312] Migration to android12 and new splashscreen (#2063)
* [PS-1312] Updated Android Target and Framework to Android12 and updated new SplashScreen for Android12 * PS-1312 Changed PendingIntents mutability * PS-1312 Removed unused imports * PS-1312 Added method to helper to add mutability option according to Android version * PS-1312 Renamed helper method AddPendingIntentMutability and fixed validation * PS-1312 Improved PendingIntentMutability method from helper readability and naming
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Provider;
|
||||
using Bit.App.Utilities;
|
||||
|
||||
@@ -47,5 +49,22 @@ namespace Bit.Droid.Utilities
|
||||
await AppHelpers.SetPreconfiguredSettingsAsync(dict);
|
||||
}
|
||||
}
|
||||
|
||||
public static PendingIntentFlags AddPendingIntentMutabilityFlag(PendingIntentFlags pendingIntentFlags, bool isMutable)
|
||||
{
|
||||
//Mutable flag was added on API level 31
|
||||
if (isMutable && Build.VERSION.SdkInt >= BuildVersionCodes.S)
|
||||
{
|
||||
return pendingIntentFlags | PendingIntentFlags.Mutable;
|
||||
}
|
||||
|
||||
//Immutable flag was added on API level 23
|
||||
if (!isMutable && Build.VERSION.SdkInt >= BuildVersionCodes.M)
|
||||
{
|
||||
return pendingIntentFlags | PendingIntentFlags.Immutable;
|
||||
}
|
||||
|
||||
return pendingIntentFlags;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user