From 828055791f1b46226a96d3766c20a551beea87a8 Mon Sep 17 00:00:00 2001 From: Dinis Vieira Date: Mon, 2 Oct 2023 21:15:33 +0100 Subject: [PATCH] PM-3349 Removed Deploy from iOS.Autofill to allow running Android Changed MainApplication SpecialFolder.Personal to SpecialFolder.LocalApplicationData --- bitwarden-mobile.sln | 1 - src/App/Platforms/Android/MainApplication.cs | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/bitwarden-mobile.sln b/bitwarden-mobile.sln index 791533a12..4668db146 100644 --- a/bitwarden-mobile.sln +++ b/bitwarden-mobile.sln @@ -33,7 +33,6 @@ Global {E71F3053-056C-4381-9638-048ED73BDFF6}.Release|Any CPU.Build.0 = Release|Any CPU {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|Any CPU.Build.0 = Release|Any CPU {8A3ECD75-3EC8-4CB3-B3A2-A73A724C279A}.Release|Any CPU.Deploy.0 = Release|Any CPU diff --git a/src/App/Platforms/Android/MainApplication.cs b/src/App/Platforms/Android/MainApplication.cs index c7691a6fe..a8965e52f 100644 --- a/src/App/Platforms/Android/MainApplication.cs +++ b/src/App/Platforms/Android/MainApplication.cs @@ -139,16 +139,8 @@ namespace Bit.Droid CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity); var preferencesStorage = new PreferencesStorageService(null); - var documentsPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); - - // TODO: [MAUI-Migration] [Critical] HACK in MAUI the Personal folder adds a \Documents at the end that shouldn't be there - var lastPartDocumentsPathIndex = documentsPath.IndexOf("Documents") - 1; - if (lastPartDocumentsPathIndex >= 0) - { - documentsPath = documentsPath.Substring(0, lastPartDocumentsPathIndex); - } - - var liteDbStorage = new LiteDbStorageService(Path.Combine(documentsPath, "bitwarden.db")); + var localAppDataFolderPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); + var liteDbStorage = new LiteDbStorageService(Path.Combine(localAppDataFolderPath, "bitwarden.db")); var localizeService = new LocalizeService(); var broadcasterService = new BroadcasterService(logger); var messagingService = new MobileBroadcasterMessagingService(broadcasterService);