1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +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:
aj-rosado
2022-09-16 16:44:15 +01:00
committed by GitHub
parent afa9e23707
commit 305c770c58
17 changed files with 69 additions and 15 deletions

View File

@@ -9,7 +9,7 @@ using Android.Content.Res;
using Android.Nfc;
using Android.OS;
using Android.Runtime;
using AndroidX.Core.Content;
using Android.Views;
using Bit.App.Abstractions;
using Bit.App.Models;
using Bit.App.Utilities;
@@ -49,7 +49,7 @@ namespace Bit.Droid
{
var eventUploadIntent = new Intent(this, typeof(EventUploadReceiver));
_eventUploadPendingIntent = PendingIntent.GetBroadcast(this, 0, eventUploadIntent,
PendingIntentFlags.UpdateCurrent);
AndroidHelpers.AddPendingIntentMutabilityFlag(PendingIntentFlags.UpdateCurrent, false));
var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();
StrictMode.SetThreadPolicy(policy);
@@ -278,7 +278,7 @@ namespace Bit.Droid
{
var intent = new Intent(this, Class);
intent.AddFlags(ActivityFlags.SingleTop);
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, 0);
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, AndroidHelpers.AddPendingIntentMutabilityFlag(0, false));
// register for all NDEF tags starting with http och https
var ndef = new IntentFilter(NfcAdapter.ActionNdefDiscovered);
ndef.AddDataScheme("http");