diff --git a/.gitignore b/.gitignore
index c8a63025..ef284c85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,5 @@
/src/java/KP2ASoftKeyboard/projectzip
/src/java/KP2ASoftKeyboard/createProjectZip.bat
Thumbs.db
+
+/src/monodroid-unittesting/*.suo
diff --git a/src/KeePass.sln b/src/KeePass.sln
index 0b73d48e..e2c3baef 100644
--- a/src/KeePass.sln
+++ b/src/KeePass.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLib2Android", "KeePassLib2Android\KeePassLib2Android.csproj", "{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "keepass2android", "keepass2android\keepass2android.csproj", "{A6CF8A86-37C1-4197-80FE-519DE2C842F5}"
@@ -9,6 +9,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "kp2akeytransform", "kp2akey
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kp2aKeyboardBinding", "Kp2aKeyboardBinding\Kp2aKeyboardBinding.csproj", "{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kp2aBusinessLogic", "Kp2aBusinessLogic\Kp2aBusinessLogic.csproj", "{53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDroidUnitTesting", "monodroid-unittesting\MonoDroidUnitTesting\MonoDroidUnitTesting.csproj", "{A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kp2aUnitTests", "Kp2aUnitTests\Kp2aUnitTests.csproj", "{46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +26,9 @@ Global
Release|Win32 = Release|Win32
Release|x64 = Release|x64
ReleaseNoNet|Any CPU = ReleaseNoNet|Any CPU
+ ReleaseNoNet|Mixed Platforms = ReleaseNoNet|Mixed Platforms
+ ReleaseNoNet|Win32 = ReleaseNoNet|Win32
+ ReleaseNoNet|x64 = ReleaseNoNet|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -40,6 +49,34 @@ Global
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.Release|x64.Build.0 = Release|Any CPU
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU
+ {545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Mixed Platforms.ActiveCfg = ReleaseNoNet|Any CPU
+ {545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU
+ {545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Win32.ActiveCfg = ReleaseNoNet|Any CPU
+ {545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|x64.ActiveCfg = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Win32.Build.0 = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|x64.Build.0 = Debug|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Win32.ActiveCfg = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Win32.Build.0 = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|x64.ActiveCfg = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|x64.Build.0 = Release|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.ActiveCfg = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.Deploy.0 = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Win32.ActiveCfg = ReleaseNoNet|Any CPU
+ {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|x64.ActiveCfg = ReleaseNoNet|Any CPU
{A57B3ACE-5634-469A-88C4-858BB409F356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A57B3ACE-5634-469A-88C4-858BB409F356}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A57B3ACE-5634-469A-88C4-858BB409F356}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -58,24 +95,10 @@ Global
{A57B3ACE-5634-469A-88C4-858BB409F356}.Release|x64.Build.0 = Release|Any CPU
{A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|Any CPU.ActiveCfg = Debug|Any CPU
{A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|Any CPU.Build.0 = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Win32.Build.0 = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|x64.Build.0 = Debug|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Any CPU.Build.0 = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Win32.ActiveCfg = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|Win32.Build.0 = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|x64.ActiveCfg = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|x64.Build.0 = Release|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU
- {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU
+ {A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
+ {A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
+ {A57B3ACE-5634-469A-88C4-858BB409F356}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -94,7 +117,73 @@ Global
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.Release|x64.Build.0 = Release|Any CPU
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|Any CPU.ActiveCfg = Debug|Any CPU
{A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|Any CPU.Build.0 = Debug|Any CPU
-
+ {A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
+ {A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
+ {A8779D4D-7C49-4C2F-82BD-2CDC448391DA}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Win32.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|x64.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Win32.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|x64.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|Win32.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.Release|x64.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Any CPU.Deploy.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Mixed Platforms.Deploy.0 = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = keepass2android\keepass2android.csproj
@@ -102,7 +191,7 @@ Global
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
$1.ResourceNamePolicy = FileFormatDefault
- $0.TextStylePolicy = $2
+ $0.TextStylePolicy = $5
$2.FileWidth = 120
$2.TabsToSpaces = False
$2.inheritsSet = VisualStudio
@@ -127,13 +216,11 @@ Global
$3.inheritsSet = Mono
$3.inheritsScope = text/x-csharp
$3.scope = text/x-csharp
- $0.TextStylePolicy = $4
$4.FileWidth = 120
$4.TabsToSpaces = False
$4.inheritsSet = VisualStudio
$4.inheritsScope = text/plain
$4.scope = text/plain
- $0.TextStylePolicy = $5
$5.inheritsSet = null
$5.scope = application/xml
$0.XmlFormattingPolicy = $6
@@ -144,7 +231,4 @@ Global
$7.Text = @/*\nThis file is part of Keepass2Android, Copyright 2013 Philipp Crocoll.\n\n Keepass2Android is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 2 of the License, or\n (at your option) any later version.\n\n Keepass2Android is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with Keepass2Android. If not, see .\n */\n
$7.IncludeInNewFiles = True
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
EndGlobal
diff --git a/src/Kp2aBusinessLogic/IDrawableFactory.cs b/src/Kp2aBusinessLogic/IDrawableFactory.cs
new file mode 100644
index 00000000..a832ff31
--- /dev/null
+++ b/src/Kp2aBusinessLogic/IDrawableFactory.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.Content.Res;
+using KeePassLib;
+using Android.Graphics.Drawables;
+
+namespace keepass2android
+{
+ public interface IDrawableFactory
+ {
+ void assignDrawableTo (ImageView iv, Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId);
+
+ Drawable getIconDrawable(Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId);
+
+
+ void Clear();
+ }
+}
\ No newline at end of file
diff --git a/src/Kp2aBusinessLogic/IKp2aApp.cs b/src/Kp2aBusinessLogic/IKp2aApp.cs
new file mode 100644
index 00000000..3b7fbc81
--- /dev/null
+++ b/src/Kp2aBusinessLogic/IKp2aApp.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using KeePassLib.Serialization;
+
+namespace keepass2android
+{
+ public interface IKp2aApp
+ {
+ void SetShutdown();
+ Database GetDb();
+
+ void StoreOpenedFileAsRecent(IOConnectionInfo ioc, string keyfile);
+
+ Database CreateNewDatabase();
+
+ string GetResourceString(UiStringKey stringKey);
+
+ bool GetBooleanPreference(PreferenceKey key);
+
+ void AskYesNoCancel(UiStringKey titleKey, UiStringKey messageKey,
+ EventHandler yesHandler,
+ EventHandler noHandler,
+ EventHandler cancelHandler,
+ Context ctx);
+ }
+}
\ No newline at end of file
diff --git a/src/keepass2android/KeyFileException.cs b/src/Kp2aBusinessLogic/KeyFileException.cs
similarity index 100%
rename from src/keepass2android/KeyFileException.cs
rename to src/Kp2aBusinessLogic/KeyFileException.cs
diff --git a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj
new file mode 100644
index 00000000..d7082ff4
--- /dev/null
+++ b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj
@@ -0,0 +1,86 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}
+ {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ Properties
+ keepass2android
+ Kp2aBusinessLogic
+ 512
+ Resources\Resource.Designer.cs
+ Off
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {545b4a6b-8bba-4fbe-92fc-4ac060122a54}
+ KeePassLib2Android
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Kp2aBusinessLogic/PreferenceKey.cs b/src/Kp2aBusinessLogic/PreferenceKey.cs
new file mode 100644
index 00000000..cedc9ba3
--- /dev/null
+++ b/src/Kp2aBusinessLogic/PreferenceKey.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+
+namespace keepass2android
+{
+ public enum PreferenceKey
+ {
+ remember_keyfile,
+ UseFileTransactions
+ }
+}
\ No newline at end of file
diff --git a/src/keepass2android/ProgressTask.cs b/src/Kp2aBusinessLogic/ProgressTask.cs
similarity index 83%
rename from src/keepass2android/ProgressTask.cs
rename to src/Kp2aBusinessLogic/ProgressTask.cs
index e6f20b1e..094a1402 100644
--- a/src/keepass2android/ProgressTask.cs
+++ b/src/Kp2aBusinessLogic/ProgressTask.cs
@@ -35,19 +35,20 @@ namespace keepass2android
private Handler mHandler;
private RunnableOnFinish mTask;
private ProgressDialog mPd;
+ private IKp2aApp mApp;
- public ProgressTask(Context ctx, RunnableOnFinish task, int messageId) {
- mCtx = ctx;
+ public ProgressTask(IKp2aApp app, Context ctx, RunnableOnFinish task, UiStringKey messageKey) {
mTask = task;
mHandler = new Handler();
+ mApp = app;
// Show process dialog
- mPd = new ProgressDialog(mCtx);
- mPd.SetTitle(ctx.GetText(Resource.String.progress_title));
- mPd.SetMessage(ctx.GetText(messageId));
+ mPd = new ProgressDialog(ctx);
+ mPd.SetTitle(mApp.GetResourceString(UiStringKey.progress_title));
+ mPd.SetMessage(mApp.GetResourceString(messageKey));
// Set code to run when this is finished
- mTask.setStatus(new UpdateStatus(ctx, mHandler, mPd));
+ mTask.setStatus(new UpdateStatus(mApp, mHandler, mPd));
mTask.mFinish = new AfterTask(task.mFinish, mHandler, mPd);
}
diff --git a/src/Kp2aBusinessLogic/Properties/AssemblyInfo.cs b/src/Kp2aBusinessLogic/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..b65267bb
--- /dev/null
+++ b/src/Kp2aBusinessLogic/Properties/AssemblyInfo.cs
@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Kp2aBusinessLogic")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Kp2aBusinessLogic")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Add some common permissions, these can be removed if not needed
+[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
+[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
diff --git a/src/keepass2android/PwGroupEqualityFromIdComparer.cs b/src/Kp2aBusinessLogic/PwGroupEqualityFromIdComparer.cs
similarity index 100%
rename from src/keepass2android/PwGroupEqualityFromIdComparer.cs
rename to src/Kp2aBusinessLogic/PwGroupEqualityFromIdComparer.cs
diff --git a/src/keepass2android/PwUuidEqualityComparer.cs b/src/Kp2aBusinessLogic/PwUuidEqualityComparer.cs
similarity index 95%
rename from src/keepass2android/PwUuidEqualityComparer.cs
rename to src/Kp2aBusinessLogic/PwUuidEqualityComparer.cs
index f769ff03..b0307ed6 100644
--- a/src/keepass2android/PwUuidEqualityComparer.cs
+++ b/src/Kp2aBusinessLogic/PwUuidEqualityComparer.cs
@@ -31,7 +31,7 @@ using KeePassLib;
namespace keepass2android
{
- class PwUuidEqualityComparer: IEqualityComparer
+ public class PwUuidEqualityComparer: IEqualityComparer
{
#region IEqualityComparer implementation
public bool Equals (PwUuid x, PwUuid y)
diff --git a/src/Kp2aBusinessLogic/Resources/Resource.Designer.cs b/src/Kp2aBusinessLogic/Resources/Resource.Designer.cs
new file mode 100644
index 00000000..e69de29b
diff --git a/src/keepass2android/search/SearchDbHelper.cs b/src/Kp2aBusinessLogic/SearchDbHelper.cs
similarity index 89%
rename from src/keepass2android/search/SearchDbHelper.cs
rename to src/Kp2aBusinessLogic/SearchDbHelper.cs
index 41bea8db..45fc60c1 100644
--- a/src/keepass2android/search/SearchDbHelper.cs
+++ b/src/Kp2aBusinessLogic/SearchDbHelper.cs
@@ -37,11 +37,11 @@ namespace keepass2android
{
public class SearchDbHelper
{
+ private IKp2aApp mApp;
- private readonly Context mCtx;
- public SearchDbHelper(Context ctx) {
- mCtx = ctx;
+ public SearchDbHelper(IKp2aApp app) {
+ mApp = app;
}
@@ -60,7 +60,7 @@ namespace keepass2android
new Regex(sp.SearchString);
}
- string strGroupName = mCtx.GetString(Resource.String.search_results) + " (\"" + sp.SearchString + "\")";
+ string strGroupName = mApp.GetResourceString(UiStringKey.search_results) + " (\"" + sp.SearchString + "\")";
PwGroup pgResults = new PwGroup(true, true, strGroupName, PwIcon.EMailSearch);
pgResults.IsVirtual = true;
@@ -87,7 +87,7 @@ namespace keepass2android
new Regex(sp.SearchString);
}
- string strGroupName = mCtx.GetString(Resource.String.search_results) + " (\"" + sp.SearchString + "\")";
+ string strGroupName = mApp.GetResourceString(UiStringKey.search_results) + " (\"" + sp.SearchString + "\")";
PwGroup pgResults = new PwGroup(true, true, strGroupName, PwIcon.EMailSearch);
pgResults.IsVirtual = true;
@@ -109,7 +109,7 @@ namespace keepass2android
public PwGroup searchForHost(Database database, String url, bool allowSubdomains)
{
String host = extractHost(url);
- string strGroupName = mCtx.GetString(Resource.String.search_results) + " (\"" + host + "\")";
+ string strGroupName = mApp.GetResourceString(UiStringKey.search_results) + " (\"" + host + "\")";
PwGroup pgResults = new PwGroup(true, true, strGroupName, PwIcon.EMailSearch);
pgResults.IsVirtual = true;
if (String.IsNullOrWhiteSpace(host))
diff --git a/src/Kp2aBusinessLogic/UiStringKey.cs b/src/Kp2aBusinessLogic/UiStringKey.cs
new file mode 100644
index 00000000..7314b524
--- /dev/null
+++ b/src/Kp2aBusinessLogic/UiStringKey.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+
+namespace keepass2android
+{
+ public enum UiStringKey
+ {
+ AskDeletePermanentlyGroup,
+ progress_title,
+ AskDeletePermanentlyEntry,
+ search_results,
+ AskDeletePermanently_title,
+ saving_database,
+ keyfile_does_not_exist,
+ RecycleBin,
+ progress_create,
+ loading_database
+ }
+}
\ No newline at end of file
diff --git a/src/keepass2android/UpdateStatus.cs b/src/Kp2aBusinessLogic/UpdateStatus.cs
similarity index 83%
rename from src/keepass2android/UpdateStatus.cs
rename to src/Kp2aBusinessLogic/UpdateStatus.cs
index 2fe27848..12c1ab0c 100644
--- a/src/keepass2android/UpdateStatus.cs
+++ b/src/Kp2aBusinessLogic/UpdateStatus.cs
@@ -32,28 +32,28 @@ namespace keepass2android
{
public class UpdateStatus: IStatusLogger {
private ProgressDialog mPD;
- private Context mCtx;
+ IKp2aApp mApp;
private Handler mHandler;
public UpdateStatus() {
}
- public UpdateStatus(Context ctx, Handler handler, ProgressDialog pd) {
- mCtx = ctx;
+ public UpdateStatus(IKp2aApp app, Handler handler, ProgressDialog pd) {
+ mApp = app;
mPD = pd;
mHandler = handler;
}
- public void updateMessage(int resId) {
- if ( mCtx != null && mPD != null && mHandler != null ) {
- mHandler.Post( () => {mPD.SetMessage(mCtx.GetString(resId));});
+ public void updateMessage(UiStringKey stringKey) {
+ if ( mApp != null && mPD != null && mHandler != null ) {
+ mHandler.Post( () => {mPD.SetMessage(mApp.GetResourceString(stringKey));});
}
}
public void updateMessage (String message)
{
- if ( mCtx != null && mPD != null && mHandler != null ) {
+ if ( mApp!= null && mPD != null && mHandler != null ) {
mHandler.Post(() => {mPD.SetMessage(message); } );
}
}
diff --git a/src/keepass2android/Database.cs b/src/Kp2aBusinessLogic/database/Database.cs
similarity index 75%
rename from src/keepass2android/Database.cs
rename to src/Kp2aBusinessLogic/database/Database.cs
index 08aecdf7..6b53b939 100644
--- a/src/keepass2android/Database.cs
+++ b/src/Kp2aBusinessLogic/database/Database.cs
@@ -46,11 +46,25 @@ namespace keepass2android
public DateTime mLastChangeDate;
public SearchDbHelper searchHelper;
- public DrawableFactory drawFactory = new DrawableFactory();
+ public IDrawableFactory drawableFactory;
+
+ IKp2aApp app;
+
+ public Database(IDrawableFactory drawableFactory, IKp2aApp app)
+ {
+ this.drawableFactory = drawableFactory;
+ this.app = app;
+ }
private bool loaded = false;
- private bool mReloadRequested = false;
+ private bool mReloadRequested = false;
+
+ public bool ReloadRequested
+ {
+ get { return mReloadRequested; }
+ set { mReloadRequested = value; }
+ }
public bool Loaded {
get { return loaded;}
@@ -84,41 +98,8 @@ namespace keepass2android
return System.IO.File.GetLastWriteTimeUtc(mIoc.Path) > mLastChangeDate;
}
- public void CheckForOpenFileChanged(Activity activity)
- {
- if (DidOpenFileChange())
- {
- if (mReloadRequested)
- {
-
- activity.SetResult(KeePass.EXIT_RELOAD_DB);
- activity.Finish();
- }
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- builder.SetTitle(activity.GetString(Resource.String.AskReloadFile_title));
-
- builder.SetMessage(activity.GetString(Resource.String.AskReloadFile));
-
- builder.SetPositiveButton(activity.GetString(Android.Resource.String.Yes), new EventHandler((dlgSender, dlgEvt) =>
- {
- mReloadRequested = true;
- activity.SetResult(KeePass.EXIT_RELOAD_DB);
- activity.Finish();
-
- }));
-
- builder.SetNegativeButton(activity.GetString(Android.Resource.String.No), new EventHandler((dlgSender, dlgEvt) =>
- {
-
- }));
-
-
- Dialog dialog = builder.Create();
- dialog.Show();
- }
- }
- public void LoadData(Context ctx, IOConnectionInfo iocInfo, String password, String keyfile, UpdateStatus status)
+ public void LoadData(IKp2aApp app, IOConnectionInfo iocInfo, String password, String keyfile, UpdateStatus status)
{
mIoc = iocInfo;
@@ -154,7 +135,7 @@ namespace keepass2android
Loaded = true;
pm = pwDatabase;
- searchHelper = new SearchDbHelper(ctx);
+ searchHelper = new SearchDbHelper(app);
}
bool quickUnlockEnabled = false;
@@ -207,8 +188,8 @@ namespace keepass2android
public void SaveData(Context ctx) {
- ISharedPreferences prefs = Android.Preferences.PreferenceManager.GetDefaultSharedPreferences(ctx);
- pm.UseFileTransactions = prefs.GetBoolean(ctx.GetString(Resource.String.UseFileTransactions_key), true);
+
+ pm.UseFileTransactions = app.GetBooleanPreference(PreferenceKey.UseFileTransactions);
pm.Save(null);
}
@@ -257,7 +238,7 @@ namespace keepass2android
groups.Clear();
entries.Clear();
dirty.Clear();
- drawFactory.Clear();
+ drawableFactory.Clear();
root = null;
pm = null;
diff --git a/src/keepass2android/database/edit/ActionOnFinish.cs b/src/Kp2aBusinessLogic/database/edit/ActionOnFinish.cs
similarity index 100%
rename from src/keepass2android/database/edit/ActionOnFinish.cs
rename to src/Kp2aBusinessLogic/database/edit/ActionOnFinish.cs
diff --git a/src/keepass2android/database/edit/AddEntry.cs b/src/Kp2aBusinessLogic/database/edit/AddEntry.cs
similarity index 100%
rename from src/keepass2android/database/edit/AddEntry.cs
rename to src/Kp2aBusinessLogic/database/edit/AddEntry.cs
diff --git a/src/keepass2android/database/edit/AddGroup.cs b/src/Kp2aBusinessLogic/database/edit/AddGroup.cs
similarity index 100%
rename from src/keepass2android/database/edit/AddGroup.cs
rename to src/Kp2aBusinessLogic/database/edit/AddGroup.cs
diff --git a/src/keepass2android/database/edit/CreateDB.cs b/src/Kp2aBusinessLogic/database/edit/CreateDB.cs
similarity index 89%
rename from src/keepass2android/database/edit/CreateDB.cs
rename to src/Kp2aBusinessLogic/database/edit/CreateDB.cs
index da8059b1..024b432e 100644
--- a/src/keepass2android/database/edit/CreateDB.cs
+++ b/src/Kp2aBusinessLogic/database/edit/CreateDB.cs
@@ -39,18 +39,18 @@ namespace keepass2android
private IOConnectionInfo mIoc;
private bool mDontSave;
private Context mCtx;
+ private IKp2aApp mApp;
- public CreateDB(Context ctx, IOConnectionInfo ioc, OnFinish finish, bool dontSave): base(finish) {
+ public CreateDB(IKp2aApp app, Context ctx, IOConnectionInfo ioc, OnFinish finish, bool dontSave): base(finish) {
mCtx = ctx;
mIoc = ioc;
mDontSave = dontSave;
+ mApp = app;
}
public override void run() {
- // Create new database record
- Database db = new Database();
- App.setDB(db);
+ Database db = mApp.CreateNewDatabase();
db.pm = new KeePassLib.PwDatabase();
//Key will be changed/created immediately after creation:
@@ -66,7 +66,7 @@ namespace keepass2android
db.root = db.pm.RootGroup;
db.mIoc = mIoc;
db.Loaded = true;
- db.searchHelper = new SearchDbHelper(mCtx);
+ db.searchHelper = new SearchDbHelper(mApp);
// Add a couple default groups
AddGroup internet = AddGroup.getInstance(mCtx, db, "Internet", 1, db.pm.RootGroup, null, true);
diff --git a/src/keepass2android/database/edit/DeleteEntry.cs b/src/Kp2aBusinessLogic/database/edit/DeleteEntry.cs
similarity index 90%
rename from src/keepass2android/database/edit/DeleteEntry.cs
rename to src/Kp2aBusinessLogic/database/edit/DeleteEntry.cs
index e6fc2e11..9518800f 100644
--- a/src/keepass2android/database/edit/DeleteEntry.cs
+++ b/src/Kp2aBusinessLogic/database/edit/DeleteEntry.cs
@@ -31,12 +31,12 @@ using KeePassLib;
namespace keepass2android
{
public class DeleteEntry : DeleteRunnable {
-
- private PwEntry mEntry;
- public DeleteEntry(Context ctx, Database db, PwEntry entry, OnFinish finish):base(finish) {
+ private PwEntry mEntry;
+
+ public DeleteEntry(Context ctx, IKp2aApp app, PwEntry entry, OnFinish finish):base(finish, app) {
mCtx = ctx;
- mDb = db;
+ mDb = app.GetDb();
mEntry = entry;
}
@@ -49,11 +49,11 @@ namespace keepass2android
}
}
- protected override int QuestionsResourceId
+ protected override UiStringKey QuestionsResourceId
{
get
{
- return Resource.String.AskDeletePermanentlyEntry;
+ return UiStringKey.AskDeletePermanentlyEntry;
}
}
@@ -86,7 +86,7 @@ namespace keepass2android
}
} else {
// Let's not bother recovering from a failure to save a deleted entry. It is too much work.
- App.setShutdown();
+ mApp.SetShutdown();
}
}, this.mFinish);
@@ -109,7 +109,7 @@ namespace keepass2android
mDb.dirty.Add(pgRecycleBin);
} else {
// Let's not bother recovering from a failure to save a deleted entry. It is too much work.
- App.setShutdown();
+ mApp.SetShutdown();
}
}, this.mFinish);
diff --git a/src/keepass2android/database/edit/DeleteGroup.cs b/src/Kp2aBusinessLogic/database/edit/DeleteGroup.cs
similarity index 75%
rename from src/keepass2android/database/edit/DeleteGroup.cs
rename to src/Kp2aBusinessLogic/database/edit/DeleteGroup.cs
index b8135319..1fd33124 100644
--- a/src/keepass2android/database/edit/DeleteGroup.cs
+++ b/src/Kp2aBusinessLogic/database/edit/DeleteGroup.cs
@@ -34,28 +34,33 @@ namespace keepass2android
public class DeleteGroup : DeleteRunnable {
private PwGroup mGroup;
- private GroupBaseActivity mAct;
+ private Activity mAct;
protected bool mDontSave;
- public DeleteGroup(Context ctx, Database db, PwGroup group, GroupBaseActivity act, OnFinish finish):base(finish) {
- setMembers(ctx, db, group, act, false);
+ public DeleteGroup(Context ctx, IKp2aApp app, PwGroup group, Activity act, OnFinish finish)
+ : base(finish, app)
+ {
+ setMembers(ctx, app, group, act, false);
}
-
- public DeleteGroup(Context ctx, Database db, PwGroup group, GroupBaseActivity act, OnFinish finish, bool dontSave):base(finish) {
+ /*
+ public DeleteGroup(Context ctx, Database db, PwGroup group, Activity act, OnFinish finish, bool dontSave)
+ : base(finish)
+ {
setMembers(ctx, db, group, act, dontSave);
}
-
+
public DeleteGroup(Context ctx, Database db, PwGroup group, OnFinish finish, bool dontSave):base(finish) {
setMembers(ctx, db, group, null, dontSave);
}
-
- private void setMembers(Context ctx, Database db, PwGroup group, GroupBaseActivity act, bool dontSave) {
- base.setMembers(ctx, db);
+ */
+ private void setMembers(Context ctx, IKp2aApp app, PwGroup group, Activity act, bool dontSave)
+ {
+ base.setMembers(ctx, app.GetDb());
mGroup = group;
mAct = act;
mDontSave = dontSave;
-
+
}
public override bool CanRecycle
@@ -66,11 +71,11 @@ namespace keepass2android
}
}
- protected override int QuestionsResourceId
+ protected override UiStringKey QuestionsResourceId
{
get
{
- return Resource.String.AskDeletePermanentlyGroup;
+ return UiStringKey.AskDeletePermanentlyGroup;
}
}
@@ -92,7 +97,7 @@ namespace keepass2android
PwDeletedObject pdo = new PwDeletedObject(pg.Uuid, DateTime.Now);
pd.DeletedObjects.Add(pdo);
- mFinish = new AfterDeletePermanently(mFinish, mDb, mGroup);
+ mFinish = new AfterDeletePermanently(mFinish, mApp, mGroup);
}
else // Recycle
{
@@ -113,7 +118,7 @@ namespace keepass2android
mDb.dirty.Add(pgParent);
} else {
// Let's not bother recovering from a failure to save a deleted group. It is too much work.
- App.setShutdown();
+ mApp.SetShutdown();
}
}, this.mFinish);
}
@@ -126,31 +131,31 @@ namespace keepass2android
private class AfterDeletePermanently : OnFinish {
- Database mDb;
+ IKp2aApp mApp;
PwGroup mGroup;
- public AfterDeletePermanently(OnFinish finish, Database db, PwGroup group):base(finish) {
- this.mDb = db;
+ public AfterDeletePermanently(OnFinish finish, IKp2aApp app, PwGroup group):base(finish) {
+ this.mApp = app;
this.mGroup = group;
}
public override void run() {
if ( mSuccess ) {
// Remove from group global
- mDb.groups.Remove(mGroup.Uuid);
+ mApp.GetDb().groups.Remove(mGroup.Uuid);
// Remove group from the dirty global (if it is present), not a big deal if this fails (doesn't throw)
- mDb.dirty.Remove(mGroup);
+ mApp.GetDb().dirty.Remove(mGroup);
// Mark parent dirty
PwGroup parent = mGroup.ParentGroup;
if ( parent != null ) {
- mDb.dirty.Add(parent);
+ mApp.GetDb().dirty.Add(parent);
}
} else {
// Let's not bother recovering from a failure to save a deleted group. It is too much work.
- App.setShutdown();
+ mApp.SetShutdown();
}
base.run();
diff --git a/src/keepass2android/database/edit/DeleteRunnable.cs b/src/Kp2aBusinessLogic/database/edit/DeleteRunnable.cs
similarity index 64%
rename from src/keepass2android/database/edit/DeleteRunnable.cs
rename to src/Kp2aBusinessLogic/database/edit/DeleteRunnable.cs
index 79f5d3b0..738ff1a9 100644
--- a/src/keepass2android/database/edit/DeleteRunnable.cs
+++ b/src/Kp2aBusinessLogic/database/edit/DeleteRunnable.cs
@@ -1,146 +1,142 @@
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-using KeePassLib;
-
-namespace keepass2android
-{
- public abstract class DeleteRunnable : RunnableOnFinish
- {
- public DeleteRunnable(OnFinish finish):base(finish)
- {
- }
-
- protected Database mDb;
-
- protected Context mCtx;
-
- protected void setMembers(Context ctx, Database db)
- {
- mCtx = ctx;
- mDb = db;
- }
-
-
- private bool mDeletePermanently = true;
-
- public bool DeletePermanently
- {
- get
- {
- return mDeletePermanently;
- }
- set
- {
- mDeletePermanently = value;
- }
- }
-
- public abstract bool CanRecycle
- {
- get;
- }
-
- protected bool CanRecycleGroup(PwGroup pgParent)
- {
- bool bShiftPressed = false;
- PwDatabase pd = mDb.pm;
- PwGroup pgRecycleBin = pd.RootGroup.FindGroup(pd.RecycleBinUuid, true);
- bool bPermanent = false;
- if (pgParent != null)
- {
- if (pd.RecycleBinEnabled == false)
- bPermanent = true;
- else if (bShiftPressed)
- bPermanent = true;
- else if (pgRecycleBin == null)
- {
- } // Recycle
- else if (pgParent == pgRecycleBin)
- bPermanent = true;
- else if (pgParent.IsContainedIn(pgRecycleBin))
- bPermanent = true;
- }
- return !bPermanent;
- }
-
-
- protected void EnsureRecycleBin(ref PwGroup pgRecycleBin,
- ref bool bGroupListUpdateRequired)
- {
- if ((mDb == null) || (mDb.pm == null)) { return; }
-
- if(pgRecycleBin == mDb.pm.RootGroup)
- {
- pgRecycleBin = null;
- }
-
- if(pgRecycleBin == null)
- {
- pgRecycleBin = new PwGroup(true, true, mCtx.GetString(Resource.String.RecycleBin),
- PwIcon.TrashBin);
- pgRecycleBin.EnableAutoType = false;
- pgRecycleBin.EnableSearching = false;
- pgRecycleBin.IsExpanded = false;
- mDb.pm.RootGroup.AddGroup(pgRecycleBin, true);
-
- mDb.pm.RecycleBinUuid = pgRecycleBin.Uuid;
-
- bGroupListUpdateRequired = true;
- }
- else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.EqualsValue(mDb.pm.RecycleBinUuid)); }
- }
-
- protected abstract int QuestionsResourceId
- {
- get;
- }
-
- public void start()
- {
- if (CanRecycle)
- {
- AlertDialog.Builder builder = new AlertDialog.Builder(mCtx);
- builder.SetTitle(mCtx.GetString(Resource.String.AskDeletePermanently_title));
-
- builder.SetMessage(mCtx.GetString(QuestionsResourceId));
-
- builder.SetPositiveButton(Resource.String.yes, new EventHandler((dlgSender, dlgEvt) =>
- {
- DeletePermanently = true;
- ProgressTask pt = new ProgressTask(mCtx, this, Resource.String.saving_database);
- pt.run();
- }));
-
- builder.SetNegativeButton(Resource.String.no, new EventHandler((dlgSender, dlgEvt) => {
- DeletePermanently = false;
- ProgressTask pt = new ProgressTask(mCtx, this, Resource.String.saving_database);
- pt.run();
- }));
-
- builder.SetNeutralButton(mCtx.GetString(Android.Resource.String.Cancel),
- new EventHandler((dlgSender, dlgEvt) => {}));
-
- Dialog dialog = builder.Create();
- dialog.Show();
-
-
- } else
- {
- ProgressTask pt = new ProgressTask(mCtx, this, Resource.String.saving_database);
- pt.run();
- }
- }
-
- }
-}
-
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using KeePassLib;
+
+namespace keepass2android
+{
+ public abstract class DeleteRunnable : RunnableOnFinish
+ {
+ public DeleteRunnable(OnFinish finish, IKp2aApp app):base(finish)
+ {
+ mApp = app;
+ }
+
+ protected IKp2aApp mApp;
+
+ protected Database mDb;
+
+ protected Context mCtx;
+
+ protected void setMembers(Context ctx, Database db)
+ {
+ mCtx = ctx;
+ mDb = db;
+ }
+
+
+ private bool mDeletePermanently = true;
+
+ public bool DeletePermanently
+ {
+ get
+ {
+ return mDeletePermanently;
+ }
+ set
+ {
+ mDeletePermanently = value;
+ }
+ }
+
+ public abstract bool CanRecycle
+ {
+ get;
+ }
+
+ protected bool CanRecycleGroup(PwGroup pgParent)
+ {
+ bool bShiftPressed = false;
+ PwDatabase pd = mDb.pm;
+ PwGroup pgRecycleBin = pd.RootGroup.FindGroup(pd.RecycleBinUuid, true);
+ bool bPermanent = false;
+ if (pgParent != null)
+ {
+ if (pd.RecycleBinEnabled == false)
+ bPermanent = true;
+ else if (bShiftPressed)
+ bPermanent = true;
+ else if (pgRecycleBin == null)
+ {
+ } // Recycle
+ else if (pgParent == pgRecycleBin)
+ bPermanent = true;
+ else if (pgParent.IsContainedIn(pgRecycleBin))
+ bPermanent = true;
+ }
+ return !bPermanent;
+ }
+
+
+ protected void EnsureRecycleBin(ref PwGroup pgRecycleBin,
+ ref bool bGroupListUpdateRequired)
+ {
+ if ((mDb == null) || (mDb.pm == null)) { return; }
+
+ if(pgRecycleBin == mDb.pm.RootGroup)
+ {
+ pgRecycleBin = null;
+ }
+
+ if(pgRecycleBin == null)
+ {
+ pgRecycleBin = new PwGroup(true, true, mApp.GetResourceString(UiStringKey.RecycleBin),
+ PwIcon.TrashBin);
+ pgRecycleBin.EnableAutoType = false;
+ pgRecycleBin.EnableSearching = false;
+ pgRecycleBin.IsExpanded = false;
+ mDb.pm.RootGroup.AddGroup(pgRecycleBin, true);
+
+ mDb.pm.RecycleBinUuid = pgRecycleBin.Uuid;
+
+ bGroupListUpdateRequired = true;
+ }
+ else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.EqualsValue(mDb.pm.RecycleBinUuid)); }
+ }
+
+ protected abstract UiStringKey QuestionsResourceId
+ {
+ get;
+ }
+
+ public void start()
+ {
+ if (CanRecycle)
+ {
+ mApp.AskYesNoCancel(UiStringKey.AskDeletePermanently_title,
+ QuestionsResourceId,
+ new EventHandler((dlgSender, dlgEvt) =>
+ {
+ DeletePermanently = true;
+ ProgressTask pt = new ProgressTask(mApp, mCtx, this, UiStringKey.saving_database);
+ pt.run();
+ }),
+ new EventHandler((dlgSender, dlgEvt) => {
+ DeletePermanently = false;
+ ProgressTask pt = new ProgressTask(mApp, mCtx, this, UiStringKey.saving_database);
+ pt.run();
+ }),
+ new EventHandler((dlgSender, dlgEvt) => {}),
+ mCtx);
+
+
+
+ } else
+ {
+ ProgressTask pt = new ProgressTask(mApp, mCtx, this, UiStringKey.saving_database);
+ pt.run();
+ }
+ }
+
+ }
+}
+
diff --git a/src/keepass2android/database/edit/FileOnFinish.cs b/src/Kp2aBusinessLogic/database/edit/FileOnFinish.cs
similarity index 100%
rename from src/keepass2android/database/edit/FileOnFinish.cs
rename to src/Kp2aBusinessLogic/database/edit/FileOnFinish.cs
diff --git a/src/keepass2android/database/edit/LoadDB.cs b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs
similarity index 81%
rename from src/keepass2android/database/edit/LoadDB.cs
rename to src/Kp2aBusinessLogic/database/edit/LoadDB.cs
index a713fa63..85c64ab2 100644
--- a/src/keepass2android/database/edit/LoadDB.cs
+++ b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs
@@ -35,32 +35,32 @@ namespace keepass2android
private IOConnectionInfo mIoc;
private String mPass;
private String mKey;
- private Database mDb;
+ private IKp2aApp mApp;
private Context mCtx;
private bool mRememberKeyfile;
- public LoadDB(Database db, Context ctx, IOConnectionInfo ioc, String pass, String key, OnFinish finish): base(finish)
+ public LoadDB(IKp2aApp app, Context ctx, IOConnectionInfo ioc, String pass, String key, OnFinish finish): base(finish)
{
- mDb = db;
+ mApp = app;
mCtx = ctx;
mIoc = ioc;
mPass = pass;
mKey = key;
-
- ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(ctx);
- mRememberKeyfile = prefs.GetBoolean(ctx.GetString(Resource.String.keyfile_key), ctx.Resources.GetBoolean(Resource.Boolean.keyfile_default));
+
+
+ mRememberKeyfile = app.GetBooleanPreference(PreferenceKey.remember_keyfile);
}
public override void run ()
{
try {
- mDb.LoadData (mCtx, mIoc, mPass, mKey, mStatus);
+ mApp.GetDb().LoadData (mApp, mIoc, mPass, mKey, mStatus);
saveFileData (mIoc, mKey);
} catch (KeyFileException) {
- finish(false, /*TODO Localize: use Keepass error text KPRes.KeyFileError (including "or invalid format")*/ mCtx.GetString(Resource.String.keyfile_does_not_exist));
+ finish(false, /*TODO Localize: use Keepass error text KPRes.KeyFileError (including "or invalid format")*/ mApp.GetResourceString(UiStringKey.keyfile_does_not_exist));
}
catch (Exception e) {
finish(false, "An error occured: " + e.Message);
@@ -102,13 +102,12 @@ namespace keepass2android
}
private void saveFileData(IOConnectionInfo ioc, String key) {
- FileDbHelper db = App.fileDbHelper;
-
- if ( ! mRememberKeyfile ) {
- key = "";
- }
-
- db.createFile(ioc, key);
+
+ if (!mRememberKeyfile)
+ {
+ key = "";
+ }
+ mApp.StoreOpenedFileAsRecent(ioc, key);
}
diff --git a/src/keepass2android/database/edit/OnFinish.cs b/src/Kp2aBusinessLogic/database/edit/OnFinish.cs
similarity index 100%
rename from src/keepass2android/database/edit/OnFinish.cs
rename to src/Kp2aBusinessLogic/database/edit/OnFinish.cs
diff --git a/src/keepass2android/database/edit/RunnableOnFinish.cs b/src/Kp2aBusinessLogic/database/edit/RunnableOnFinish.cs
similarity index 100%
rename from src/keepass2android/database/edit/RunnableOnFinish.cs
rename to src/Kp2aBusinessLogic/database/edit/RunnableOnFinish.cs
diff --git a/src/keepass2android/database/edit/SaveDB.cs b/src/Kp2aBusinessLogic/database/edit/SaveDB.cs
similarity index 100%
rename from src/keepass2android/database/edit/SaveDB.cs
rename to src/Kp2aBusinessLogic/database/edit/SaveDB.cs
diff --git a/src/keepass2android/database/edit/SetPassword.cs b/src/Kp2aBusinessLogic/database/edit/SetPassword.cs
similarity index 100%
rename from src/keepass2android/database/edit/SetPassword.cs
rename to src/Kp2aBusinessLogic/database/edit/SetPassword.cs
diff --git a/src/keepass2android/database/edit/UpdateEntry.cs b/src/Kp2aBusinessLogic/database/edit/UpdateEntry.cs
similarity index 100%
rename from src/keepass2android/database/edit/UpdateEntry.cs
rename to src/Kp2aBusinessLogic/database/edit/UpdateEntry.cs
diff --git a/src/Kp2aUnitTests/Kp2aUnitTests.csproj b/src/Kp2aUnitTests/Kp2aUnitTests.csproj
new file mode 100644
index 00000000..7911fd18
--- /dev/null
+++ b/src/Kp2aUnitTests/Kp2aUnitTests.csproj
@@ -0,0 +1,80 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {46B769B8-2C58-4138-9CC0-70E3AE3C9A3A}
+ {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ Properties
+ Kp2aUnitTests
+ Kp2aUnitTests
+ 512
+ true
+ Resources\Resource.Designer.cs
+ Off
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ True
+ None
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ False
+ SdkOnly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {a5f8fb02-00e0-4335-91ef-aeaa2c2f3c48}
+ MonoDroidUnitTesting
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Kp2aUnitTests/MainActivity.cs b/src/Kp2aUnitTests/MainActivity.cs
new file mode 100644
index 00000000..718670d8
--- /dev/null
+++ b/src/Kp2aUnitTests/MainActivity.cs
@@ -0,0 +1,27 @@
+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+using MonoDroidUnitTesting;
+using System.Reflection;
+
+namespace Kp2aUnitTests
+{
+ [Activity(Label = "MonoDroidUnit", MainLauncher = true, Icon = "@drawable/icon")]
+ public class MainActivity : GuiTestRunnerActivity
+ {
+ protected override TestRunner CreateTestRunner()
+ {
+ TestRunner runner = new TestRunner();
+ // Run all tests from this assembly
+ runner.AddTests(Assembly.GetExecutingAssembly());
+ return runner;
+ }
+ }
+
+}
+
diff --git a/src/Kp2aUnitTests/Properties/AssemblyInfo.cs b/src/Kp2aUnitTests/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..10d04ed0
--- /dev/null
+++ b/src/Kp2aUnitTests/Properties/AssemblyInfo.cs
@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Kp2aUnitTests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Kp2aUnitTests")]
+[assembly: AssemblyCopyright("Copyright © 2013")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Add some common permissions, these can be removed if not needed
+[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
+[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
diff --git a/src/Kp2aUnitTests/Resources/AboutResources.txt b/src/Kp2aUnitTests/Resources/AboutResources.txt
new file mode 100644
index 00000000..194ae28a
--- /dev/null
+++ b/src/Kp2aUnitTests/Resources/AboutResources.txt
@@ -0,0 +1,50 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.xml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable-hdpi/
+ icon.png
+
+ drawable-ldpi/
+ icon.png
+
+ drawable-mdpi/
+ icon.png
+
+ layout/
+ main.xml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called
+"Resource" that contains the tokens for each one of the resources included. For example,
+for the above Resources layout, this is what the Resource class would expose:
+
+public class Resource {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
+to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
\ No newline at end of file
diff --git a/src/Kp2aUnitTests/Resources/Drawable/Icon.png b/src/Kp2aUnitTests/Resources/Drawable/Icon.png
new file mode 100644
index 00000000..8074c4c5
Binary files /dev/null and b/src/Kp2aUnitTests/Resources/Drawable/Icon.png differ
diff --git a/src/Kp2aUnitTests/Resources/Layout/Main.axml b/src/Kp2aUnitTests/Resources/Layout/Main.axml
new file mode 100644
index 00000000..98be1643
--- /dev/null
+++ b/src/Kp2aUnitTests/Resources/Layout/Main.axml
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/src/Kp2aUnitTests/Resources/Resource.Designer.cs b/src/Kp2aUnitTests/Resources/Resource.Designer.cs
new file mode 100644
index 00000000..691433d3
--- /dev/null
+++ b/src/Kp2aUnitTests/Resources/Resource.Designer.cs
@@ -0,0 +1,112 @@
+#pragma warning disable 1591
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.18046
+//
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
+//
+//------------------------------------------------------------------------------
+
+[assembly: global::Android.Runtime.ResourceDesignerAttribute("Kp2aUnitTests.Resource", IsApplication=true)]
+
+namespace Kp2aUnitTests
+{
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ public partial class Resource
+ {
+
+ static Resource()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ public static void UpdateIdValues()
+ {
+ }
+
+ public partial class Attribute
+ {
+
+ static Attribute()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class Drawable
+ {
+
+ // aapt resource value: 0x7f020000
+ public const int Icon = 2130837504;
+
+ static Drawable()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Drawable()
+ {
+ }
+ }
+
+ public partial class Id
+ {
+
+ // aapt resource value: 0x7f050000
+ public const int MyButton = 2131034112;
+
+ static Id()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Id()
+ {
+ }
+ }
+
+ public partial class Layout
+ {
+
+ // aapt resource value: 0x7f030000
+ public const int Main = 2130903040;
+
+ static Layout()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Layout()
+ {
+ }
+ }
+
+ public partial class String
+ {
+
+ // aapt resource value: 0x7f040001
+ public const int ApplicationName = 2130968577;
+
+ // aapt resource value: 0x7f040000
+ public const int Hello = 2130968576;
+
+ static String()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private String()
+ {
+ }
+ }
+ }
+}
+#pragma warning restore 1591
diff --git a/src/Kp2aUnitTests/Resources/Values/Strings.xml b/src/Kp2aUnitTests/Resources/Values/Strings.xml
new file mode 100644
index 00000000..79b96cef
--- /dev/null
+++ b/src/Kp2aUnitTests/Resources/Values/Strings.xml
@@ -0,0 +1,5 @@
+
+
+ Hello World, Click Me!
+ Kp2aUnitTests
+
diff --git a/src/keepass2android/EntryActivity.cs b/src/keepass2android/EntryActivity.cs
index 779dd3b8..dae74f2b 100644
--- a/src/keepass2android/EntryActivity.cs
+++ b/src/keepass2android/EntryActivity.cs
@@ -101,7 +101,7 @@ namespace keepass2android
Context appCtx = ApplicationContext;
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
// Likely the app has been killed exit the activity
if (! db.Loaded)
{
@@ -135,8 +135,8 @@ namespace keepass2android
mEntry.Touch(true);
requiresRefresh();
Handler handler = new Handler();
- UpdateEntry update = new UpdateEntry(this, App.getDB(), backupEntry, mEntry, new AfterSave(handler));
- ProgressTask pt = new ProgressTask(this, update, Resource.String.saving_database);
+ UpdateEntry update = new UpdateEntry(this, App.Kp2a.GetDb(), backupEntry, mEntry, null);
+ ProgressTask pt = new ProgressTask(App.Kp2a, this, update, UiStringKey.saving_database);
pt.run();
}
fillData(false);
@@ -152,9 +152,9 @@ namespace keepass2android
Android.Util.Log.Debug("DEBUG", "Requesting copy to clipboard for Uuid=" + mEntry.Uuid.ToHexString());
- /*foreach (PwUuid key in App.getDB().entries.Keys)
+ /*foreach (PwUuid key in App.Kp2a.GetDb().entries.Keys)
{
- Android.Util.Log.Debug("DEBUG",key.ToHexString() + " -> " + App.getDB().entries[key].Uuid.ToHexString());
+ Android.Util.Log.Debug("DEBUG",key.ToHexString() + " -> " + App.Kp2a.GetDb().entries[key].Uuid.ToHexString());
}*/
if (closeAfterCreate)
@@ -163,20 +163,6 @@ namespace keepass2android
Finish();
}
}
-
- private class AfterSave : OnFinish {
-
- public AfterSave(Handler handler):base(handler) {
-
- }
-
- public override void run() {
-
- base.run();
- }
-
- };
-
private String getDateTime(System.DateTime dt) {
@@ -402,7 +388,7 @@ namespace keepass2android
ImageView iv = (ImageView)FindViewById(Resource.Id.entry_icon);
if (iv != null)
{
- App.getDB().drawFactory.assignDrawableTo(iv, Resources, App.getDB().pm, mEntry.IconId, mEntry.CustomIconUuid);
+ App.Kp2a.GetDb().drawableFactory.assignDrawableTo(iv, Resources, App.Kp2a.GetDb().pm, mEntry.IconId, mEntry.CustomIconUuid);
}
//populateText(Resource.Id.entry_title, mEntry.Strings.ReadSafe(PwDefs.TitleField));
@@ -634,7 +620,7 @@ namespace keepass2android
}
return true;
case Resource.Id.menu_lock:
- App.setShutdown();
+ App.Kp2a.SetShutdown();
SetResult(KeePass.EXIT_LOCK);
Finish();
return true;
diff --git a/src/keepass2android/EntryEditActivity.cs b/src/keepass2android/EntryEditActivity.cs
index 46600af5..2f53792b 100644
--- a/src/keepass2android/EntryEditActivity.cs
+++ b/src/keepass2android/EntryEditActivity.cs
@@ -50,7 +50,7 @@ namespace keepass2android
EntryEditActivityState State
{
- get { return App.entryEditActivityState; }
+ get { return App.Kp2a.entryEditActivityState; }
}
public static void Launch(Activity act, PwEntry pw, AppTask appTask) {
@@ -98,7 +98,7 @@ namespace keepass2android
mCloseForReload = false;
// Likely the app has been killed exit the activity
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
if (! db.Open)
{
Finish();
@@ -113,7 +113,7 @@ namespace keepass2android
} else
{
- App.entryEditActivityState = new EntryEditActivityState();
+ App.Kp2a.entryEditActivityState = new EntryEditActivityState();
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
State.mShowPassword = ! prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default));
@@ -293,7 +293,7 @@ namespace keepass2android
void SaveEntry()
{
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
EntryEditActivity act = this;
if (!validateBeforeSaving())
@@ -392,11 +392,11 @@ namespace keepass2android
},closeOrShowError);
if ( State.mIsNew ) {
- runnable = AddEntry.getInstance(this, App.getDB(), newEntry, State.parentGroup, afterAddEntry);
+ runnable = AddEntry.getInstance(this, App.Kp2a.GetDb(), newEntry, State.parentGroup, afterAddEntry);
} else {
- runnable = new UpdateEntry(this, App.getDB(), initialEntry, newEntry, closeOrShowError);
+ runnable = new UpdateEntry(this, App.Kp2a.GetDb(), initialEntry, newEntry, closeOrShowError);
}
- ProgressTask pt = new ProgressTask(act, runnable, Resource.String.saving_database);
+ ProgressTask pt = new ProgressTask(App.Kp2a, act, runnable, UiStringKey.saving_database);
pt.run();
@@ -404,7 +404,7 @@ namespace keepass2android
void UpdateEntryFromUi(PwEntry entry)
{
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
EntryEditActivity act = this;
entry.Strings.Set(PwDefs.TitleField, new ProtectedString(db.pm.MemoryProtection.ProtectTitle,
@@ -625,7 +625,7 @@ namespace keepass2android
String generatedPassword = data.GetStringExtra("keepass2android.password.generated_password");
byte[] password = StrUtil.Utf8.GetBytes(generatedPassword);
- State.mEntry.Strings.Set(PwDefs.PasswordField, new ProtectedString(App.getDB().pm.MemoryProtection.ProtectPassword,
+ State.mEntry.Strings.Set(PwDefs.PasswordField, new ProtectedString(App.Kp2a.GetDb().pm.MemoryProtection.ProtectPassword,
password));
MemUtil.ZeroByteArray(password);
@@ -813,7 +813,7 @@ namespace keepass2android
private void fillData() {
ImageButton currIconButton = (ImageButton) FindViewById(Resource.Id.icon_button);
- App.getDB().drawFactory.assignDrawableTo(currIconButton, Resources, App.getDB().pm, State.mEntry.IconId, State.mEntry.CustomIconUuid);
+ App.Kp2a.GetDb().drawableFactory.assignDrawableTo(currIconButton, Resources, App.Kp2a.GetDb().pm, State.mEntry.IconId, State.mEntry.CustomIconUuid);
populateText(Resource.Id.entry_title, State.mEntry.Strings.ReadSafe (PwDefs.TitleField));
populateText(Resource.Id.entry_user_name, State.mEntry.Strings.ReadSafe (PwDefs.UserNameField));
diff --git a/src/keepass2android/GroupActivity.cs b/src/keepass2android/GroupActivity.cs
index 1cee2302..7e5bae2a 100644
--- a/src/keepass2android/GroupActivity.cs
+++ b/src/keepass2android/GroupActivity.cs
@@ -54,7 +54,7 @@ namespace keepass2android
Intent i;
// Need to use PwDatabase since group may be null
- PwDatabase db = App.getDB ().pm;
+ PwDatabase db = App.Kp2a.GetDb().pm;
if (db == null) {
// Reached if db is null
@@ -85,7 +85,7 @@ namespace keepass2android
protected void setupButtons()
{
addGroupEnabled = true;
- addEntryEnabled = !mGroup.Uuid.EqualsValue(App.getDB().root.Uuid);
+ addEntryEnabled = !mGroup.Uuid.EqualsValue(App.Kp2a.GetDb().root.Uuid);
}
protected override void OnCreate (Bundle savedInstanceState)
@@ -103,7 +103,7 @@ namespace keepass2android
PwUuid id = retrieveGroupId (intent);
- Database db = App.getDB ();
+ Database db = App.Kp2a.GetDb();
if (id == null) {
mGroup = db.root;
} else {
@@ -184,8 +184,8 @@ namespace keepass2android
int GroupIconID = data.Extras.GetInt(GroupEditActivity.KEY_ICON_ID);
GroupBaseActivity act = this;
Handler handler = new Handler();
- AddGroup task = AddGroup.getInstance(this, App.getDB(), GroupName, GroupIconID, mGroup, new RefreshTask(handler, this), false);
- ProgressTask pt = new ProgressTask(act, task, Resource.String.saving_database);
+ AddGroup task = AddGroup.getInstance(this, App.Kp2a.GetDb(), GroupName, GroupIconID, mGroup, new RefreshTask(handler, this), false);
+ ProgressTask pt = new ProgressTask(App.Kp2a, act, task, UiStringKey.saving_database);
pt.run();
break;
diff --git a/src/keepass2android/GroupBaseActivity.cs b/src/keepass2android/GroupBaseActivity.cs
index 87eeaf60..a5bd5c08 100644
--- a/src/keepass2android/GroupBaseActivity.cs
+++ b/src/keepass2android/GroupBaseActivity.cs
@@ -91,7 +91,7 @@ namespace keepass2android
}
public void refreshIfDirty() {
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
if ( db.dirty.Contains(mGroup) ) {
db.dirty.Remove(mGroup);
BaseAdapter adapter = (BaseAdapter) ListAdapter;
@@ -115,7 +115,7 @@ namespace keepass2android
mAppTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent);
// Likely the app has been killed exit the activity
- if ( ! App.getDB().Loaded ) {
+ if ( ! App.Kp2a.GetDb().Loaded ) {
Finish();
return;
}
@@ -183,7 +183,7 @@ namespace keepass2android
protected void setGroupIcon() {
if (mGroup != null) {
- Drawable drawable = App.getDB().drawFactory.getIconDrawable(Resources, App.getDB().pm, mGroup.IconId, mGroup.CustomIconUuid);
+ Drawable drawable = App.Kp2a.GetDb().drawableFactory.getIconDrawable(Resources, App.Kp2a.GetDb().pm, mGroup.IconId, mGroup.CustomIconUuid);
ImageView iv = (ImageView) FindViewById(Resource.Id.icon);
if (iv != null)
iv.SetImageDrawable(drawable);
@@ -237,7 +237,7 @@ namespace keepass2android
return true;
case Resource.Id.menu_lock:
- App.setShutdown();
+ App.Kp2a.SetShutdown();
SetResult(KeePass.EXIT_LOCK);
Finish();
return true;
@@ -303,7 +303,7 @@ namespace keepass2android
ActivityCompat.invalidateOptionsMenu(this);
// Mark all groups as dirty now to refresh them on load
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
db.markAllGroupsAsDirty();
// We'll manually refresh this group so we can remove it
db.dirty.Remove(mGroup);
@@ -349,7 +349,7 @@ namespace keepass2android
Toast.MakeText(act, "Unrecoverable error: " + mMessage, ToastLength.Long).Show();
});
- App.setShutdown();
+ App.Kp2a.SetShutdown();
act.Finish();
}
}
diff --git a/src/keepass2android/LockCloseActivity.cs b/src/keepass2android/LockCloseActivity.cs
index 0feaa7b9..db8538a6 100644
--- a/src/keepass2android/LockCloseActivity.cs
+++ b/src/keepass2android/LockCloseActivity.cs
@@ -37,7 +37,7 @@ namespace keepass2android
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
- mIoc = App.getDB().mIoc;
+ mIoc = App.Kp2a.GetDb().mIoc;
}
@@ -48,9 +48,11 @@ namespace keepass2android
if (TimeoutHelper.checkShutdown(this, mIoc))
return;
- App.getDB().CheckForOpenFileChanged(this);
+ App.Kp2a.CheckForOpenFileChanged(this);
}
+
+
}
diff --git a/src/keepass2android/LockCloseListActivity.cs b/src/keepass2android/LockCloseListActivity.cs
index c0237cff..b9be8062 100644
--- a/src/keepass2android/LockCloseListActivity.cs
+++ b/src/keepass2android/LockCloseListActivity.cs
@@ -42,7 +42,7 @@ namespace keepass2android
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
- mIoc = App.getDB().mIoc;
+ mIoc = App.Kp2a.GetDb().mIoc;
}
public LockCloseListActivity (IntPtr javaReference, JniHandleOwnership transfer)
@@ -58,7 +58,7 @@ namespace keepass2android
if (TimeoutHelper.checkShutdown(this, mIoc))
return;
- App.getDB().CheckForOpenFileChanged(this);
+ App.Kp2a.CheckForOpenFileChanged(this);
}
}
diff --git a/src/keepass2android/LockingClosePreferenceActivity.cs b/src/keepass2android/LockingClosePreferenceActivity.cs
index e29bb651..827765c2 100644
--- a/src/keepass2android/LockingClosePreferenceActivity.cs
+++ b/src/keepass2android/LockingClosePreferenceActivity.cs
@@ -39,7 +39,7 @@ namespace keepass2android
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
- mIoc = App.getDB().mIoc;
+ mIoc = App.Kp2a.GetDb().mIoc;
}
protected override void OnResume() {
diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs
index cbdf15a1..b088ebfd 100644
--- a/src/keepass2android/PasswordActivity.cs
+++ b/src/keepass2android/PasswordActivity.cs
@@ -134,7 +134,7 @@ namespace keepass2android
void unloadDatabase()
{
- App.getDB().Clear();
+ App.Kp2a.GetDb().Clear();
StopService(new Intent(this, typeof(QuickUnlockForegroundService)));
}
@@ -142,8 +142,8 @@ namespace keepass2android
{
SetResult(KeePass.EXIT_LOCK);
setEditText(Resource.Id.password, "");
- if (App.getDB().QuickUnlockEnabled)
- App.getDB().Locked = true;
+ if (App.Kp2a.GetDb().QuickUnlockEnabled)
+ App.Kp2a.GetDb().Locked = true;
else
{
unloadDatabase();
@@ -159,18 +159,18 @@ namespace keepass2android
bool tryStartQuickUnlock()
{
- if (!App.getDB().QuickUnlockEnabled)
+ if (!App.Kp2a.GetDb().QuickUnlockEnabled)
return false;
- if (App.getDB().pm.MasterKey.ContainsType(typeof(KcpPassword)) == false)
+ if (App.Kp2a.GetDb().pm.MasterKey.ContainsType(typeof(KcpPassword)) == false)
return false;
- KcpPassword kcpPassword = (KcpPassword)App.getDB().pm.MasterKey.GetUserKey(typeof(KcpPassword));
+ KcpPassword kcpPassword = (KcpPassword)App.Kp2a.GetDb().pm.MasterKey.GetUserKey(typeof(KcpPassword));
String password = kcpPassword.Password.ReadString();
if (password.Length == 0)
return false;
- App.getDB().Locked = true;
+ App.Kp2a.GetDb().Locked = true;
Intent i = new Intent(this, typeof(QuickUnlock));
PutIoConnectionToIntent(mIoConnection, i);
@@ -181,7 +181,7 @@ namespace keepass2android
public void StartQuickUnlockForegroundService()
{
- if (App.getDB().QuickUnlockEnabled)
+ if (App.Kp2a.GetDb().QuickUnlockEnabled)
{
StartService(new Intent(this, typeof(QuickUnlockForegroundService)));
}
@@ -235,26 +235,26 @@ namespace keepass2android
Finish();
break;
case KeePass.EXIT_QUICK_UNLOCK:
- App.getDB().Locked = false;
+ App.Kp2a.GetDb().Locked = false;
LaunchNextActivity();
break;
case KeePass.EXIT_RELOAD_DB:
//if the activity was killed, fill password/keyfile so the user can directly hit load again
- if (App.getDB().Loaded)
+ if (App.Kp2a.GetDb().Loaded)
{
- if (App.getDB().pm.MasterKey.ContainsType(typeof(KcpPassword)))
+ if (App.Kp2a.GetDb().pm.MasterKey.ContainsType(typeof(KcpPassword)))
{
- KcpPassword kcpPassword = (KcpPassword)App.getDB().pm.MasterKey.GetUserKey(typeof(KcpPassword));
+ KcpPassword kcpPassword = (KcpPassword)App.Kp2a.GetDb().pm.MasterKey.GetUserKey(typeof(KcpPassword));
String password = kcpPassword.Password.ReadString();
setEditText(Resource.Id.password, password);
}
- if (App.getDB().pm.MasterKey.ContainsType(typeof(KcpKeyFile)))
+ if (App.Kp2a.GetDb().pm.MasterKey.ContainsType(typeof(KcpKeyFile)))
{
- KcpKeyFile kcpKeyfile = (KcpKeyFile)App.getDB().pm.MasterKey.GetUserKey(typeof(KcpKeyFile));
+ KcpKeyFile kcpKeyfile = (KcpKeyFile)App.Kp2a.GetDb().pm.MasterKey.GetUserKey(typeof(KcpKeyFile));
setEditText(Resource.Id.pass_keyfile, kcpKeyfile.Path);
}
@@ -367,15 +367,15 @@ namespace keepass2android
unloadDatabase();
// Clear the shutdown flag
- App.clearShutdown();
+ App.Kp2a.clearShutdown();
CheckBox cbQuickUnlock = (CheckBox)FindViewById(Resource.Id.enable_quickunlock);
- App.getDB().QuickUnlockEnabled = cbQuickUnlock.Checked;
- App.getDB().QuickUnlockKeyLength = int.Parse(prefs.GetString(GetString(Resource.String.QuickUnlockLength_key), GetString(Resource.String.QuickUnlockLength_default)));
+ App.Kp2a.GetDb().QuickUnlockEnabled = cbQuickUnlock.Checked;
+ App.Kp2a.GetDb().QuickUnlockKeyLength = int.Parse(prefs.GetString(GetString(Resource.String.QuickUnlockLength_key), GetString(Resource.String.QuickUnlockLength_default)));
Handler handler = new Handler();
- LoadDB task = new LoadDB(App.getDB(), this, mIoConnection, pass, key, new AfterLoad(handler, this));
- ProgressTask pt = new ProgressTask(this, task, Resource.String.loading_database);
+ LoadDB task = new LoadDB(App.Kp2a, this, mIoConnection, pass, key, new AfterLoad(handler, this));
+ ProgressTask pt = new ProgressTask(App.Kp2a, this, task, UiStringKey.loading_database);
pt.run();
};
@@ -463,20 +463,20 @@ namespace keepass2android
// If the application was shutdown make sure to clear the password field, if it
// was saved in the instance state
- if (App.isShutdown()) {
+ if (App.Kp2a.isShutdown()) {
lockDatabase();
}
// Clear the shutdown flag
- App.clearShutdown();
+ App.Kp2a.clearShutdown();
if (startedWithActivityResult)
return;
- if (App.getDB().Loaded && (App.getDB().mIoc != null)
- && (mIoConnection != null) && (App.getDB().mIoc.GetDisplayName() == mIoConnection.GetDisplayName()))
+ if (App.Kp2a.GetDb().Loaded && (App.Kp2a.GetDb().mIoc != null)
+ && (mIoConnection != null) && (App.Kp2a.GetDb().mIoc.GetDisplayName() == mIoConnection.GetDisplayName()))
{
- if (App.getDB().Locked == false)
+ if (App.Kp2a.GetDb().Locked == false)
{
LaunchNextActivity();
}
@@ -499,7 +499,7 @@ namespace keepass2android
private String getKeyFile(String filename) {
if ( mRememberKeyfile ) {
- FileDbHelper dbHelp = App.fileDbHelper;
+ FileDbHelper dbHelp = App.Kp2a.fileDbHelper;
String keyfile = dbHelp.getFileByName(filename);
diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs
index c37e2d5d..a9b19da4 100644
--- a/src/keepass2android/QuickUnlock.cs
+++ b/src/keepass2android/QuickUnlock.cs
@@ -44,7 +44,7 @@ namespace keepass2android
base.OnCreate(bundle);
Intent i = Intent;
- mIoc = App.getDB().mIoc;
+ mIoc = App.Kp2a.GetDb().mIoc;
if (mIoc == null)
{
@@ -55,10 +55,10 @@ namespace keepass2android
SetContentView(Resource.Layout.QuickUnlock);
- if (App.getDB().pm.Name != "")
+ if (App.Kp2a.GetDb().pm.Name != "")
{
FindViewById(Resource.Id.filename_label).Visibility = ViewStates.Invisible;
- ((TextView)FindViewById(Resource.Id.qu_filename)).Text = App.getDB().pm.Name;
+ ((TextView)FindViewById(Resource.Id.qu_filename)).Text = App.Kp2a.GetDb().pm.Name;
} else
{
((TextView)FindViewById(Resource.Id.qu_filename)).Text = mIoc.Path;
@@ -68,7 +68,7 @@ namespace keepass2android
TextView txtLabel = (TextView)FindViewById(Resource.Id.QuickUnlock_label);
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
- int quickUnlockLength = App.getDB().QuickUnlockKeyLength;
+ int quickUnlockLength = App.Kp2a.GetDb().QuickUnlockKeyLength;
txtLabel.Text = GetString(Resource.String.QuickUnlock_label, new Java.Lang.Object[]{quickUnlockLength});
@@ -84,7 +84,7 @@ namespace keepass2android
Button btnUnlock = (Button)FindViewById(Resource.Id.QuickUnlock_button);
btnUnlock.Click += (object sender, EventArgs e) =>
{
- KcpPassword kcpPassword = (KcpPassword)App.getDB().pm.MasterKey.GetUserKey(typeof(KcpPassword));
+ KcpPassword kcpPassword = (KcpPassword)App.Kp2a.GetDb().pm.MasterKey.GetUserKey(typeof(KcpPassword));
String password = kcpPassword.Password.ReadString();
String expectedPasswordPart = password.Substring(Math.Max(0,password.Length-quickUnlockLength),Math.Min(password.Length, quickUnlockLength));
if (pwd.Text == expectedPasswordPart)
@@ -112,7 +112,7 @@ namespace keepass2android
{
base.OnResume();
- if ( ! App.getDB().Loaded ) {
+ if ( ! App.Kp2a.GetDb().Loaded ) {
SetResult(KeePass.EXIT_CHANGE_DB);
Finish();
return;
diff --git a/src/keepass2android/Resources/Resource.designer.cs b/src/keepass2android/Resources/Resource.designer.cs
index dc0e121d..723dd38c 100644
--- a/src/keepass2android/Resources/Resource.designer.cs
+++ b/src/keepass2android/Resources/Resource.designer.cs
@@ -1227,599 +1227,605 @@ namespace keepass2android
public partial class String
{
- // aapt resource value: 0x7f080033
- public const int AboutText = 2131230771;
+ // aapt resource value: 0x7f080035
+ public const int AboutText = 2131230773;
- // aapt resource value: 0x7f080114
- public const int AskDeletePermanentlyEntry = 2131230996;
-
- // aapt resource value: 0x7f080115
- public const int AskDeletePermanentlyGroup = 2131230997;
+ // aapt resource value: 0x7f08000a
+ public const int ApplicationName = 2131230730;
// aapt resource value: 0x7f080116
- public const int AskDeletePermanently_title = 2131230998;
-
- // aapt resource value: 0x7f080119
- public const int AskDiscardChanges = 2131231001;
-
- // aapt resource value: 0x7f08011a
- public const int AskDiscardChanges_title = 2131231002;
-
- // aapt resource value: 0x7f08010e
- public const int AskOverwriteBinary = 2131230990;
-
- // aapt resource value: 0x7f080111
- public const int AskOverwriteBinary_no = 2131230993;
-
- // aapt resource value: 0x7f08010f
- public const int AskOverwriteBinary_title = 2131230991;
-
- // aapt resource value: 0x7f080110
- public const int AskOverwriteBinary_yes = 2131230992;
-
- // aapt resource value: 0x7f080118
- public const int AskReloadFile = 2131231000;
+ public const int AskDeletePermanentlyEntry = 2131230998;
// aapt resource value: 0x7f080117
- public const int AskReloadFile_title = 2131230999;
+ public const int AskDeletePermanentlyGroup = 2131230999;
- // aapt resource value: 0x7f080112
- public const int AttachFailed = 2131230994;
+ // aapt resource value: 0x7f080118
+ public const int AskDeletePermanently_title = 2131231000;
- // aapt resource value: 0x7f080022
- public const int BinaryDirectory_default = 2131230754;
+ // aapt resource value: 0x7f08011b
+ public const int AskDiscardChanges = 2131231003;
- // aapt resource value: 0x7f080021
- public const int BinaryDirectory_key = 2131230753;
+ // aapt resource value: 0x7f08011c
+ public const int AskDiscardChanges_title = 2131231004;
- // aapt resource value: 0x7f0800f6
- public const int BinaryDirectory_summary = 2131230966;
-
- // aapt resource value: 0x7f0800f5
- public const int BinaryDirectory_title = 2131230965;
-
- // aapt resource value: 0x7f080125
- public const int ChangeLog = 2131231013;
-
- // aapt resource value: 0x7f080124
- public const int ChangeLog_0_7 = 2131231012;
-
- // aapt resource value: 0x7f080122
- public const int ChangeLog_0_8 = 2131231010;
-
- // aapt resource value: 0x7f080121
- public const int ChangeLog_0_8_1 = 2131231009;
-
- // aapt resource value: 0x7f080120
- public const int ChangeLog_0_8_2 = 2131231008;
-
- // aapt resource value: 0x7f08011f
- public const int ChangeLog_0_8_3 = 2131231007;
-
- // aapt resource value: 0x7f080123
- public const int ChangeLog_keptDonate = 2131231011;
-
- // aapt resource value: 0x7f08011e
- public const int ChangeLog_title = 2131231006;
-
- // aapt resource value: 0x7f080048
- public const int ClearClipboard = 2131230792;
-
- // aapt resource value: 0x7f08002c
- public const int CopyToClipboardNotification_key = 2131230764;
-
- // aapt resource value: 0x7f080034
- public const int CreditsText = 2131230772;
-
- // aapt resource value: 0x7f080081
- public const int FileNotFound = 2131230849;
-
- // aapt resource value: 0x7f080094
- public const int InvalidPassword = 2131230868;
-
- // aapt resource value: 0x7f080027
- public const int LastInfoVersionCode_key = 2131230759;
-
- // aapt resource value: 0x7f080029
- public const int MarketURL = 2131230761;
-
- // aapt resource value: 0x7f08009e
- public const int MaskedPassword = 2131230878;
-
- // aapt resource value: 0x7f08002e
- public const int OpenKp2aKeyboardAutomatically_key = 2131230766;
-
- // aapt resource value: 0x7f08010d
- public const int OpenKp2aKeyboardAutomatically_summary = 2131230989;
-
- // aapt resource value: 0x7f08010c
- public const int OpenKp2aKeyboardAutomatically_title = 2131230988;
-
- // aapt resource value: 0x7f080023
- public const int QuickUnlockDefaultEnabled_key = 2131230755;
-
- // aapt resource value: 0x7f0800f1
- public const int QuickUnlockDefaultEnabled_summary = 2131230961;
-
- // aapt resource value: 0x7f0800f0
- public const int QuickUnlockDefaultEnabled_title = 2131230960;
-
- // aapt resource value: 0x7f080025
- public const int QuickUnlockLength_default = 2131230757;
-
- // aapt resource value: 0x7f080024
- public const int QuickUnlockLength_key = 2131230756;
-
- // aapt resource value: 0x7f0800f3
- public const int QuickUnlockLength_summary = 2131230963;
-
- // aapt resource value: 0x7f0800f2
- public const int QuickUnlockLength_title = 2131230962;
-
- // aapt resource value: 0x7f0800ee
- public const int QuickUnlock_button = 2131230958;
-
- // aapt resource value: 0x7f0800f4
- public const int QuickUnlock_fail = 2131230964;
-
- // aapt resource value: 0x7f0800ed
- public const int QuickUnlock_label = 2131230957;
-
- // aapt resource value: 0x7f0800ef
- public const int QuickUnlock_lockButton = 2131230959;
+ // aapt resource value: 0x7f080110
+ public const int AskOverwriteBinary = 2131230992;
// aapt resource value: 0x7f080113
- public const int RecycleBin = 2131230995;
+ public const int AskOverwriteBinary_no = 2131230995;
- // aapt resource value: 0x7f0800fa
- public const int SaveAttachmentDialog_open = 2131230970;
+ // aapt resource value: 0x7f080111
+ public const int AskOverwriteBinary_title = 2131230993;
- // aapt resource value: 0x7f0800f9
- public const int SaveAttachmentDialog_save = 2131230969;
+ // aapt resource value: 0x7f080112
+ public const int AskOverwriteBinary_yes = 2131230994;
+
+ // aapt resource value: 0x7f08011a
+ public const int AskReloadFile = 2131231002;
+
+ // aapt resource value: 0x7f080119
+ public const int AskReloadFile_title = 2131231001;
+
+ // aapt resource value: 0x7f080114
+ public const int AttachFailed = 2131230996;
+
+ // aapt resource value: 0x7f080024
+ public const int BinaryDirectory_default = 2131230756;
+
+ // aapt resource value: 0x7f080023
+ public const int BinaryDirectory_key = 2131230755;
// aapt resource value: 0x7f0800f8
- public const int SaveAttachmentDialog_text = 2131230968;
+ public const int BinaryDirectory_summary = 2131230968;
// aapt resource value: 0x7f0800f7
- public const int SaveAttachmentDialog_title = 2131230967;
+ public const int BinaryDirectory_title = 2131230967;
- // aapt resource value: 0x7f0800fc
- public const int SaveAttachment_Failed = 2131230972;
+ // aapt resource value: 0x7f080127
+ public const int ChangeLog = 2131231015;
- // aapt resource value: 0x7f0800fb
- public const int SaveAttachment_doneMessage = 2131230971;
+ // aapt resource value: 0x7f080126
+ public const int ChangeLog_0_7 = 2131231014;
- // aapt resource value: 0x7f080109
- public const int ShowCopyToClipboardNotification_summary = 2131230985;
+ // aapt resource value: 0x7f080124
+ public const int ChangeLog_0_8 = 2131231012;
- // aapt resource value: 0x7f080108
- public const int ShowCopyToClipboardNotification_title = 2131230984;
+ // aapt resource value: 0x7f080123
+ public const int ChangeLog_0_8_1 = 2131231011;
- // aapt resource value: 0x7f08010b
- public const int ShowKp2aKeyboardNotification_summary = 2131230987;
+ // aapt resource value: 0x7f080122
+ public const int ChangeLog_0_8_2 = 2131231010;
- // aapt resource value: 0x7f08010a
- public const int ShowKp2aKeyboardNotification_title = 2131230986;
+ // aapt resource value: 0x7f080121
+ public const int ChangeLog_0_8_3 = 2131231009;
- // aapt resource value: 0x7f08001e
- public const int ShowUsernameInList_key = 2131230750;
+ // aapt resource value: 0x7f080125
+ public const int ChangeLog_keptDonate = 2131231013;
- // aapt resource value: 0x7f0800e1
- public const int ShowUsernameInList_summary = 2131230945;
+ // aapt resource value: 0x7f080120
+ public const int ChangeLog_title = 2131231008;
- // aapt resource value: 0x7f0800e0
- public const int ShowUsernameInList_title = 2131230944;
+ // aapt resource value: 0x7f08004a
+ public const int ClearClipboard = 2131230794;
- // aapt resource value: 0x7f08002a
- public const int SuggestionsURL = 2131230762;
-
- // aapt resource value: 0x7f08001d
- public const int TanExpiresOnUse_key = 2131230749;
-
- // aapt resource value: 0x7f0800df
- public const int TanExpiresOnUse_summary = 2131230943;
-
- // aapt resource value: 0x7f0800de
- public const int TanExpiresOnUse_title = 2131230942;
-
- // aapt resource value: 0x7f08002b
- public const int TranslationURL = 2131230763;
-
- // aapt resource value: 0x7f080026
- public const int UsageCount_key = 2131230758;
-
- // aapt resource value: 0x7f080028
- public const int UseFileTransactions_key = 2131230760;
-
- // aapt resource value: 0x7f080107
- public const int UseFileTransactions_summary = 2131230983;
-
- // aapt resource value: 0x7f080106
- public const int UseFileTransactions_title = 2131230982;
-
- // aapt resource value: 0x7f08002d
- public const int UseKp2aKeyboard_key = 2131230765;
-
- // aapt resource value: 0x7f080031
- public const int about_feedback = 2131230769;
-
- // aapt resource value: 0x7f080032
- public const int about_homepage = 2131230770;
-
- // aapt resource value: 0x7f080035
- public const int accept = 2131230773;
-
- // aapt resource value: 0x7f080102
- public const int add_binary = 2131230978;
+ // aapt resource value: 0x7f08002e
+ public const int CopyToClipboardNotification_key = 2131230766;
// aapt resource value: 0x7f080036
- public const int add_entry = 2131230774;
+ public const int CreditsText = 2131230774;
- // aapt resource value: 0x7f080103
- public const int add_extra_string = 2131230979;
+ // aapt resource value: 0x7f080083
+ public const int FileNotFound = 2131230851;
- // aapt resource value: 0x7f080038
- public const int add_group = 2131230776;
+ // aapt resource value: 0x7f080009
+ public const int Hello = 2131230729;
- // aapt resource value: 0x7f080039
- public const int add_group_title = 2131230777;
+ // aapt resource value: 0x7f080096
+ public const int InvalidPassword = 2131230870;
+
+ // aapt resource value: 0x7f080029
+ public const int LastInfoVersionCode_key = 2131230761;
+
+ // aapt resource value: 0x7f08002b
+ public const int MarketURL = 2131230763;
+
+ // aapt resource value: 0x7f0800a0
+ public const int MaskedPassword = 2131230880;
+
+ // aapt resource value: 0x7f080030
+ public const int OpenKp2aKeyboardAutomatically_key = 2131230768;
+
+ // aapt resource value: 0x7f08010f
+ public const int OpenKp2aKeyboardAutomatically_summary = 2131230991;
+
+ // aapt resource value: 0x7f08010e
+ public const int OpenKp2aKeyboardAutomatically_title = 2131230990;
+
+ // aapt resource value: 0x7f080025
+ public const int QuickUnlockDefaultEnabled_key = 2131230757;
+
+ // aapt resource value: 0x7f0800f3
+ public const int QuickUnlockDefaultEnabled_summary = 2131230963;
+
+ // aapt resource value: 0x7f0800f2
+ public const int QuickUnlockDefaultEnabled_title = 2131230962;
+
+ // aapt resource value: 0x7f080027
+ public const int QuickUnlockLength_default = 2131230759;
+
+ // aapt resource value: 0x7f080026
+ public const int QuickUnlockLength_key = 2131230758;
+
+ // aapt resource value: 0x7f0800f5
+ public const int QuickUnlockLength_summary = 2131230965;
+
+ // aapt resource value: 0x7f0800f4
+ public const int QuickUnlockLength_title = 2131230964;
+
+ // aapt resource value: 0x7f0800f0
+ public const int QuickUnlock_button = 2131230960;
+
+ // aapt resource value: 0x7f0800f6
+ public const int QuickUnlock_fail = 2131230966;
+
+ // aapt resource value: 0x7f0800ef
+ public const int QuickUnlock_label = 2131230959;
+
+ // aapt resource value: 0x7f0800f1
+ public const int QuickUnlock_lockButton = 2131230961;
+
+ // aapt resource value: 0x7f080115
+ public const int RecycleBin = 2131230997;
+
+ // aapt resource value: 0x7f0800fc
+ public const int SaveAttachmentDialog_open = 2131230972;
+
+ // aapt resource value: 0x7f0800fb
+ public const int SaveAttachmentDialog_save = 2131230971;
+
+ // aapt resource value: 0x7f0800fa
+ public const int SaveAttachmentDialog_text = 2131230970;
+
+ // aapt resource value: 0x7f0800f9
+ public const int SaveAttachmentDialog_title = 2131230969;
+
+ // aapt resource value: 0x7f0800fe
+ public const int SaveAttachment_Failed = 2131230974;
+
+ // aapt resource value: 0x7f0800fd
+ public const int SaveAttachment_doneMessage = 2131230973;
+
+ // aapt resource value: 0x7f08010b
+ public const int ShowCopyToClipboardNotification_summary = 2131230987;
+
+ // aapt resource value: 0x7f08010a
+ public const int ShowCopyToClipboardNotification_title = 2131230986;
+
+ // aapt resource value: 0x7f08010d
+ public const int ShowKp2aKeyboardNotification_summary = 2131230989;
+
+ // aapt resource value: 0x7f08010c
+ public const int ShowKp2aKeyboardNotification_title = 2131230988;
+
+ // aapt resource value: 0x7f080020
+ public const int ShowUsernameInList_key = 2131230752;
+
+ // aapt resource value: 0x7f0800e3
+ public const int ShowUsernameInList_summary = 2131230947;
+
+ // aapt resource value: 0x7f0800e2
+ public const int ShowUsernameInList_title = 2131230946;
+
+ // aapt resource value: 0x7f08002c
+ public const int SuggestionsURL = 2131230764;
+
+ // aapt resource value: 0x7f08001f
+ public const int TanExpiresOnUse_key = 2131230751;
+
+ // aapt resource value: 0x7f0800e1
+ public const int TanExpiresOnUse_summary = 2131230945;
+
+ // aapt resource value: 0x7f0800e0
+ public const int TanExpiresOnUse_title = 2131230944;
+
+ // aapt resource value: 0x7f08002d
+ public const int TranslationURL = 2131230765;
+
+ // aapt resource value: 0x7f080028
+ public const int UsageCount_key = 2131230760;
+
+ // aapt resource value: 0x7f08002a
+ public const int UseFileTransactions_key = 2131230762;
+
+ // aapt resource value: 0x7f080109
+ public const int UseFileTransactions_summary = 2131230985;
+
+ // aapt resource value: 0x7f080108
+ public const int UseFileTransactions_title = 2131230984;
+
+ // aapt resource value: 0x7f08002f
+ public const int UseKp2aKeyboard_key = 2131230767;
+
+ // aapt resource value: 0x7f080033
+ public const int about_feedback = 2131230771;
+
+ // aapt resource value: 0x7f080034
+ public const int about_homepage = 2131230772;
// aapt resource value: 0x7f080037
- public const int add_url_entry = 2131230775;
+ public const int accept = 2131230775;
+
+ // aapt resource value: 0x7f080104
+ public const int add_binary = 2131230980;
+
+ // aapt resource value: 0x7f080038
+ public const int add_entry = 2131230776;
+
+ // aapt resource value: 0x7f080105
+ public const int add_extra_string = 2131230981;
// aapt resource value: 0x7f08003a
- public const int algorithm = 2131230778;
+ public const int add_group = 2131230778;
// aapt resource value: 0x7f08003b
- public const int algorithm_colon = 2131230779;
+ public const int add_group_title = 2131230779;
- // aapt resource value: 0x7f080011
- public const int algorithm_key = 2131230737;
-
- // aapt resource value: 0x7f080012
- public const int app_key = 2131230738;
+ // aapt resource value: 0x7f080039
+ public const int add_url_entry = 2131230777;
// aapt resource value: 0x7f08003c
- public const int app_name = 2131230780;
+ public const int algorithm = 2131230780;
- // aapt resource value: 0x7f08003e
- public const int app_name_nonet = 2131230782;
-
- // aapt resource value: 0x7f080040
- public const int app_timeout = 2131230784;
+ // aapt resource value: 0x7f08003d
+ public const int algorithm_colon = 2131230781;
// aapt resource value: 0x7f080013
- public const int app_timeout_key = 2131230739;
+ public const int algorithm_key = 2131230739;
- // aapt resource value: 0x7f080041
- public const int app_timeout_summary = 2131230785;
+ // aapt resource value: 0x7f080014
+ public const int app_key = 2131230740;
+
+ // aapt resource value: 0x7f08003e
+ public const int app_name = 2131230782;
+
+ // aapt resource value: 0x7f080040
+ public const int app_name_nonet = 2131230784;
// aapt resource value: 0x7f080042
- public const int application = 2131230786;
+ public const int app_timeout = 2131230786;
+
+ // aapt resource value: 0x7f080015
+ public const int app_timeout_key = 2131230741;
// aapt resource value: 0x7f080043
- public const int application_settings = 2131230787;
-
- // aapt resource value: 0x7f08004d
- public const int available_through_keyboard = 2131230797;
+ public const int app_timeout_summary = 2131230787;
// aapt resource value: 0x7f080044
- public const int brackets = 2131230788;
+ public const int application = 2131230788;
// aapt resource value: 0x7f080045
- public const int browser_intall_text = 2131230789;
+ public const int application_settings = 2131230789;
+
+ // aapt resource value: 0x7f08004f
+ public const int available_through_keyboard = 2131230799;
// aapt resource value: 0x7f080046
- public const int building_search_idx = 2131230790;
+ public const int brackets = 2131230790;
// aapt resource value: 0x7f080047
- public const int cancel = 2131230791;
+ public const int browser_intall_text = 2131230791;
- // aapt resource value: 0x7f0800e5
- public const int caseSensitive = 2131230949;
+ // aapt resource value: 0x7f080048
+ public const int building_search_idx = 2131230792;
+
+ // aapt resource value: 0x7f080049
+ public const int cancel = 2131230793;
+
+ // aapt resource value: 0x7f0800e7
+ public const int caseSensitive = 2131230951;
// aapt resource value: 0x7f080002
public const int change_entry = 2131230722;
- // aapt resource value: 0x7f080049
- public const int clipboard_timeout = 2131230793;
+ // aapt resource value: 0x7f08004b
+ public const int clipboard_timeout = 2131230795;
- // aapt resource value: 0x7f08002f
- public const int clipboard_timeout_default = 2131230767;
+ // aapt resource value: 0x7f080031
+ public const int clipboard_timeout_default = 2131230769;
- // aapt resource value: 0x7f080014
- public const int clipboard_timeout_key = 2131230740;
-
- // aapt resource value: 0x7f08004a
- public const int clipboard_timeout_summary = 2131230794;
+ // aapt resource value: 0x7f080016
+ public const int clipboard_timeout_key = 2131230742;
// aapt resource value: 0x7f08004c
- public const int copy_password = 2131230796;
+ public const int clipboard_timeout_summary = 2131230796;
- // aapt resource value: 0x7f08004b
- public const int copy_username = 2131230795;
+ // aapt resource value: 0x7f08004e
+ public const int copy_password = 2131230798;
- // aapt resource value: 0x7f080050
- public const int creating_db_key = 2131230800;
-
- // aapt resource value: 0x7f080105
- public const int credentials_dialog_title = 2131230981;
-
- // aapt resource value: 0x7f080051
- public const int current_group = 2131230801;
+ // aapt resource value: 0x7f08004d
+ public const int copy_username = 2131230797;
// aapt resource value: 0x7f080052
- public const int current_group_root = 2131230802;
+ public const int creating_db_key = 2131230802;
+
+ // aapt resource value: 0x7f080107
+ public const int credentials_dialog_title = 2131230983;
// aapt resource value: 0x7f080053
- public const int database = 2131230803;
-
- // aapt resource value: 0x7f080104
- public const int database_loaded_quickunlock_enabled = 2131230980;
-
- // aapt resource value: 0x7f0800c8
- public const int database_name = 2131230920;
-
- // aapt resource value: 0x7f080020
- public const int database_name_key = 2131230752;
-
- // aapt resource value: 0x7f080015
- public const int db_key = 2131230741;
+ public const int current_group = 2131230803;
// aapt resource value: 0x7f080054
- public const int decrypting_db = 2131230804;
+ public const int current_group_root = 2131230804;
// aapt resource value: 0x7f080055
- public const int decrypting_entry = 2131230805;
+ public const int database = 2131230805;
+
+ // aapt resource value: 0x7f080106
+ public const int database_loaded_quickunlock_enabled = 2131230982;
+
+ // aapt resource value: 0x7f0800ca
+ public const int database_name = 2131230922;
+
+ // aapt resource value: 0x7f080022
+ public const int database_name_key = 2131230754;
+
+ // aapt resource value: 0x7f080017
+ public const int db_key = 2131230743;
// aapt resource value: 0x7f080056
- public const int default_checkbox = 2131230806;
-
- // aapt resource value: 0x7f08000a
- public const int default_file_path = 2131230730;
-
- // aapt resource value: 0x7f0800c9
- public const int default_username = 2131230921;
-
- // aapt resource value: 0x7f08001f
- public const int default_username_key = 2131230751;
+ public const int decrypting_db = 2131230806;
// aapt resource value: 0x7f080057
- public const int digits = 2131230807;
+ public const int decrypting_entry = 2131230807;
// aapt resource value: 0x7f080058
- public const int disclaimer_formal = 2131230808;
-
- // aapt resource value: 0x7f08000b
- public const int donate_url = 2131230731;
-
- // aapt resource value: 0x7f080059
- public const int ellipsis = 2131230809;
-
- // aapt resource value: 0x7f0800ec
- public const int enable_quickunlock = 2131230956;
-
- // aapt resource value: 0x7f08005a
- public const int enter_filename = 2131230810;
-
- // aapt resource value: 0x7f0800eb
- public const int enter_filename_details_create_import = 2131230955;
-
- // aapt resource value: 0x7f0800ea
- public const int enter_filename_details_url = 2131230954;
-
- // aapt resource value: 0x7f08005b
- public const int entry_accessed = 2131230811;
-
- // aapt resource value: 0x7f08005c
- public const int entry_and_or = 2131230812;
-
- // aapt resource value: 0x7f08006c
- public const int entry_binaries = 2131230828;
-
- // aapt resource value: 0x7f08005d
- public const int entry_cancel = 2131230813;
-
- // aapt resource value: 0x7f08005e
- public const int entry_comment = 2131230814;
-
- // aapt resource value: 0x7f080061
- public const int entry_confpassword = 2131230817;
-
- // aapt resource value: 0x7f080062
- public const int entry_created = 2131230818;
-
- // aapt resource value: 0x7f080063
- public const int entry_expires = 2131230819;
-
- // aapt resource value: 0x7f08006b
- public const int entry_extra_strings = 2131230827;
-
- // aapt resource value: 0x7f080064
- public const int entry_keyfile = 2131230820;
-
- // aapt resource value: 0x7f080065
- public const int entry_modified = 2131230821;
-
- // aapt resource value: 0x7f080060
- public const int entry_override_url = 2131230816;
-
- // aapt resource value: 0x7f080066
- public const int entry_password = 2131230822;
-
- // aapt resource value: 0x7f080067
- public const int entry_save = 2131230823;
-
- // aapt resource value: 0x7f08005f
- public const int entry_tags = 2131230815;
-
- // aapt resource value: 0x7f080068
- public const int entry_title = 2131230824;
-
- // aapt resource value: 0x7f080069
- public const int entry_url = 2131230825;
-
- // aapt resource value: 0x7f08006a
- public const int entry_user_name = 2131230826;
-
- // aapt resource value: 0x7f08006d
- public const int error_arc4 = 2131230829;
-
- // aapt resource value: 0x7f08006e
- public const int error_can_not_handle_uri = 2131230830;
-
- // aapt resource value: 0x7f08006f
- public const int error_could_not_create_group = 2131230831;
-
- // aapt resource value: 0x7f080070
- public const int error_could_not_create_parent = 2131230832;
-
- // aapt resource value: 0x7f080071
- public const int error_database_exists = 2131230833;
-
- // aapt resource value: 0x7f080072
- public const int error_database_settings = 2131230834;
-
- // aapt resource value: 0x7f080073
- public const int error_failed_to_launch_link = 2131230835;
-
- // aapt resource value: 0x7f080075
- public const int error_file_not_create = 2131230837;
-
- // aapt resource value: 0x7f080074
- public const int error_filename_required = 2131230836;
-
- // aapt resource value: 0x7f080076
- public const int error_invalid_db = 2131230838;
-
- // aapt resource value: 0x7f0800fd
- public const int error_invalid_expiry_date = 2131230973;
-
- // aapt resource value: 0x7f080077
- public const int error_invalid_path = 2131230839;
-
- // aapt resource value: 0x7f080078
- public const int error_no_name = 2131230840;
-
- // aapt resource value: 0x7f080079
- public const int error_nopass = 2131230841;
-
- // aapt resource value: 0x7f08007a
- public const int error_out_of_memory = 2131230842;
-
- // aapt resource value: 0x7f08007b
- public const int error_pass_gen_type = 2131230843;
-
- // aapt resource value: 0x7f08007c
- public const int error_pass_match = 2131230844;
-
- // aapt resource value: 0x7f08007d
- public const int error_rounds_not_number = 2131230845;
-
- // aapt resource value: 0x7f08007e
- public const int error_rounds_too_large = 2131230846;
-
- // aapt resource value: 0x7f0800fe
- public const int error_string_key = 2131230974;
-
- // aapt resource value: 0x7f08007f
- public const int error_title_required = 2131230847;
-
- // aapt resource value: 0x7f080080
- public const int error_wrong_length = 2131230848;
-
- // aapt resource value: 0x7f0800e3
- public const int excludeExpiredEntries = 2131230947;
-
- // aapt resource value: 0x7f0800ff
- public const int field_name = 2131230975;
-
- // aapt resource value: 0x7f080100
- public const int field_value = 2131230976;
-
- // aapt resource value: 0x7f080082
- public const int file_browser = 2131230850;
-
- // aapt resource value: 0x7f080083
- public const int generate_password = 2131230851;
-
- // aapt resource value: 0x7f080084
- public const int group = 2131230852;
-
- // aapt resource value: 0x7f080085
- public const int hint_comment = 2131230853;
-
- // aapt resource value: 0x7f080086
- public const int hint_conf_pass = 2131230854;
-
- // aapt resource value: 0x7f080087
- public const int hint_generated_password = 2131230855;
-
- // aapt resource value: 0x7f080088
- public const int hint_group_name = 2131230856;
-
- // aapt resource value: 0x7f080089
- public const int hint_keyfile = 2131230857;
-
- // aapt resource value: 0x7f08008a
- public const int hint_length = 2131230858;
-
- // aapt resource value: 0x7f08008c
- public const int hint_login_pass = 2131230860;
-
- // aapt resource value: 0x7f08008f
- public const int hint_override_url = 2131230863;
-
- // aapt resource value: 0x7f08008b
- public const int hint_pass = 2131230859;
-
- // aapt resource value: 0x7f080090
- public const int hint_tags = 2131230864;
-
- // aapt resource value: 0x7f08008d
- public const int hint_title = 2131230861;
-
- // aapt resource value: 0x7f08008e
- public const int hint_url = 2131230862;
-
- // aapt resource value: 0x7f080091
- public const int hint_username = 2131230865;
+ public const int default_checkbox = 2131230808;
// aapt resource value: 0x7f08000c
- public const int homepage = 2131230732;
+ public const int default_file_path = 2131230732;
+
+ // aapt resource value: 0x7f0800cb
+ public const int default_username = 2131230923;
+
+ // aapt resource value: 0x7f080021
+ public const int default_username_key = 2131230753;
+
+ // aapt resource value: 0x7f080059
+ public const int digits = 2131230809;
+
+ // aapt resource value: 0x7f08005a
+ public const int disclaimer_formal = 2131230810;
// aapt resource value: 0x7f08000d
- public const int homepage_short = 2131230733;
+ public const int donate_url = 2131230733;
+
+ // aapt resource value: 0x7f08005b
+ public const int ellipsis = 2131230811;
+
+ // aapt resource value: 0x7f0800ee
+ public const int enable_quickunlock = 2131230958;
+
+ // aapt resource value: 0x7f08005c
+ public const int enter_filename = 2131230812;
+
+ // aapt resource value: 0x7f0800ed
+ public const int enter_filename_details_create_import = 2131230957;
+
+ // aapt resource value: 0x7f0800ec
+ public const int enter_filename_details_url = 2131230956;
+
+ // aapt resource value: 0x7f08005d
+ public const int entry_accessed = 2131230813;
+
+ // aapt resource value: 0x7f08005e
+ public const int entry_and_or = 2131230814;
+
+ // aapt resource value: 0x7f08006e
+ public const int entry_binaries = 2131230830;
+
+ // aapt resource value: 0x7f08005f
+ public const int entry_cancel = 2131230815;
+
+ // aapt resource value: 0x7f080060
+ public const int entry_comment = 2131230816;
+
+ // aapt resource value: 0x7f080063
+ public const int entry_confpassword = 2131230819;
+
+ // aapt resource value: 0x7f080064
+ public const int entry_created = 2131230820;
+
+ // aapt resource value: 0x7f080065
+ public const int entry_expires = 2131230821;
+
+ // aapt resource value: 0x7f08006d
+ public const int entry_extra_strings = 2131230829;
+
+ // aapt resource value: 0x7f080066
+ public const int entry_keyfile = 2131230822;
+
+ // aapt resource value: 0x7f080067
+ public const int entry_modified = 2131230823;
+
+ // aapt resource value: 0x7f080062
+ public const int entry_override_url = 2131230818;
+
+ // aapt resource value: 0x7f080068
+ public const int entry_password = 2131230824;
+
+ // aapt resource value: 0x7f080069
+ public const int entry_save = 2131230825;
+
+ // aapt resource value: 0x7f080061
+ public const int entry_tags = 2131230817;
+
+ // aapt resource value: 0x7f08006a
+ public const int entry_title = 2131230826;
+
+ // aapt resource value: 0x7f08006b
+ public const int entry_url = 2131230827;
+
+ // aapt resource value: 0x7f08006c
+ public const int entry_user_name = 2131230828;
+
+ // aapt resource value: 0x7f08006f
+ public const int error_arc4 = 2131230831;
+
+ // aapt resource value: 0x7f080070
+ public const int error_can_not_handle_uri = 2131230832;
+
+ // aapt resource value: 0x7f080071
+ public const int error_could_not_create_group = 2131230833;
+
+ // aapt resource value: 0x7f080072
+ public const int error_could_not_create_parent = 2131230834;
+
+ // aapt resource value: 0x7f080073
+ public const int error_database_exists = 2131230835;
+
+ // aapt resource value: 0x7f080074
+ public const int error_database_settings = 2131230836;
+
+ // aapt resource value: 0x7f080075
+ public const int error_failed_to_launch_link = 2131230837;
+
+ // aapt resource value: 0x7f080077
+ public const int error_file_not_create = 2131230839;
+
+ // aapt resource value: 0x7f080076
+ public const int error_filename_required = 2131230838;
+
+ // aapt resource value: 0x7f080078
+ public const int error_invalid_db = 2131230840;
+
+ // aapt resource value: 0x7f0800ff
+ public const int error_invalid_expiry_date = 2131230975;
+
+ // aapt resource value: 0x7f080079
+ public const int error_invalid_path = 2131230841;
+
+ // aapt resource value: 0x7f08007a
+ public const int error_no_name = 2131230842;
+
+ // aapt resource value: 0x7f08007b
+ public const int error_nopass = 2131230843;
+
+ // aapt resource value: 0x7f08007c
+ public const int error_out_of_memory = 2131230844;
+
+ // aapt resource value: 0x7f08007d
+ public const int error_pass_gen_type = 2131230845;
+
+ // aapt resource value: 0x7f08007e
+ public const int error_pass_match = 2131230846;
+
+ // aapt resource value: 0x7f08007f
+ public const int error_rounds_not_number = 2131230847;
+
+ // aapt resource value: 0x7f080080
+ public const int error_rounds_too_large = 2131230848;
+
+ // aapt resource value: 0x7f080100
+ public const int error_string_key = 2131230976;
+
+ // aapt resource value: 0x7f080081
+ public const int error_title_required = 2131230849;
+
+ // aapt resource value: 0x7f080082
+ public const int error_wrong_length = 2131230850;
+
+ // aapt resource value: 0x7f0800e5
+ public const int excludeExpiredEntries = 2131230949;
+
+ // aapt resource value: 0x7f080101
+ public const int field_name = 2131230977;
+
+ // aapt resource value: 0x7f080102
+ public const int field_value = 2131230978;
+
+ // aapt resource value: 0x7f080084
+ public const int file_browser = 2131230852;
+
+ // aapt resource value: 0x7f080085
+ public const int generate_password = 2131230853;
+
+ // aapt resource value: 0x7f080086
+ public const int group = 2131230854;
+
+ // aapt resource value: 0x7f080087
+ public const int hint_comment = 2131230855;
+
+ // aapt resource value: 0x7f080088
+ public const int hint_conf_pass = 2131230856;
+
+ // aapt resource value: 0x7f080089
+ public const int hint_generated_password = 2131230857;
+
+ // aapt resource value: 0x7f08008a
+ public const int hint_group_name = 2131230858;
+
+ // aapt resource value: 0x7f08008b
+ public const int hint_keyfile = 2131230859;
+
+ // aapt resource value: 0x7f08008c
+ public const int hint_length = 2131230860;
+
+ // aapt resource value: 0x7f08008e
+ public const int hint_login_pass = 2131230862;
+
+ // aapt resource value: 0x7f080091
+ public const int hint_override_url = 2131230865;
+
+ // aapt resource value: 0x7f08008d
+ public const int hint_pass = 2131230861;
+
+ // aapt resource value: 0x7f080092
+ public const int hint_tags = 2131230866;
+
+ // aapt resource value: 0x7f08008f
+ public const int hint_title = 2131230863;
+
+ // aapt resource value: 0x7f080090
+ public const int hint_url = 2131230864;
+
+ // aapt resource value: 0x7f080093
+ public const int hint_username = 2131230867;
+
+ // aapt resource value: 0x7f08000e
+ public const int homepage = 2131230734;
+
+ // aapt resource value: 0x7f08000f
+ public const int homepage_short = 2131230735;
// aapt resource value: 0x7f080000
public const int ime_name = 2131230720;
- // aapt resource value: 0x7f080092
- public const int install_from_market = 2131230866;
-
- // aapt resource value: 0x7f080093
- public const int install_from_website = 2131230867;
+ // aapt resource value: 0x7f080094
+ public const int install_from_market = 2131230868;
// aapt resource value: 0x7f080095
- public const int invalid_algorithm = 2131230869;
-
- // aapt resource value: 0x7f080096
- public const int invalid_db_sig = 2131230870;
-
- // aapt resource value: 0x7f08000e
- public const int issues = 2131230734;
+ public const int install_from_website = 2131230869;
// aapt resource value: 0x7f080097
- public const int keyfile_does_not_exist = 2131230871;
+ public const int invalid_algorithm = 2131230871;
// aapt resource value: 0x7f080098
- public const int keyfile_is_empty = 2131230872;
+ public const int invalid_db_sig = 2131230872;
- // aapt resource value: 0x7f080017
- public const int keyfile_key = 2131230743;
+ // aapt resource value: 0x7f080010
+ public const int issues = 2131230736;
- // aapt resource value: 0x7f0800e2
- public const int kp2a_findUrl = 2131230946;
+ // aapt resource value: 0x7f080099
+ public const int keyfile_does_not_exist = 2131230873;
+
+ // aapt resource value: 0x7f08009a
+ public const int keyfile_is_empty = 2131230874;
+
+ // aapt resource value: 0x7f080019
+ public const int keyfile_key = 2131230745;
+
+ // aapt resource value: 0x7f0800e4
+ public const int kp2a_findUrl = 2131230948;
// aapt resource value: 0x7f080005
public const int label_go_key = 2131230725;
@@ -1833,125 +1839,125 @@ namespace keepass2android
// aapt resource value: 0x7f080008
public const int label_subtype_generic = 2131230728;
- // aapt resource value: 0x7f080099
- public const int length = 2131230873;
-
- // aapt resource value: 0x7f080009
- public const int library_name = 2131230729;
-
- // aapt resource value: 0x7f080030
- public const int list_size_default = 2131230768;
-
- // aapt resource value: 0x7f08001a
- public const int list_size_key = 2131230746;
-
// aapt resource value: 0x7f08009b
- public const int list_size_summary = 2131230875;
+ public const int length = 2131230875;
- // aapt resource value: 0x7f08009a
- public const int list_size_title = 2131230874;
+ // aapt resource value: 0x7f08000b
+ public const int library_name = 2131230731;
- // aapt resource value: 0x7f08009c
- public const int loading_database = 2131230876;
+ // aapt resource value: 0x7f080032
+ public const int list_size_default = 2131230770;
+
+ // aapt resource value: 0x7f08001c
+ public const int list_size_key = 2131230748;
// aapt resource value: 0x7f08009d
- public const int lowercase = 2131230877;
+ public const int list_size_summary = 2131230877;
- // aapt resource value: 0x7f080018
- public const int maskpass_key = 2131230744;
+ // aapt resource value: 0x7f08009c
+ public const int list_size_title = 2131230876;
- // aapt resource value: 0x7f0800a0
- public const int maskpass_summary = 2131230880;
+ // aapt resource value: 0x7f08009e
+ public const int loading_database = 2131230878;
// aapt resource value: 0x7f08009f
- public const int maskpass_title = 2131230879;
+ public const int lowercase = 2131230879;
- // aapt resource value: 0x7f0800a1
- public const int menu_about = 2131230881;
-
- // aapt resource value: 0x7f0800a6
- public const int menu_app_settings = 2131230886;
+ // aapt resource value: 0x7f08001a
+ public const int maskpass_key = 2131230746;
// aapt resource value: 0x7f0800a2
- public const int menu_change_key = 2131230882;
+ public const int maskpass_summary = 2131230882;
+
+ // aapt resource value: 0x7f0800a1
+ public const int maskpass_title = 2131230881;
// aapt resource value: 0x7f0800a3
- public const int menu_copy_pass = 2131230883;
-
- // aapt resource value: 0x7f0800a4
- public const int menu_copy_user = 2131230884;
-
- // aapt resource value: 0x7f0800a5
- public const int menu_create = 2131230885;
-
- // aapt resource value: 0x7f0800a7
- public const int menu_db_settings = 2131230887;
+ public const int menu_about = 2131230883;
// aapt resource value: 0x7f0800a8
- public const int menu_delete = 2131230888;
+ public const int menu_app_settings = 2131230888;
+
+ // aapt resource value: 0x7f0800a4
+ public const int menu_change_key = 2131230884;
+
+ // aapt resource value: 0x7f0800a5
+ public const int menu_copy_pass = 2131230885;
+
+ // aapt resource value: 0x7f0800a6
+ public const int menu_copy_user = 2131230886;
+
+ // aapt resource value: 0x7f0800a7
+ public const int menu_create = 2131230887;
// aapt resource value: 0x7f0800a9
- public const int menu_donate = 2131230889;
+ public const int menu_db_settings = 2131230889;
// aapt resource value: 0x7f0800aa
- public const int menu_edit = 2131230890;
+ public const int menu_delete = 2131230890;
// aapt resource value: 0x7f0800ab
- public const int menu_hide_password = 2131230891;
+ public const int menu_donate = 2131230891;
// aapt resource value: 0x7f0800ac
- public const int menu_homepage = 2131230892;
+ public const int menu_edit = 2131230892;
// aapt resource value: 0x7f0800ad
- public const int menu_lock = 2131230893;
+ public const int menu_hide_password = 2131230893;
// aapt resource value: 0x7f0800ae
- public const int menu_open = 2131230894;
+ public const int menu_homepage = 2131230894;
// aapt resource value: 0x7f0800af
- public const int menu_rename = 2131230895;
+ public const int menu_lock = 2131230895;
// aapt resource value: 0x7f0800b0
- public const int menu_search = 2131230896;
+ public const int menu_open = 2131230896;
// aapt resource value: 0x7f0800b1
- public const int menu_url = 2131230897;
+ public const int menu_rename = 2131230897;
// aapt resource value: 0x7f0800b2
- public const int minus = 2131230898;
+ public const int menu_search = 2131230898;
// aapt resource value: 0x7f0800b3
- public const int never = 2131230899;
+ public const int menu_url = 2131230899;
+
+ // aapt resource value: 0x7f0800b4
+ public const int minus = 2131230900;
// aapt resource value: 0x7f0800b5
- public const int no = 2131230901;
-
- // aapt resource value: 0x7f0800b6
- public const int no_keys = 2131230902;
+ public const int never = 2131230901;
// aapt resource value: 0x7f0800b7
- public const int no_results = 2131230903;
+ public const int no = 2131230903;
// aapt resource value: 0x7f0800b8
- public const int no_url_handler = 2131230904;
+ public const int no_keys = 2131230904;
- // aapt resource value: 0x7f08004e
- public const int not_possible_im_picker = 2131230798;
-
- // aapt resource value: 0x7f08000f
- public const int oi_filemanager_market = 2131230735;
-
- // aapt resource value: 0x7f080010
- public const int oi_filemanager_web = 2131230736;
-
- // aapt resource value: 0x7f080019
- public const int omitbackup_key = 2131230745;
-
- // aapt resource value: 0x7f0800bb
- public const int omitbackup_summary = 2131230907;
+ // aapt resource value: 0x7f0800b9
+ public const int no_results = 2131230905;
// aapt resource value: 0x7f0800ba
- public const int omitbackup_title = 2131230906;
+ public const int no_url_handler = 2131230906;
+
+ // aapt resource value: 0x7f080050
+ public const int not_possible_im_picker = 2131230800;
+
+ // aapt resource value: 0x7f080011
+ public const int oi_filemanager_market = 2131230737;
+
+ // aapt resource value: 0x7f080012
+ public const int oi_filemanager_web = 2131230738;
+
+ // aapt resource value: 0x7f08001b
+ public const int omitbackup_key = 2131230747;
+
+ // aapt resource value: 0x7f0800bd
+ public const int omitbackup_summary = 2131230909;
+
+ // aapt resource value: 0x7f0800bc
+ public const int omitbackup_title = 2131230908;
// aapt resource value: 0x7f080003
public const int open_entry = 2131230723;
@@ -1959,155 +1965,155 @@ namespace keepass2android
// aapt resource value: 0x7f080004
public const int open_entry_for_app = 2131230724;
- // aapt resource value: 0x7f0800b9
- public const int open_recent = 2131230905;
-
- // aapt resource value: 0x7f0800bc
- public const int pass_filename = 2131230908;
-
- // aapt resource value: 0x7f0800bd
- public const int password_title = 2131230909;
-
- // aapt resource value: 0x7f08004f
- public const int please_activate_keyboard = 2131230799;
+ // aapt resource value: 0x7f0800bb
+ public const int open_recent = 2131230907;
// aapt resource value: 0x7f0800be
- public const int progress_create = 2131230910;
+ public const int pass_filename = 2131230910;
// aapt resource value: 0x7f0800bf
- public const int progress_title = 2131230911;
+ public const int password_title = 2131230911;
- // aapt resource value: 0x7f080101
- public const int protection = 2131230977;
-
- // aapt resource value: 0x7f08011c
- public const int rate_app = 2131231004;
-
- // aapt resource value: 0x7f0800dd
- public const int regular_expression = 2131230941;
+ // aapt resource value: 0x7f080051
+ public const int please_activate_keyboard = 2131230801;
// aapt resource value: 0x7f0800c0
- public const int remember_keyfile_summary = 2131230912;
+ public const int progress_create = 2131230912;
// aapt resource value: 0x7f0800c1
- public const int remember_keyfile_title = 2131230913;
+ public const int progress_title = 2131230913;
+
+ // aapt resource value: 0x7f080103
+ public const int protection = 2131230979;
+
+ // aapt resource value: 0x7f08011e
+ public const int rate_app = 2131231006;
+
+ // aapt resource value: 0x7f0800df
+ public const int regular_expression = 2131230943;
// aapt resource value: 0x7f0800c2
- public const int remove_from_filelist = 2131230914;
+ public const int remember_keyfile_summary = 2131230914;
// aapt resource value: 0x7f0800c3
- public const int rijndael = 2131230915;
+ public const int remember_keyfile_title = 2131230915;
// aapt resource value: 0x7f0800c4
- public const int root = 2131230916;
+ public const int remove_from_filelist = 2131230916;
// aapt resource value: 0x7f0800c5
- public const int rounds = 2131230917;
+ public const int rijndael = 2131230917;
// aapt resource value: 0x7f0800c6
- public const int rounds_explaination = 2131230918;
+ public const int root = 2131230918;
// aapt resource value: 0x7f0800c7
- public const int rounds_hint = 2131230919;
+ public const int rounds = 2131230919;
- // aapt resource value: 0x7f080016
- public const int rounds_key = 2131230742;
+ // aapt resource value: 0x7f0800c8
+ public const int rounds_explaination = 2131230920;
- // aapt resource value: 0x7f0800ca
- public const int saving_database = 2131230922;
+ // aapt resource value: 0x7f0800c9
+ public const int rounds_hint = 2131230921;
- // aapt resource value: 0x7f0800d1
- public const int search_hint = 2131230929;
-
- // aapt resource value: 0x7f0800d3
- public const int search_in = 2131230931;
+ // aapt resource value: 0x7f080018
+ public const int rounds_key = 2131230744;
// aapt resource value: 0x7f0800cc
- public const int search_label = 2131230924;
+ public const int saving_database = 2131230924;
- // aapt resource value: 0x7f0800e4
- public const int search_options = 2131230948;
-
- // aapt resource value: 0x7f0800d2
- public const int search_results = 2131230930;
+ // aapt resource value: 0x7f0800d3
+ public const int search_hint = 2131230931;
// aapt resource value: 0x7f0800d5
- public const int select_group_then_add = 2131230933;
-
- // aapt resource value: 0x7f0800d4
- public const int select_other_entry = 2131230932;
-
- // aapt resource value: 0x7f08003d
- public const int short_app_name = 2131230781;
-
- // aapt resource value: 0x7f08003f
- public const int short_app_name_nonet = 2131230783;
-
- // aapt resource value: 0x7f0800cd
- public const int show_password = 2131230925;
-
- // aapt resource value: 0x7f0800cf
- public const int sort_db = 2131230927;
-
- // aapt resource value: 0x7f08001b
- public const int sort_key = 2131230747;
+ public const int search_in = 2131230933;
// aapt resource value: 0x7f0800ce
- public const int sort_name = 2131230926;
-
- // aapt resource value: 0x7f0800cb
- public const int space = 2131230923;
-
- // aapt resource value: 0x7f0800d0
- public const int special = 2131230928;
-
- // aapt resource value: 0x7f0800e7
- public const int start_create = 2131230951;
-
- // aapt resource value: 0x7f0800e9
- public const int start_create_import = 2131230953;
+ public const int search_label = 2131230926;
// aapt resource value: 0x7f0800e6
- public const int start_open_file = 2131230950;
+ public const int search_options = 2131230950;
- // aapt resource value: 0x7f0800e8
- public const int start_open_url = 2131230952;
-
- // aapt resource value: 0x7f08011b
- public const int suggest_improvements = 2131231003;
-
- // aapt resource value: 0x7f08001c
- public const int timeout_key = 2131230748;
-
- // aapt resource value: 0x7f08011d
- public const int translate_app = 2131231005;
-
- // aapt resource value: 0x7f0800d6
- public const int twofish = 2131230934;
+ // aapt resource value: 0x7f0800d4
+ public const int search_results = 2131230932;
// aapt resource value: 0x7f0800d7
- public const int underline = 2131230935;
+ public const int select_group_then_add = 2131230935;
+
+ // aapt resource value: 0x7f0800d6
+ public const int select_other_entry = 2131230934;
+
+ // aapt resource value: 0x7f08003f
+ public const int short_app_name = 2131230783;
+
+ // aapt resource value: 0x7f080041
+ public const int short_app_name_nonet = 2131230785;
+
+ // aapt resource value: 0x7f0800cf
+ public const int show_password = 2131230927;
+
+ // aapt resource value: 0x7f0800d1
+ public const int sort_db = 2131230929;
+
+ // aapt resource value: 0x7f08001d
+ public const int sort_key = 2131230749;
+
+ // aapt resource value: 0x7f0800d0
+ public const int sort_name = 2131230928;
+
+ // aapt resource value: 0x7f0800cd
+ public const int space = 2131230925;
+
+ // aapt resource value: 0x7f0800d2
+ public const int special = 2131230930;
+
+ // aapt resource value: 0x7f0800e9
+ public const int start_create = 2131230953;
+
+ // aapt resource value: 0x7f0800eb
+ public const int start_create_import = 2131230955;
+
+ // aapt resource value: 0x7f0800e8
+ public const int start_open_file = 2131230952;
+
+ // aapt resource value: 0x7f0800ea
+ public const int start_open_url = 2131230954;
+
+ // aapt resource value: 0x7f08011d
+ public const int suggest_improvements = 2131231005;
+
+ // aapt resource value: 0x7f08001e
+ public const int timeout_key = 2131230750;
+
+ // aapt resource value: 0x7f08011f
+ public const int translate_app = 2131231007;
// aapt resource value: 0x7f0800d8
- public const int unsupported_db_version = 2131230936;
+ public const int twofish = 2131230936;
// aapt resource value: 0x7f0800d9
- public const int uppercase = 2131230937;
-
- // aapt resource value: 0x7f0800dc
- public const int version_label = 2131230940;
+ public const int underline = 2131230937;
// aapt resource value: 0x7f0800da
- public const int warning_read_only = 2131230938;
+ public const int unsupported_db_version = 2131230938;
// aapt resource value: 0x7f0800db
- public const int warning_unmounted = 2131230939;
+ public const int uppercase = 2131230939;
+
+ // aapt resource value: 0x7f0800de
+ public const int version_label = 2131230942;
+
+ // aapt resource value: 0x7f0800dc
+ public const int warning_read_only = 2131230940;
+
+ // aapt resource value: 0x7f0800dd
+ public const int warning_unmounted = 2131230941;
// aapt resource value: 0x7f080001
public const int word_separators = 2131230721;
- // aapt resource value: 0x7f0800b4
- public const int yes = 2131230900;
+ // aapt resource value: 0x7f0800b6
+ public const int yes = 2131230902;
static String()
{
diff --git a/src/keepass2android/SetPasswordDialog.cs b/src/keepass2android/SetPasswordDialog.cs
index a696d042..52356346 100644
--- a/src/keepass2android/SetPasswordDialog.cs
+++ b/src/keepass2android/SetPasswordDialog.cs
@@ -82,8 +82,8 @@ namespace keepass2android
}
- SetPassword sp = new SetPassword(Context, App.getDB(), pass, keyfile, new AfterSave(this, mFinish, new Handler()));
- ProgressTask pt = new ProgressTask(Context, sp, Resource.String.saving_database);
+ SetPassword sp = new SetPassword(Context, App.Kp2a.GetDb(), pass, keyfile, new AfterSave(this, mFinish, new Handler()));
+ ProgressTask pt = new ProgressTask(App.Kp2a, Context, sp, UiStringKey.saving_database);
pt.run();
};
diff --git a/src/keepass2android/ShareUrlResults.cs b/src/keepass2android/ShareUrlResults.cs
index 9d830c15..c6ceccde 100644
--- a/src/keepass2android/ShareUrlResults.cs
+++ b/src/keepass2android/ShareUrlResults.cs
@@ -63,7 +63,7 @@ namespace keepass2android
SetResult(KeePass.EXIT_CLOSE_AFTER_TASK_COMPLETE);
- mDb = App.getDB();
+ mDb = App.Kp2a.GetDb();
String searchUrl = ((SearchUrlTask)mAppTask).UrlToSearchFor;
diff --git a/src/keepass2android/Utils/Spr/SprEngine.cs b/src/keepass2android/Utils/Spr/SprEngine.cs
index 975f8855..f8e6b426 100644
--- a/src/keepass2android/Utils/Spr/SprEngine.cs
+++ b/src/keepass2android/Utils/Spr/SprEngine.cs
@@ -597,7 +597,7 @@ namespace KeePass.Util.Spr
if(!MightDeref(str)) return str;
SprContext ctx = new SprContext(pe,
- App.getDB().pm,
+ App.Kp2a.GetDb().pm,
SprCompileFlags.Deref);
// ctx.ForcePlainTextPasswords = false;
diff --git a/src/keepass2android/app/App.cs b/src/keepass2android/app/App.cs
index 472f7788..508957c3 100644
--- a/src/keepass2android/app/App.cs
+++ b/src/keepass2android/app/App.cs
@@ -26,6 +26,8 @@ using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
+using KeePassLib.Serialization;
+using Android.Preferences;
namespace keepass2android
{
@@ -47,15 +49,181 @@ namespace keepass2android
}
#endif
- ///Application class for Keepass2Android: Contains static Database variable to be used by all components.
+ public class Kp2aApp: IKp2aApp
+ {
+ public bool isShutdown()
+ {
+ return shutdown;
+ }
+
+ public void SetShutdown()
+ {
+ shutdown = true;
+ }
+
+ public void clearShutdown()
+ {
+ shutdown = false;
+ }
+
+ private Database db;
+ private bool shutdown = false;
+
+ ///
+ /// See comments to EntryEditActivityState.
+ ///
+ internal EntryEditActivityState entryEditActivityState = null;
+
+ public FileDbHelper fileDbHelper;
+
+ public Database GetDb()
+ {
+ if (db == null)
+ {
+ db = CreateNewDatabase();
+ }
+
+ return db;
+ }
+
+
+
+ public bool GetBooleanPreference(PreferenceKey key)
+ {
+ Context ctx = Application.Context;
+ ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(ctx);
+ switch (key)
+ {
+ case PreferenceKey.remember_keyfile:
+ return prefs.GetBoolean(ctx.Resources.GetString(Resource.String.keyfile_key), ctx.Resources.GetBoolean(Resource.Boolean.keyfile_default));
+ case PreferenceKey.UseFileTransactions:
+ return prefs.GetBoolean(ctx.Resources.GetString(Resource.String.UseFileTransactions_key), true);
+ default:
+ throw new Exception("unexpected key!");
+ }
+
+ }
+
+
+ public void CheckForOpenFileChanged(Activity activity)
+ {
+ if (db.DidOpenFileChange())
+ {
+ if (db.ReloadRequested)
+ {
+ activity.SetResult(KeePass.EXIT_RELOAD_DB);
+ activity.Finish();
+ }
+ AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ builder.SetTitle(activity.GetString(Resource.String.AskReloadFile_title));
+
+ builder.SetMessage(activity.GetString(Resource.String.AskReloadFile));
+
+ builder.SetPositiveButton(activity.GetString(Android.Resource.String.Yes), new EventHandler((dlgSender, dlgEvt) =>
+ {
+ db.ReloadRequested = true;
+ activity.SetResult(KeePass.EXIT_RELOAD_DB);
+ activity.Finish();
+
+ }));
+
+ builder.SetNegativeButton(activity.GetString(Android.Resource.String.No), new EventHandler((dlgSender, dlgEvt) =>
+ {
+
+ }));
+
+
+ Dialog dialog = builder.Create();
+ dialog.Show();
+ }
+ }
+
+ public void StoreOpenedFileAsRecent(IOConnectionInfo ioc, string keyfile)
+ {
+ fileDbHelper.createFile(ioc, keyfile);
+ }
+
+ public string GetResourceString(UiStringKey key)
+ {
+ var field = typeof (Resource.String).GetField(key.ToString());
+ if (field == null)
+ throw new Exception("Invalid key " + key);
+ return App.Context.GetString((int)field.GetValue(null));
+ }
+
+ public void AskYesNoCancel(UiStringKey titleKey, UiStringKey messageKey,
+ EventHandler yesHandler,
+ EventHandler noHandler,
+ EventHandler cancelHandler,
+ Context ctx)
+ {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
+ builder.SetTitle(GetResourceString(titleKey));
+
+ builder.SetMessage(GetResourceString(messageKey));
+
+ builder.SetPositiveButton(Resource.String.yes, yesHandler);
+
+ builder.SetNegativeButton(Resource.String.no, noHandler);
+
+ builder.SetNeutralButton(ctx.GetString(Android.Resource.String.Cancel),
+ cancelHandler);
+
+ Dialog dialog = builder.Create();
+ dialog.Show();
+
+ }
+
+
+
+ internal void OnTerminate()
+ {
+ if (db != null)
+ {
+ db.Clear();
+ }
+
+ if (fileDbHelper != null && fileDbHelper.isOpen())
+ {
+ fileDbHelper.close();
+ }
+ }
+
+ internal void OnCreate(Application app)
+ {
+ fileDbHelper = new FileDbHelper(app);
+ fileDbHelper.open();
+
+#if DEBUG
+ foreach (UiStringKey key in Enum.GetValues(typeof(UiStringKey)))
+ {
+ GetResourceString(key);
+ }
+
+#else
+ this should case a compiler error when switching to release (and thus ensure DEBUG is defined in DEBUG)
+#endif
+ }
+
+
+ public Database CreateNewDatabase()
+ {
+ db = new Database(new DrawableFactory(), this);
+ return db;
+ }
+ }
+
+
+ ///Application class for Keepass2Android: Contains static Database variable to be used by all components.
#if NoNet
[Application(Debuggable=false, Label=AppNames.AppName)]
#else
- #if RELEASE
+#if RELEASE
[Application(Debuggable=false, Label=AppNames.AppName)]
- #else
- [Application(Debuggable=true, Label=AppNames.AppName)]
- #endif
+#else
+ [Application(Debuggable = true, Label = AppNames.AppName)]
+#endif
#endif
public class App : Application {
@@ -64,63 +232,42 @@ namespace keepass2android
{
}
- private static Database db;
- private static bool shutdown = false;
+ private static readonly Kp2aApp instance = new Kp2aApp();
- ///
- /// See comments to EntryEditActivityState.
- ///
- internal static EntryEditActivityState entryEditActivityState = null;
-
- public static FileDbHelper fileDbHelper;
-
- public static Database getDB() {
- if ( db == null ) {
- db = new Database();
- }
-
- return db;
- }
-
- public static void setDB(Database d) {
- db = d;
- }
-
- public static bool isShutdown() {
- return shutdown;
- }
-
- public static void setShutdown() {
- shutdown = true;
- }
-
- public static void clearShutdown() {
- shutdown = false;
- }
+ // Explicit static constructor to tell C# compiler
+ // not to mark type as beforefieldinit
+ static App()
+ {
+ }
+
+ private App()
+ {
+ }
+
+ public static Kp2aApp Kp2a
+ {
+ get
+ {
+ return instance;
+ }
+ }
public override void OnCreate() {
base.OnCreate();
Android.Util.Log.Debug("DEBUG","Creating application");
- fileDbHelper = new FileDbHelper(this);
- fileDbHelper.open();
+ instance.OnCreate(this);
}
public override void OnTerminate() {
base.OnTerminate();
Android.Util.Log.Debug("DEBUG","Terminating application");
- if ( db != null ) {
- db.Clear();
- }
-
- if ( fileDbHelper != null && fileDbHelper.isOpen() ) {
- fileDbHelper.close();
- }
+ instance.OnTerminate();
}
-
- }
+
+ }
}
diff --git a/src/keepass2android/fileselect/FileSelectActivity.cs b/src/keepass2android/fileselect/FileSelectActivity.cs
index c72099e3..526e479b 100644
--- a/src/keepass2android/fileselect/FileSelectActivity.cs
+++ b/src/keepass2android/fileselect/FileSelectActivity.cs
@@ -171,10 +171,11 @@ namespace keepass2android
new LaunchGroupActivity(IOConnectionInfo.FromPath(filename), this), this);
// Create the new database
- CreateDB create = new CreateDB(this, IOConnectionInfo.FromPath(filename), password, true);
+ CreateDB create = new CreateDB(App.Kp2a, this, IOConnectionInfo.FromPath(filename), password, true);
ProgressTask createTask = new ProgressTask(
+ App.Kp2a,
this, create,
- Resource.String.progress_create);
+ UiStringKey.progress_create);
createTask.run();
@@ -216,7 +217,7 @@ namespace keepass2android
}
- mDbHelper = App.fileDbHelper;
+ mDbHelper = App.Kp2a.fileDbHelper;
if (mDbHelper.hasRecentFiles())
{
recentMode = true;
@@ -317,7 +318,7 @@ namespace keepass2android
public override void run() {
if (mSuccess) {
// Add to recent files
- FileDbHelper dbHelper = App.fileDbHelper;
+ FileDbHelper dbHelper = App.Kp2a.fileDbHelper;
//TODO: getFilename always returns "" -> bug?
dbHelper.createFile(mIoc, getFilename());
@@ -484,9 +485,9 @@ namespace keepass2android
if (!createdWithActivityResult)
{
- if ((Intent.Action == Intent.ActionSend) && (App.getDB().Loaded))
+ if ((Intent.Action == Intent.ActionSend) && (App.Kp2a.GetDb().Loaded))
{
- PasswordActivity.Launch(this, App.getDB().mIoc , mAppTask);
+ PasswordActivity.Launch(this, App.Kp2a.GetDb().mIoc , mAppTask);
} else
{
diff --git a/src/keepass2android/icons/DrawableFactory.cs b/src/keepass2android/icons/DrawableFactory.cs
index 0f7d3fe9..c67e69b9 100644
--- a/src/keepass2android/icons/DrawableFactory.cs
+++ b/src/keepass2android/icons/DrawableFactory.cs
@@ -33,7 +33,7 @@ using Android.Graphics;
namespace keepass2android
{
- public class DrawableFactory
+ public class DrawableFactory: IDrawableFactory
{
private static Drawable blank = null;
private static int blankWidth = -1;
diff --git a/src/keepass2android/keepass2android.csproj b/src/keepass2android/keepass2android.csproj
index ace5b061..c480935f 100644
--- a/src/keepass2android/keepass2android.csproj
+++ b/src/keepass2android/keepass2android.csproj
@@ -1,4 +1,4 @@
-
+
Debug
@@ -77,13 +77,12 @@
+
+
-
-
-
@@ -92,12 +91,6 @@
-
-
-
-
-
-
@@ -111,16 +104,10 @@
-
-
-
-
-
-
@@ -134,20 +121,13 @@
-
-
-
-
-
-
-
@@ -157,7 +137,6 @@
-
@@ -657,62 +636,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}
KeePassLib2Android
+
+ {53a9cb7f-6553-4bc0-b56b-9410bb2e59aa}
+ Kp2aBusinessLogic
+
{A57B3ACE-5634-469A-88C4-858BB409F356}
kp2akeytransform
diff --git a/src/keepass2android/search/SearchResults.cs b/src/keepass2android/search/SearchResults.cs
index deef04df..92041559 100644
--- a/src/keepass2android/search/SearchResults.cs
+++ b/src/keepass2android/search/SearchResults.cs
@@ -47,7 +47,7 @@ namespace keepass2android.search
SetResult(KeePass.EXIT_NORMAL);
- mDb = App.getDB();
+ mDb = App.Kp2a.GetDb();
// Likely the app has been killed exit the activity
if ( ! mDb.Open ) {
diff --git a/src/keepass2android/services/CopyToClipboardService.cs b/src/keepass2android/services/CopyToClipboardService.cs
index c89583fa..937f8bfc 100644
--- a/src/keepass2android/services/CopyToClipboardService.cs
+++ b/src/keepass2android/services/CopyToClipboardService.cs
@@ -84,7 +84,7 @@ namespace keepass2android
PwEntry entry;
try
{
- entry = App.getDB().entries[entryId];
+ entry = App.Kp2a.GetDb().entries[entryId];
}
catch(Exception)
{
@@ -271,7 +271,7 @@ namespace keepass2android
static string GetStringAndReplacePlaceholders(PwEntry entry, string key)
{
String value = entry.Strings.ReadSafe(key);
- value = SprEngine.Compile(value, new SprContext(entry, App.getDB().pm, SprCompileFlags.All));
+ value = SprEngine.Compile(value, new SprContext(entry, App.Kp2a.GetDb().pm, SprCompileFlags.All));
return value;
}
diff --git a/src/keepass2android/services/TimeoutService.cs b/src/keepass2android/services/TimeoutService.cs
index f7c46a08..854e7ffa 100644
--- a/src/keepass2android/services/TimeoutService.cs
+++ b/src/keepass2android/services/TimeoutService.cs
@@ -66,7 +66,7 @@ namespace keepass2android
private void timeout(Context context) {
Log.Debug(TAG, "Timeout");
- App.setShutdown();
+ App.Kp2a.SetShutdown();
NotificationManager nm = (NotificationManager) GetSystemService(NotificationService);
nm.CancelAll();
diff --git a/src/keepass2android/settings/AppSettingsActivity.cs b/src/keepass2android/settings/AppSettingsActivity.cs
index a6b5c1dc..a3de024a 100644
--- a/src/keepass2android/settings/AppSettingsActivity.cs
+++ b/src/keepass2android/settings/AppSettingsActivity.cs
@@ -52,7 +52,7 @@ namespace keepass2android
bool value = (bool) e.NewValue;
if ( ! value ) {
- FileDbHelper helper = App.fileDbHelper;
+ FileDbHelper helper = App.Kp2a.fileDbHelper;
helper.deleteAllKeys();
}
@@ -60,12 +60,12 @@ namespace keepass2android
return;
};
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
if ( db.Open ) {
Preference rounds = FindPreference(GetString(Resource.String.rounds_key));
rounds.PreferenceChange += (object sender, Preference.PreferenceChangeEventArgs e) =>
{
- setRounds(App.getDB(), e.Preference);
+ setRounds(App.Kp2a.GetDb(), e.Preference);
return;
};
@@ -80,7 +80,7 @@ namespace keepass2android
Handler handler = new Handler();
- SaveDB save = new SaveDB(this, App.getDB(), new ActionOnFinish( (success, message) =>
+ SaveDB save = new SaveDB(this, App.Kp2a.GetDb(), new ActionOnFinish( (success, message) =>
{
if (!success)
{
@@ -89,7 +89,7 @@ namespace keepass2android
Toast.MakeText(this, message, ToastLength.Long).Show();
}
}));
- ProgressTask pt = new ProgressTask(this, save, Resource.String.saving_database);
+ ProgressTask pt = new ProgressTask(App.Kp2a, this, save, UiStringKey.saving_database);
pt.run();
};
@@ -104,7 +104,7 @@ namespace keepass2android
Handler handler = new Handler();
- SaveDB save = new SaveDB(this, App.getDB(), new ActionOnFinish( (success, message) =>
+ SaveDB save = new SaveDB(this, App.Kp2a.GetDb(), new ActionOnFinish( (success, message) =>
{
if (!success)
{
@@ -113,7 +113,7 @@ namespace keepass2android
Toast.MakeText(this, message, ToastLength.Long).Show();
}
}));
- ProgressTask pt = new ProgressTask(this, save, Resource.String.saving_database);
+ ProgressTask pt = new ProgressTask(App.Kp2a, this, save, UiStringKey.saving_database);
pt.run();
};
diff --git a/src/keepass2android/settings/RoundsPreference.cs b/src/keepass2android/settings/RoundsPreference.cs
index c474913b..def6bd4f 100644
--- a/src/keepass2android/settings/RoundsPreference.cs
+++ b/src/keepass2android/settings/RoundsPreference.cs
@@ -43,7 +43,7 @@ namespace keepass2android.settings
mRoundsView = (TextView) view.FindViewById(Resource.Id.rounds);
- Database db = App.getDB();
+ Database db = App.Kp2a.GetDb();
mPM = db.pm;
ulong numRounds = mPM.KeyEncryptionRounds;
mRoundsView.Text = numRounds.ToString();
@@ -84,8 +84,8 @@ namespace keepass2android.settings
mPM.KeyEncryptionRounds = rounds;
Handler handler = new Handler();
- SaveDB save = new SaveDB(Context, App.getDB(), new AfterSave(Context, handler, oldRounds, this));
- ProgressTask pt = new ProgressTask(Context, save, Resource.String.saving_database);
+ SaveDB save = new SaveDB(Context, App.Kp2a.GetDb(), new AfterSave(Context, handler, oldRounds, this));
+ ProgressTask pt = new ProgressTask(App.Kp2a, Context, save, UiStringKey.saving_database);
pt.run();
}
diff --git a/src/keepass2android/timeout/TimeoutHelper.cs b/src/keepass2android/timeout/TimeoutHelper.cs
index 4994bf00..fdb69ca4 100644
--- a/src/keepass2android/timeout/TimeoutHelper.cs
+++ b/src/keepass2android/timeout/TimeoutHelper.cs
@@ -46,14 +46,14 @@ namespace keepass2android
EditorCompat.apply(edit);
- if ( App.getDB().Open ) {
+ if ( App.Kp2a.GetDb().Open ) {
Timeout.start(act);
}
}
public static void resume(Activity act) {
- if ( App.getDB().Loaded ) {
+ if ( App.Kp2a.GetDb().Loaded ) {
Timeout.cancel(act);
}
@@ -81,7 +81,7 @@ namespace keepass2android
long diff = cur_time - timeout_start;
if (diff >= timeout) {
// We have timed out
- App.setShutdown();
+ App.Kp2a.SetShutdown();
}
}
@@ -92,8 +92,8 @@ namespace keepass2android
}
public static bool checkShutdown(Activity act, IOConnectionInfo ioc) {
- if (( App.getDB().Loaded && (App.isShutdown() || App.getDB().Locked) )
- || (iocChanged(ioc, App.getDB().mIoc))) //file was changed from ActionSend-Intent
+ if (( App.Kp2a.GetDb().Loaded && (App.Kp2a.isShutdown() || App.Kp2a.GetDb().Locked) )
+ || (iocChanged(ioc, App.Kp2a.GetDb().mIoc))) //file was changed from ActionSend-Intent
{
act.SetResult(KeePass.EXIT_LOCK);
act.Finish();
diff --git a/src/keepass2android/views/PwEntryView.cs b/src/keepass2android/views/PwEntryView.cs
index bfb5d00f..e2fe6095 100644
--- a/src/keepass2android/views/PwEntryView.cs
+++ b/src/keepass2android/views/PwEntryView.cs
@@ -88,10 +88,10 @@ namespace keepass2android.view
bool isExpired = pw.Expires && pw.ExpiryTime < DateTime.Now;
if (isExpired)
{
- App.getDB().drawFactory.assignDrawableTo(iv, Resources, App.getDB().pm, PwIcon.Expired, PwUuid.Zero);
+ App.Kp2a.GetDb().drawableFactory.assignDrawableTo(iv, Resources, App.Kp2a.GetDb().pm, PwIcon.Expired, PwUuid.Zero);
} else
{
- App.getDB().drawFactory.assignDrawableTo(iv, Resources, App.getDB().pm, pw.IconId, pw.CustomIconUuid);
+ App.Kp2a.GetDb().drawableFactory.assignDrawableTo(iv, Resources, App.Kp2a.GetDb().pm, pw.IconId, pw.CustomIconUuid);
}
String title = pw.Strings.ReadSafe(PwDefs.TitleField);
@@ -156,7 +156,7 @@ namespace keepass2android.view
return true;
case MENU_DELETE:
Handler handler = new Handler();
- DeleteEntry task = new DeleteEntry(Context, App.getDB(), mPw, new GroupBaseActivity.RefreshTask(handler, mAct));
+ DeleteEntry task = new DeleteEntry(Context, App.Kp2a, mPw, new GroupBaseActivity.RefreshTask(handler, mAct));
task.start();
return true;
diff --git a/src/keepass2android/views/PwGroupView.cs b/src/keepass2android/views/PwGroupView.cs
index 8d49d1b4..4ad1bfd2 100644
--- a/src/keepass2android/views/PwGroupView.cs
+++ b/src/keepass2android/views/PwGroupView.cs
@@ -75,7 +75,7 @@ namespace keepass2android.view
mPw = pw;
ImageView iv = (ImageView) gv.FindViewById(Resource.Id.group_icon);
- App.getDB().drawFactory.assignDrawableTo(iv, Resources, App.getDB().pm, pw.IconId, pw.CustomIconUuid);
+ App.Kp2a.GetDb().drawableFactory.assignDrawableTo(iv, Resources, App.Kp2a.GetDb().pm, pw.IconId, pw.CustomIconUuid);
mTv.Text = pw.Name;
}
@@ -109,7 +109,7 @@ namespace keepass2android.view
case MENU_DELETE:
Handler handler = new Handler();
- DeleteGroup task = new DeleteGroup(Context, App.getDB(), mPw, mAct, new GroupBaseActivity.AfterDeleteGroup(handler, mAct));
+ DeleteGroup task = new DeleteGroup(Context, App.Kp2a, mPw, mAct, new GroupBaseActivity.AfterDeleteGroup(handler, mAct));
task.start();
return true;
default:
diff --git a/src/monodroid-unittesting/.hg_archival.txt b/src/monodroid-unittesting/.hg_archival.txt
new file mode 100644
index 00000000..65697383
--- /dev/null
+++ b/src/monodroid-unittesting/.hg_archival.txt
@@ -0,0 +1,5 @@
+repo: 565cf64def9d1f2d13a7d87ecfe2ff4cb2d1065d
+node: 5c51c8609ec16c51d6e6607173a28bba73b0bc9a
+branch: default
+latesttag: 1.2
+latesttagdistance: 1
diff --git a/src/monodroid-unittesting/.hgignore b/src/monodroid-unittesting/.hgignore
new file mode 100644
index 00000000..74d3fdad
--- /dev/null
+++ b/src/monodroid-unittesting/.hgignore
@@ -0,0 +1,7 @@
+syntax: glob
+*.suo
+*/bin/
+*/obj/
+TestResults/
+*.user
+_ReSharper.*/
diff --git a/src/monodroid-unittesting/.hgtags b/src/monodroid-unittesting/.hgtags
new file mode 100644
index 00000000..1beb0f1a
--- /dev/null
+++ b/src/monodroid-unittesting/.hgtags
@@ -0,0 +1,3 @@
+9d5c11392ed4ab5213a8e81249fcd602f5e003fc 1.0rc1
+d1e7ac53602cfcb61a2b90e864546fa33f205e11 1.1
+35717f159371e3f8cf433c1427413364100e6361 1.2
diff --git a/src/monodroid-unittesting/Local.testsettings b/src/monodroid-unittesting/Local.testsettings
new file mode 100644
index 00000000..e1a363a1
--- /dev/null
+++ b/src/monodroid-unittesting/Local.testsettings
@@ -0,0 +1,10 @@
+
+
+ These are default test settings for a local test run.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/monodroid-unittesting/MonoDroidUnitTesting.sln b/src/monodroid-unittesting/MonoDroidUnitTesting.sln
new file mode 100644
index 00000000..bd3afd7e
--- /dev/null
+++ b/src/monodroid-unittesting/MonoDroidUnitTesting.sln
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDroidUnitTestingExample", "MonoDroidUnitTestingExample\MonoDroidUnitTestingExample.csproj", "{18E159D7-9F30-436C-9AF4-590866AA9AA3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestTests", "TestTests\TestTests.csproj", "{2E8723FA-E025-4278-A9B4-E7BA476C79BC}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A839A224-BDF6-4196-9784-24D2FF5D3DB1}"
+ ProjectSection(SolutionItems) = preProject
+ Local.testsettings = Local.testsettings
+ MonoDroidUnit.vsmdi = MonoDroidUnit.vsmdi
+ TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDroidUnitTesting", "MonoDroidUnitTesting\MonoDroidUnitTesting.csproj", "{A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}"
+EndProject
+Global
+ GlobalSection(TestCaseManagementSettings) = postSolution
+ CategoryFile = MonoDroidUnit.vsmdi
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {18E159D7-9F30-436C-9AF4-590866AA9AA3}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {2E8723FA-E025-4278-A9B4-E7BA476C79BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2E8723FA-E025-4278-A9B4-E7BA476C79BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2E8723FA-E025-4278-A9B4-E7BA476C79BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2E8723FA-E025-4278-A9B4-E7BA476C79BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A5F8FB02-00E0-4335-91EF-AEAA2C2F3C48}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/monodroid-unittesting/MonoDroidUnitTesting/API/Assert.cs b/src/monodroid-unittesting/MonoDroidUnitTesting/API/Assert.cs
new file mode 100644
index 00000000..37286913
--- /dev/null
+++ b/src/monodroid-unittesting/MonoDroidUnitTesting/API/Assert.cs
@@ -0,0 +1,216 @@
+//
+// Copyright (C) 2012 Maya Studios (http://mayastudios.com)
+//
+// This file is part of MonoDroidUnitTesting.
+//
+// MonoDroidUnitTesting is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// MonoDroidUnitTesting is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with MonoDroidUnitTesting. If not, see .
+//
+using System;
+using System.Collections.Generic;
+
+using System.Globalization;
+
+
+namespace Microsoft.VisualStudio.TestTools.UnitTesting {
+
+ // For Object.Equals(Object, Object) see:
+ // http://stackoverflow.com/a/1451459/614177
+
+ public static class Assert {
+
+ [Obsolete("Don't use 'Assert.Equals()'. Use 'Assert.AreEqual()' instead.")]
+ public static new bool Equals(object objA, object objB) {
+ throw new NotSupportedException("Don't use 'Assert.Equals()'. Use 'Assert.AreEqual()' instead.");
+ }
+
+ public static void AreEqual(T expected, T actual, string message = null, params object[] parameters) {
+ if (!EqualityComparer.Default.Equals(expected, actual)) {
+ throw new NotEqualException(expected, actual, message, parameters);
+ }
+ }
+
+ public static void AreNotEqual(T notExpected, T actual, string message = null, params object[] parameters) {
+ if (EqualityComparer.Default.Equals(notExpected, actual)) {
+ throw new EqualsException(notExpected, message, parameters);
+ }
+ }
+
+ public static void AreEqual(double expected, double actual, double delta,
+ string message = null, params object[] parameters) {
+ if (Math.Abs(expected - actual) > delta) {
+ throw new NotEqualException(expected, actual, message, parameters);
+ }
+ }
+
+ public static void AreNotEqual(double notExpected, double actual, double delta,
+ string message = null, params object[] parameters) {
+ if (Math.Abs(notExpected - actual) <= delta) {
+ throw new EqualsException(notExpected, message, parameters);
+ }
+ }
+
+
+ public static void AreEqual(float expected, float actual, float delta,
+ string message = null, params object[] parameters) {
+ if (Math.Abs(expected - actual) > delta) {
+ throw new NotEqualException(expected, actual, message, parameters);
+ }
+ }
+
+ public static void AreNotEqual(float notExpected, float actual, float delta,
+ string message = null, params object[] parameters) {
+ if (Math.Abs(notExpected - actual) <= delta) {
+ throw new EqualsException(notExpected, message, parameters);
+ }
+ }
+
+
+ public static void AreEqual(string expected, string actual,
+ string message = null, params object[] parameters) {
+ AreEqual(expected, actual, false, message, parameters);
+ }
+
+ public static void AreNotEqual(string notExpected, string actual,
+ string message = null, params object[] parameters) {
+ AreNotEqual(notExpected, actual, false, message, parameters);
+ }
+
+ public static void AreEqual(string expected, string actual, bool ignoreCase,
+ string message = null, params object[] parameters) {
+ AreEqual(expected, actual, ignoreCase, CultureInfo.InvariantCulture, message, parameters);
+ }
+
+ public static void AreNotEqual(string notExpected, string actual, bool ignoreCase,
+ string message = null, params object[] parameters) {
+ AreNotEqual(notExpected, actual, ignoreCase, CultureInfo.InvariantCulture, message, parameters);
+ }
+
+ public static void AreEqual(string expected, string actual, bool ignoreCase, CultureInfo culture,
+ string message = null, params object[] parameters) {
+ if (string.Compare(expected, actual, ignoreCase, culture) != 0) {
+ throw new NotEqualException(expected, actual, message, parameters);
+ }
+ }
+
+ public static void AreNotEqual(string notExpected, string actual, bool ignoreCase, CultureInfo culture,
+ string message = null, params object[] parameters) {
+ if (string.Compare(notExpected, actual, ignoreCase, culture) == 0) {
+ throw new EqualsException(notExpected, message, parameters);
+ }
+ }
+
+ public static void AreSame(object expected, object actual,
+ string message = null, params object[] parameters) {
+ if (!object.ReferenceEquals(expected, actual)) {
+ throw new AssertFailedException("'" + expected + "' and '" + actual + "' are not reference equal", message, parameters);
+ }
+ }
+
+ public static void AreNotSame(object notExpected, object actual,
+ string message = null, params object[] parameters) {
+ if (object.ReferenceEquals(notExpected, actual)) {
+ throw new AssertFailedException("'" + notExpected + "' and '" + actual + "' are reference equal", message, parameters);
+ }
+ }
+
+ public static void IsTrue(bool condition,
+ string message = null, params object[] parameters) {
+ if (!condition) {
+ throw new NotEqualException(true, condition, message, parameters);
+ }
+ }
+
+ public static void IsFalse(bool condition,
+ string message = null, params object[] parameters) {
+ if (condition) {
+ throw new NotEqualException(false, condition, message, parameters);
+ }
+ }
+
+ public static void IsNull(object value,
+ string message = null, params object[] parameters) {
+ if (value != null) {
+ throw new NotEqualException(null, value, message, parameters);
+ }
+ }
+
+ public static void IsNotNull(object value,
+ string message = null, params object[] parameters) {
+ if (value == null) {
+ throw new EqualsException(null, message, parameters);
+ }
+ }
+
+ internal static bool CheckIsInstanceOfType(object value, Type expectedType) {
+ return expectedType.IsAssignableFrom(value.GetType());
+ }
+
+ public static void IsInstanceOfType(object value, Type expectedType,
+ string message = null, params object[] parameters) {
+ if (expectedType == null) {
+ throw new NullTestArgumentException("expectedType");
+ }
+ if (value == null) {
+ throw new AssertFailedException("'null' is no instance of " + expectedType, message, parameters);
+ }
+
+ if (!CheckIsInstanceOfType(value, expectedType)) {
+ throw new AssertFailedException("'" + value + "' (Type: " + value.GetType() + ") is no instance of " + expectedType, message, parameters);
+ }
+ }
+
+ public static void IsNotInstanceOfType(object value, Type wrongType,
+ string message = null, params object[] parameters) {
+ if (value == null) {
+ // "null" has no type and therefore is not an instance of "wrongType".
+ return;
+ }
+
+ if (wrongType == null) {
+ throw new NullTestArgumentException("wrongType");
+ }
+
+ if (wrongType.IsAssignableFrom(value.GetType())) {
+ throw new AssertFailedException("'" + value + "' (Type: " + value.GetType() + ") is an instance of " + wrongType, message, parameters);
+ }
+ }
+
+ public static void Fail(string message = null, params object[] parameters) {
+ throw new AssertFailedException(message, parameters);
+ }
+
+ public static void Inconclusive(string message = null, params object[] parameters) {
+ // Basically the same as "Fail". Used in auto generated (template) code.
+ throw new AssertInconclusiveException(message, parameters);
+ }
+
+ //
+ // Summary:
+ // In a string, replaces null characters ('\0') with "\\0".
+ //
+ // Parameters:
+ // input:
+ // The string in which to search for and replace null characters.
+ //
+ // Returns:
+ // The converted string with null characters replaced by "\\0".
+ public static string ReplaceNullChars(string input) {
+ if (input == null) {
+ return null;
+ }
+
+ return input.Replace("\0", "\\0");
+ }
+ }
+}
diff --git a/src/monodroid-unittesting/MonoDroidUnitTesting/API/AssertFailedException.cs b/src/monodroid-unittesting/MonoDroidUnitTesting/API/AssertFailedException.cs
new file mode 100644
index 00000000..70b065cb
--- /dev/null
+++ b/src/monodroid-unittesting/MonoDroidUnitTesting/API/AssertFailedException.cs
@@ -0,0 +1,89 @@
+//
+// Copyright (C) 2012 Maya Studios (http://mayastudios.com)
+//
+// This file is part of MonoDroidUnitTesting.
+//
+// MonoDroidUnitTesting is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// MonoDroidUnitTesting is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with MonoDroidUnitTesting. If not, see .
+//
+using System;
+
+
+namespace Microsoft.VisualStudio.TestTools.UnitTesting {
+ public class UnitTestAssertException : Exception {
+ public UnitTestAssertException() : base() { }
+
+ public UnitTestAssertException(string message) : base(message) { }
+
+ public UnitTestAssertException(string message, Exception innerException) : base(message, innerException) { }
+
+ public UnitTestAssertException(string msg, object[] parameters)
+ : base(ConstructMessage(msg, parameters)) { }
+
+ public UnitTestAssertException(string explanation, string msg, object[] parameters)
+ : base(ConstructMessage(explanation, msg, parameters)) { }
+
+ private static string ConstructMessage(string message, object[] parameters) {
+ if (message == null || message == "") {
+ return "";
+ }
+
+ if (parameters != null && parameters.Length != 0) {
+ message = String.Format(message, parameters);
+ }
+ return message;
+ }
+
+ private static string ConstructMessage(string explanation, string message, object[] parameters) {
+ message = ConstructMessage(message, parameters);
+ if (message != "") {
+ message += " ";
+ }
+
+ return message + explanation;
+ }
+ }
+
+ public class AssertInconclusiveException : UnitTestAssertException {
+ public AssertInconclusiveException(string msg, object[] parameters)
+ : base(msg, parameters) { }
+ }
+
+ public class AssertFailedException : UnitTestAssertException {
+ public AssertFailedException(string msg, params object[] parameters)
+ : base(msg, parameters) { }
+
+ public AssertFailedException(string explanation, string msg, object[] parameters)
+ : base(explanation, msg, parameters) { }
+ }
+
+ public class NotEqualException : AssertFailedException {
+ public NotEqualException(object expected, object actual, string message, object[] parameters)
+ : base("Expected '" + expected + "' but got '" + actual + "'", message, parameters) { }
+ }
+
+ public class EqualsException : AssertFailedException {
+ public EqualsException(object notExpected, string message, object[] parameters)
+ : base("Got unexpected '" + notExpected + "'", message, parameters) { }
+ }
+
+ public class InvalidTestArgumentException : AssertFailedException {
+ public InvalidTestArgumentException(string paramName, string reason)
+ : base("The parameter '{0}' is invalid. {1}", paramName, reason) { }
+ }
+
+ public class NullTestArgumentException : InvalidTestArgumentException {
+ public NullTestArgumentException(string paramName)
+ : base("The parameter '{0}' is invalid. The value cannot be null.", paramName) { }
+ }
+}
\ No newline at end of file
diff --git a/src/monodroid-unittesting/MonoDroidUnitTesting/API/CollectionAssert.cs b/src/monodroid-unittesting/MonoDroidUnitTesting/API/CollectionAssert.cs
new file mode 100644
index 00000000..6710a1c2
--- /dev/null
+++ b/src/monodroid-unittesting/MonoDroidUnitTesting/API/CollectionAssert.cs
@@ -0,0 +1,369 @@
+//
+// Copyright (C) 2012 Maya Studios (http://mayastudios.com)
+//
+// This file is part of MonoDroidUnitTesting.
+//
+// MonoDroidUnitTesting is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// MonoDroidUnitTesting is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with MonoDroidUnitTesting. If not, see .
+//
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+
+namespace Microsoft.VisualStudio.TestTools.UnitTesting {
+ // Summary:
+ // Verifies true/false propositions associated with collections in unit tests.
+ public static class CollectionAssert {
+ ///
+ /// Verifies that all elements in the specified collection are instances of the specified type. The assertion
+ /// fails if there exists one element in the collection for which the specified type is not found in its
+ /// inheritance hierarchy.
+ ///
+ public static void AllItemsAreInstancesOfType(ICollection collection, Type expectedType,
+ string message = null, params object[] parameters) {
+ if (collection == null) {
+ throw new NullTestArgumentException("collection");
+ }
+ if (expectedType == null) {
+ throw new NullTestArgumentException("expectedType");
+ }
+
+ int index = 0;
+ foreach (object item in collection) {
+ if (item == null) {
+ throw new AssertFailedException("Element at index {0} is (null). Expected type: <{1}>.".Format(index, expectedType.FullName), message, parameters);
+ }
+
+ if (!Assert.CheckIsInstanceOfType(item, expectedType)) {
+ throw new AssertFailedException(
+ "Element at index {0} is not of expecteds type. Expected type: {1}. Actual type: {2}.".FormatValues(index, expectedType.FullName, item.GetType().FullName),
+ message, parameters);
+ }
+ index++;
+ }
+ }
+
+ ///
+ /// Verifies that all items in the specified collection are not null. The assertion fails if any element is null.
+ ///
+ public static void AllItemsAreNotNull(ICollection collection, string message = null, params object[] parameters) {
+ if (collection == null) {
+ throw new NullTestArgumentException("collection");
+ }
+
+ int index = 0;
+ foreach (object item in collection) {
+ if (item == null) {
+ throw new AssertFailedException("Element at index {0} is (null).".Format(index), message, parameters);
+ }
+ index++;
+ }
+ }
+
+ ///
+ /// Verifies that all items in the specified collection are unique. The assertion fails if any two elements in the
+ /// collection are equal.
+ ///
+ public static void AllItemsAreUnique(ICollection collection, string message = null, params object[] parameters) {
+ if (collection == null) {
+ throw new NullTestArgumentException("collection");
+ }
+
+ HashSet