mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-29 04:22:22 -05:00
Merge branch 'AlexVallat/Keepass2AndroidPerfOpt' into Release085
Conflicts: src/keepass2android/search/SearchResults.cs
This commit is contained in:
commit
df875f959e
@ -15,6 +15,14 @@ namespace KeePassLib.Serialization
|
||||
{
|
||||
public const string FileNameExtension = "kdbp";
|
||||
|
||||
/// <summary>
|
||||
/// Precompiles the serializer classes for faster first-run execution
|
||||
/// </summary>
|
||||
public static void PrepareSerializer()
|
||||
{
|
||||
RuntimeTypeModel.Default[typeof(PwDatabaseBuffer)].CompileInPlace();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the database pointed to by the specified ioc should be (de)serialised in default (xml) or protocol buffers format.
|
||||
/// </summary>
|
||||
|
@ -375,6 +375,12 @@ namespace keepass2android
|
||||
|
||||
private MemoryStream LoadDbFile()
|
||||
{
|
||||
if (KdbpFile.GetFormatToUse(_ioConnection) == KdbxFormat.ProtocolBuffers)
|
||||
{
|
||||
Kp2aLog.Log("Preparing kdbp serializer");
|
||||
KdbpFile.PrepareSerializer();
|
||||
}
|
||||
|
||||
Kp2aLog.Log("Pre-loading database file starting");
|
||||
var fileStorage = App.Kp2a.GetFileStorage(_ioConnection);
|
||||
var stream = fileStorage.OpenFileForRead(_ioConnection);
|
||||
|
@ -29,6 +29,7 @@ using Android.Content.PM;
|
||||
namespace keepass2android
|
||||
{
|
||||
[Activity (Label = "@string/kp2a_findUrl", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden, Theme="@style/Base")]
|
||||
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
|
||||
public class ShareUrlResults : GroupBaseActivity
|
||||
{
|
||||
|
||||
|
@ -31,6 +31,7 @@ namespace keepass2android.search
|
||||
/// </summary>
|
||||
[Activity (Label = "@string/app_name", Theme="@style/NoTitleBar", LaunchMode=Android.Content.PM.LaunchMode.SingleTop)]
|
||||
[MetaData("android.app.searchable",Resource=AppNames.Searchable)]
|
||||
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
|
||||
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
|
||||
public class SearchResults : GroupBaseActivity
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user