diff --git a/src/Kp2aBusinessLogic/SearchDbHelper.cs b/src/Kp2aBusinessLogic/SearchDbHelper.cs
index 3706a450..f26f76d6 100644
--- a/src/Kp2aBusinessLogic/SearchDbHelper.cs
+++ b/src/Kp2aBusinessLogic/SearchDbHelper.cs
@@ -15,8 +15,9 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
along with Keepass2Android. If not, see .
*/
using System;
-using KeePassLib;
+using System.Collections.Generic;
using System.Text.RegularExpressions;
+using KeePassLib;
using KeePassLib.Collections;
using KeePassLib.Interfaces;
using KeePassLib.Utility;
diff --git a/src/Kp2aBusinessLogic/database/Database.cs b/src/Kp2aBusinessLogic/database/Database.cs
index f22926b8..0d2b25c2 100644
--- a/src/Kp2aBusinessLogic/database/Database.cs
+++ b/src/Kp2aBusinessLogic/database/Database.cs
@@ -145,9 +145,9 @@ namespace keepass2android
}
- public PwGroup Search(SearchParameters searchParams)
+ public PwGroup Search(SearchParameters searchParams, IDictionary resultContexts)
{
- return SearchHelper.Search(this, searchParams);
+ return SearchHelper.Search(this, searchParams, resultContexts);
}
diff --git a/src/keepass2android/EntryActivity.cs b/src/keepass2android/EntryActivity.cs
index dae95ec7..825445dc 100644
--- a/src/keepass2android/EntryActivity.cs
+++ b/src/keepass2android/EntryActivity.cs
@@ -18,6 +18,7 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
using System;
using System.Collections.Generic;
using System.Text;
+using System.Linq;
using Android.App;
using Android.Content;
diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml
index 9af3715b..7be2fbc7 100644
--- a/src/keepass2android/Resources/values/strings.xml
+++ b/src/keepass2android/Resources/values/strings.xml
@@ -61,7 +61,6 @@
User Name
Extra string fields
File attachments
- Notes
The ArcFour stream cipher is not supported.
Keepass2Android cannot handle this uri.
Error creating group.
diff --git a/src/keepass2android/search/SearchProvider.cs b/src/keepass2android/search/SearchProvider.cs
index 858b113f..b806fede 100644
--- a/src/keepass2android/search/SearchProvider.cs
+++ b/src/keepass2android/search/SearchProvider.cs
@@ -46,10 +46,8 @@ namespace keepass2android.search
private const string GetIconPathQuery = "get_icon";
private const string IconIdParameter = "IconId";
private const string CustomIconUuidParameter = "CustomIconUuid";
- //public static readonly String AUTHORITY = "keepass2android.search.SearchProvider";
- //public static readonly Android.Net.Uri CONTENT_URI = Android.Net.Uri.Parse("content://" + AUTHORITY + "/dictionary");
- private Database mDb;
+ private Database _db;
private static UriMatcher UriMatcher = BuildUriMatcher();
@@ -66,13 +64,13 @@ namespace keepass2android.search
public override bool OnCreate()
{
- mDb = App.getDB();
+ _db = App.Kp2a.GetDb();
return true;
}
public override Android.Database.ICursor Query(Android.Net.Uri uri, string[] projection, string selection, string[] selectionArgs, string sortOrder)
{
- if (mDb.Open) // Can't show suggestions if the database is locked!
+ if (_db.Open) // Can't show suggestions if the database is locked!
{
switch ((UriMatches)UriMatcher.Match(uri))
{
@@ -83,7 +81,7 @@ namespace keepass2android.search
try
{
var resultsContexts = new Dictionary();
- var result = mDb.Search(new SearchParameters { SearchString = searchString }, resultsContexts );
+ var result = _db.Search(new SearchParameters { SearchString = searchString }, resultsContexts );
return new GroupCursor(result, resultsContexts);
}
catch (Exception e)
@@ -112,7 +110,7 @@ namespace keepass2android.search
var iconId = (PwIcon)Enum.Parse(typeof(PwIcon), uri.GetQueryParameter(IconIdParameter));
var customIconUuid = new PwUuid(MemUtil.HexStringToByteArray(uri.GetQueryParameter(CustomIconUuidParameter)));
- var iconDrawable = mDb.drawFactory.getIconDrawable(App.Context.Resources, mDb.pm, iconId, customIconUuid) as BitmapDrawable;
+ var iconDrawable = _db.DrawableFactory.GetIconDrawable(App.Context.Resources, _db.KpDatabase, iconId, customIconUuid) as BitmapDrawable;
if (iconDrawable != null)
{
var pipe = ParcelFileDescriptor.CreatePipe();
@@ -273,7 +271,7 @@ namespace keepass2android.search
intlResourceId = Resource.String.entry_url;
break;
case PwDefs.NotesField:
- intlResourceId = Resource.String.entry_notes;
+ intlResourceId = Resource.String.entry_comment;
break;
case PwGroup.SearchContextTags:
intlResourceId = Resource.String.entry_tags;
diff --git a/src/keepass2android/search/SearchResults.cs b/src/keepass2android/search/SearchResults.cs
index e5a6ca75..56920186 100644
--- a/src/keepass2android/search/SearchResults.cs
+++ b/src/keepass2android/search/SearchResults.cs
@@ -82,7 +82,7 @@ namespace keepass2android.search
private void Query (SearchParameters searchParams)
{
try {
- Group = _db.Search (searchParams);
+ Group = _db.Search (searchParams, null);
} catch (Exception e) {
Toast.MakeText(this,e.Message, ToastLength.Long).Show();
Finish();