diff --git a/src/Kp2aBusinessLogic/database/PwEntryOutput.cs b/src/Kp2aBusinessLogic/database/PwEntryOutput.cs new file mode 100644 index 00000000..8ab57d0b --- /dev/null +++ b/src/Kp2aBusinessLogic/database/PwEntryOutput.cs @@ -0,0 +1,60 @@ +using System; +using KeePass.Util.Spr; +using KeePassLib; +using KeePassLib.Collections; +using KeePassLib.Security; + +namespace keepass2android +{ + /// + /// Represents the strings which are output from a PwEntry. + /// + /// In contrast to the original PwEntry, this means that placeholders are replaced. Also, plugins may modify + /// or add fields. + public class PwEntryOutput + { + private readonly PwEntry _entry; + private readonly PwDatabase _db; + private readonly ProtectedStringDictionary _outputStrings = new ProtectedStringDictionary(); + + /// + /// Constructs the PwEntryOutput by replacing the placeholders + /// + public PwEntryOutput(PwEntry entry, PwDatabase db) + { + _entry = entry; + _db = db; + + foreach (var pair in entry.Strings) + { + _outputStrings.Set(pair.Key, new ProtectedString(entry.Strings.Get(pair.Key).IsProtected, GetStringAndReplacePlaceholders(pair.Key))); + } + } + + string GetStringAndReplacePlaceholders(string key) + { + String value = Entry.Strings.ReadSafe(key); + value = SprEngine.Compile(value, new SprContext(Entry, _db, SprCompileFlags.All)); + return value; + } + + + /// + /// Returns the ID of the entry + /// + public PwUuid Uuid + { + get { return Entry.Uuid; } + } + + /// + /// The output strings for the represented entry + /// + public ProtectedStringDictionary OutputStrings { get { return _outputStrings; } } + + public PwEntry Entry + { + get { return _entry; } + } + } +} \ No newline at end of file diff --git a/src/Kp2aUnitTests/TestIntentsAndBundles.cs b/src/Kp2aUnitTests/TestIntentsAndBundles.cs new file mode 100644 index 00000000..64f4f766 --- /dev/null +++ b/src/Kp2aUnitTests/TestIntentsAndBundles.cs @@ -0,0 +1,34 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Android.App; +using Android.Content; +using Android.OS; +using Java.IO; +using KeePassLib; +using KeePassLib.Interfaces; +using KeePassLib.Keys; +using KeePassLib.Serialization; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using keepass2android; + +namespace Kp2aUnitTests +{ + [TestClass] + internal class TestIntentsAndBundles + { + [TestMethod] + public void StringArray() + { + string[] dataIn = new string[] { "a","bcd"}; + Intent i= new Intent(); + i.PutExtra("key", dataIn); + + Bundle extras = i.Extras; + var dataOut = extras.GetStringArray("key"); + Assert.AreEqual(dataIn.Length, dataOut.Length); + Assert.AreEqual(dataIn[0], dataOut[0]); + Assert.AreEqual(dataIn[1], dataOut[1]); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/ChangeLog.cs b/src/keepass2android/ChangeLog.cs index fd5973b6..c1dd359b 100644 --- a/src/keepass2android/ChangeLog.cs +++ b/src/keepass2android/ChangeLog.cs @@ -38,7 +38,7 @@ namespace keepass2android ctx.GetString(Resource.String.ChangeLog) }; - builder.SetPositiveButton(Android.Resource.String.Ok, (dlgSender, dlgEvt) => { }); + builder.SetPositiveButton(Android.Resource.String.Ok, (dlgSender, dlgEvt) => {((AlertDialog)dlgSender).Dismiss(); }); builder.SetCancelable(false); builder.SetMessage("temp"); diff --git a/src/keepass2android/EntryActivity.cs b/src/keepass2android/EntryActivity.cs index bb16b1de..60f7fb85 100644 --- a/src/keepass2android/EntryActivity.cs +++ b/src/keepass2android/EntryActivity.cs @@ -52,17 +52,21 @@ namespace keepass2android public const String KeyRefreshPos = "refresh_pos"; public const String KeyCloseAfterCreate = "close_after_create"; - public static void Launch(Activity act, PwEntry pw, int pos, AppTask appTask) + public static void Launch(Activity act, PwEntry pw, int pos, AppTask appTask, ActivityFlags? flags = null) { Intent i = new Intent(act, typeof(EntryActivity)); - i.PutExtra(KeyEntry, pw.Uuid.ToHexString()); i.PutExtra(KeyRefreshPos, pos); - appTask.ToIntent(i); + if (flags != null) + i.SetFlags((ActivityFlags) flags); - act.StartActivityForResult(i, 0); + appTask.ToIntent(i); + if (flags != null && (((ActivityFlags) flags) | ActivityFlags.ForwardResult) == ActivityFlags.ForwardResult) + act.StartActivity(i); + else + act.StartActivityForResult(i, 0); } public EntryActivity (IntPtr javaReference, JniHandleOwnership transfer) @@ -93,6 +97,9 @@ namespace keepass2android private readonly Dictionary _stringViews = new Dictionary(); private readonly List _pendingMenuOptions = new List(); + //make sure _timer doesn't go out of scope: + private Timer _timer; + protected void SetEntryView() { @@ -298,6 +305,7 @@ namespace keepass2android !prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default)); base.OnCreate(savedInstanceState); + RequestWindowFeature(WindowFeatures.IndeterminateProgress); new ActivityDesign(this).ApplyTheme(); @@ -342,15 +350,15 @@ namespace keepass2android SetupEditButtons(); - //depending on the app task, the final things to do might be delayed, so let the appTask call CompleteOnCreate when appropriate - _appTask.OnCompleteCreateEntryActivity(this); - App.Kp2a.GetDb().LastOpenedEntry = new PwEntryOutput(Entry, App.Kp2a.GetDb().KpDatabase); RegisterReceiver(new PluginActionReceiver(this), new IntentFilter(Strings.ActionAddEntryAction)); RegisterReceiver(new PluginFieldReceiver(this), new IntentFilter(Strings.ActionSetEntryField)); new Thread(NotifyPluginsOnOpen).Start(); + + //the rest of the things to do depends on the current app task: + _appTask.CompleteOnCreateEntryActivity(this); } private void NotifyPluginsOnOpen() @@ -381,29 +389,17 @@ namespace keepass2android } } - public void CompleteOnCreate() - { + - Intent showNotIntent = new Intent(this, typeof(CopyToClipboardService)); + internal void StartNotificationsService(bool closeAfterCreate) + { + Intent showNotIntent = new Intent(this, typeof (CopyToClipboardService)); showNotIntent.SetAction(Intents.ShowNotification); showNotIntent.PutExtra(KeyEntry, Entry.Uuid.ToHexString()); - bool closeAfterCreate = _appTask.CloseEntryActivityAfterCreate; + showNotIntent.PutExtra(KeyCloseAfterCreate, closeAfterCreate); StartService(showNotIntent); - - Kp2aLog.Log("Requesting copy to clipboard for Uuid=" + Entry.Uuid.ToHexString()); - - /*foreach (PwUuid key in App.Kp2a.GetDb().entries.Keys) - { - Kp2aLog.Log(this,key.ToHexString() + " -> " + App.Kp2a.GetDb().entries[key].Uuid.ToHexString()); - }*/ - - if (closeAfterCreate) - { - SetResult(KeePass.ExitCloseAfterTaskComplete); - Finish(); - } } @@ -805,12 +801,24 @@ namespace keepass2android { Intent ret = new Intent(); ret.PutExtra(KeyRefreshPos, _pos); - + _appTask.ToIntent(ret); SetResult(KeePass.ExitRefresh, ret); } protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { base.OnActivityResult(requestCode, resultCode, data); + if (AppTask.TryGetFromActivityResult(data, ref _appTask)) + { + //make sure app task is passed to calling activity. + //the result code might be modified later. + Intent retData = new Intent(); + _appTask.ToIntent(retData); + SetResult(KeePass.ExitNormal, retData); + } + + + + if ( resultCode == KeePass.ExitRefresh || resultCode == KeePass.ExitRefreshTitle ) { if ( resultCode == KeePass.ExitRefreshTitle ) { RequiresRefresh (); @@ -1019,33 +1027,8 @@ namespace keepass2android } - /// - /// brings up a dialog asking the user whether he wants to add the given URL to the entry for automatic finding - /// - public void AskAddUrlThenCompleteCreate(string url) - { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.SetTitle(GetString(Resource.String.AddUrlToEntryDialog_title)); - - builder.SetMessage(GetString(Resource.String.AddUrlToEntryDialog_text, new Java.Lang.Object[] {url})); - - builder.SetPositiveButton(GetString(Resource.String.yes), (dlgSender, dlgEvt) => - { - - AddUrlToEntryThenCompleteCreate(url); - - }); - - builder.SetNegativeButton(GetString(Resource.String.no), (dlgSender, dlgEvt) => - { - CompleteOnCreate(); - }); - - Dialog dialog = builder.Create(); - dialog.Show(); - - } - private void AddUrlToEntryThenCompleteCreate(string url) + + internal void AddUrlToEntry(string url, Action finishAction) { PwEntry initialEntry = Entry.CloneDeep(); @@ -1076,7 +1059,7 @@ namespace keepass2android ActionOnFinish closeOrShowError = new ActionOnFinish((success, message) => { OnFinish.DisplayMessage(this, message); - CompleteOnCreate(); + finishAction(); }); @@ -1085,7 +1068,7 @@ namespace keepass2android ProgressTask pt = new ProgressTask(App.Kp2a, this, runnable); pt.Run(); - } + } public void ToggleVisibility() { _showPassword = !_showPassword; @@ -1120,5 +1103,27 @@ namespace keepass2android { PluginHost.AddEntryToIntent(intent, App.Kp2a.GetDb().LastOpenedEntry); } + + public void CloseAfterTaskComplete() + { + //before closing, wait a little to get plugin updates + int numPlugins = new PluginDatabase(this).GetPluginsWithAcceptedScope(Strings.ScopeCurrentEntry).Count(); + var timeToWait = TimeSpan.FromMilliseconds(500*numPlugins); + SetProgressBarIndeterminateVisibility(true); + _timer = new Timer(obj => + { + RunOnUiThread(() => + { + //task is completed -> return NullTask + Intent resIntent = new Intent(); + new NullTask().ToIntent(resIntent); + SetResult(KeePass.ExitCloseAfterTaskComplete, resIntent); + //close activity: + Finish(); + } + ); + }, + null, timeToWait, TimeSpan.FromMilliseconds(-1)); + } } } \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/CopyToClipboardPopupMenuIcon.cs b/src/keepass2android/EntryActivityClasses/CopyToClipboardPopupMenuIcon.cs new file mode 100644 index 00000000..a1a4207d --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/CopyToClipboardPopupMenuIcon.cs @@ -0,0 +1,41 @@ +using Android.Content; +using Android.Graphics.Drawables; +using PluginHostTest; + +namespace keepass2android +{ + /// + /// Reperesents the popup menu item in EntryActivity to copy a string to clipboard + /// + class CopyToClipboardPopupMenuIcon : IPopupMenuItem + { + private readonly Context _context; + private readonly IStringView _stringView; + + public CopyToClipboardPopupMenuIcon(Context context, IStringView stringView) + { + _context = context; + _stringView = stringView; + + } + + public Drawable Icon + { + get + { + return _context.Resources.GetDrawable(Resource.Drawable.ic_menu_copy_holo_light); + } + } + public string Text + { + //TODO localize + get { return "Copy to clipboard"; } + } + + + public void HandleClick() + { + CopyToClipboardService.CopyValueToClipboardWithTimeout(_context, _stringView.Text); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/ExtraStringView.cs b/src/keepass2android/EntryActivityClasses/ExtraStringView.cs new file mode 100644 index 00000000..65edfb48 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/ExtraStringView.cs @@ -0,0 +1,44 @@ +using System; +using Android.Views; +using Android.Widget; + +namespace keepass2android +{ + internal class ExtraStringView : IStringView + { + private readonly View _container; + private readonly TextView _valueView; + private readonly TextView _keyView; + + public ExtraStringView(LinearLayout container, TextView valueView, TextView keyView) + { + _container = container; + _valueView = valueView; + _keyView = keyView; + } + + public View View + { + get { return _container; } + } + + public string Text + { + get { return _valueView.Text; } + set + { + if (String.IsNullOrEmpty(value)) + { + _valueView.Visibility = ViewStates.Gone; + _keyView.Visibility = ViewStates.Gone; + } + else + { + _valueView.Visibility = ViewStates.Visible; + _keyView.Visibility = ViewStates.Visible; + _valueView.Text = value; + } + } + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/GotoUrlMenuItem.cs b/src/keepass2android/EntryActivityClasses/GotoUrlMenuItem.cs new file mode 100644 index 00000000..b1a56d97 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/GotoUrlMenuItem.cs @@ -0,0 +1,33 @@ +using Android.Graphics.Drawables; +using PluginHostTest; + +namespace keepass2android +{ + /// + /// Reperesents the popup menu item in EntryActivity to go to the URL in the field + /// + class GotoUrlMenuItem : IPopupMenuItem + { + private readonly EntryActivity _ctx; + + public GotoUrlMenuItem(EntryActivity ctx) + { + _ctx = ctx; + } + + public Drawable Icon + { + get { return _ctx.Resources.GetDrawable(Android.Resource.Drawable.IcMenuUpload); } + } + + public string Text + { + get { return _ctx.Resources.GetString(Resource.String.menu_url); } + } + + public void HandleClick() + { + _ctx.GotoUrl(); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/IPopupMenuItem.cs b/src/keepass2android/EntryActivityClasses/IPopupMenuItem.cs new file mode 100644 index 00000000..9cb8c149 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/IPopupMenuItem.cs @@ -0,0 +1,17 @@ +using System; +using Android.Graphics.Drawables; +using KeePassLib; + +namespace keepass2android +{ + /// + /// Interface for popup menu items in EntryActivity + /// + internal interface IPopupMenuItem + { + Drawable Icon { get; } + String Text { get; } + + void HandleClick(); + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/IStringView.cs b/src/keepass2android/EntryActivityClasses/IStringView.cs new file mode 100644 index 00000000..a5c5036c --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/IStringView.cs @@ -0,0 +1,7 @@ +namespace keepass2android +{ + internal interface IStringView + { + string Text { set; get; } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/OpenBinaryPopupItem.cs b/src/keepass2android/EntryActivityClasses/OpenBinaryPopupItem.cs new file mode 100644 index 00000000..38c07867 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/OpenBinaryPopupItem.cs @@ -0,0 +1,40 @@ +using Android.Graphics.Drawables; +using PluginHostTest; + +namespace keepass2android +{ + /// + /// Represents the popup menu item in EntryActivity to open the associated attachment + /// + internal class OpenBinaryPopupItem : IPopupMenuItem + { + private readonly string _key; + private readonly EntryActivity _entryActivity; + + public OpenBinaryPopupItem(string key, EntryActivity entryActivity) + { + _key = key; + _entryActivity = entryActivity; + } + + public Drawable Icon + { + get { return _entryActivity.Resources.GetDrawable(Android.Resource.Drawable.IcMenuShare); } + } + + public string Text + { + get { return _entryActivity.Resources.GetString(Resource.String.SaveAttachmentDialog_open); } + } + + public void HandleClick() + { + Android.Net.Uri newUri = _entryActivity.WriteBinaryToFile(_key, true); + if (newUri != null) + { + _entryActivity.OpenBinaryFile(newUri); + } + + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/PluginMenuOption.cs b/src/keepass2android/EntryActivityClasses/PluginMenuOption.cs new file mode 100644 index 00000000..d3e91ef4 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/PluginMenuOption.cs @@ -0,0 +1,14 @@ +using Android.Content; +using Android.Graphics.Drawables; + +namespace keepass2android +{ + class PluginMenuOption + { + public string DisplayText { get; set; } + + public Drawable Icon { get; set; } + + public Intent Intent { get; set; } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/PluginPopupMenuItem.cs b/src/keepass2android/EntryActivityClasses/PluginPopupMenuItem.cs new file mode 100644 index 00000000..779f02ad --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/PluginPopupMenuItem.cs @@ -0,0 +1,59 @@ +using Android.Content; +using Android.Graphics.Drawables; +using Android.OS; +using Keepass2android.Pluginsdk; + +namespace keepass2android +{ + /// + /// Represents a popup menu item in EntryActivity which was added by a plugin. The click will therefore broadcast to the plugin. + /// + class PluginPopupMenuItem : IPopupMenuItem + { + private readonly EntryActivity _activity; + private readonly string _pluginPackage; + private readonly string _fieldId; + private readonly string _popupItemId; + private readonly string _displayText; + private readonly int _iconId; + private readonly Bundle _bundleExtra; + + public PluginPopupMenuItem(EntryActivity activity, string pluginPackage, string fieldId, string popupItemId, string displayText, int iconId, Bundle bundleExtra) + { + _activity = activity; + _pluginPackage = pluginPackage; + _fieldId = fieldId; + _popupItemId = popupItemId; + _displayText = displayText; + _iconId = iconId; + _bundleExtra = bundleExtra; + } + + public Drawable Icon + { + get { return _activity.PackageManager.GetResourcesForApplication(_pluginPackage).GetDrawable(_iconId); } + } + public string Text + { + get { return _displayText; } + } + + public string PopupItemId + { + get { return _popupItemId; } + } + + public void HandleClick() + { + Intent i = new Intent(Strings.ActionEntryActionSelected); + i.SetPackage(_pluginPackage); + i.PutExtra(Strings.ExtraActionData, _bundleExtra); + i.PutExtra(Strings.ExtraFieldId, _fieldId); + i.PutExtra(Strings.ExtraSender, _activity.PackageName); + + _activity.AddEntryToIntent(i); + + _activity.SendBroadcast(i); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/StandardStringView.cs b/src/keepass2android/EntryActivityClasses/StandardStringView.cs new file mode 100644 index 00000000..bcbcb019 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/StandardStringView.cs @@ -0,0 +1,44 @@ +using System; +using Android.App; +using Android.Views; +using Android.Widget; + +namespace keepass2android +{ + internal class StandardStringView : IStringView + { + private readonly int _viewId; + private readonly int _containerViewId; + private readonly Activity _activity; + + public StandardStringView(int viewId, int containerViewId, Activity activity) + { + _viewId = viewId; + _containerViewId = containerViewId; + _activity = activity; + } + + public string Text + { + set + { + View container = _activity.FindViewById(_containerViewId); + TextView tv = (TextView) _activity.FindViewById(_viewId); + if (String.IsNullOrEmpty(value)) + { + container.Visibility = tv.Visibility = ViewStates.Gone; + } + else + { + container.Visibility = tv.Visibility = ViewStates.Visible; + tv.Text = value; + } + } + get + { + TextView tv = (TextView) _activity.FindViewById(_viewId); + return tv.Text; + } + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/ToggleVisibilityPopupMenuItem.cs b/src/keepass2android/EntryActivityClasses/ToggleVisibilityPopupMenuItem.cs new file mode 100644 index 00000000..54ff1890 --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/ToggleVisibilityPopupMenuItem.cs @@ -0,0 +1,46 @@ +using Android.Graphics.Drawables; +using PluginHostTest; + +namespace keepass2android +{ + /// + /// Reperesents the popup menu item in EntryActivity to toggle visibility of all protected strings (e.g. Password) + /// + class ToggleVisibilityPopupMenuItem : IPopupMenuItem + { + private readonly EntryActivity _activity; + + + public ToggleVisibilityPopupMenuItem(EntryActivity activity) + { + _activity = activity; + + } + + public Drawable Icon + { + get + { + //return new TextDrawable("\uF06E", _activity); + return _activity.Resources.GetDrawable(Resource.Drawable.ic_action_eye_open); + + } + } + public string Text + { + get + { + return _activity.Resources.GetString( + _activity._showPassword ? + Resource.String.menu_hide_password + : Resource.String.show_password); + } + } + + + public void HandleClick() + { + _activity.ToggleVisibility(); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryActivityClasses/WriteBinaryToFilePopupItem.cs b/src/keepass2android/EntryActivityClasses/WriteBinaryToFilePopupItem.cs new file mode 100644 index 00000000..a90fc61b --- /dev/null +++ b/src/keepass2android/EntryActivityClasses/WriteBinaryToFilePopupItem.cs @@ -0,0 +1,35 @@ +using Android.Graphics.Drawables; +using PluginHostTest; + +namespace keepass2android +{ + /// + /// Represents the popup menu item in EntryActivity to store the binary attachment on SD card + /// + internal class WriteBinaryToFilePopupItem : IPopupMenuItem + { + private readonly string _key; + private readonly EntryActivity _activity; + + public WriteBinaryToFilePopupItem(string key, EntryActivity activity) + { + _key = key; + _activity = activity; + } + + public Drawable Icon + { + get { return _activity.Resources.GetDrawable(Android.Resource.Drawable.IcMenuSave); } + } + + public string Text + { + get { return _activity.Resources.GetString(Resource.String.SaveAttachmentDialog_save); } + } + + public void HandleClick() + { + _activity.WriteBinaryToFile(_key, false); + } + } +} \ No newline at end of file diff --git a/src/keepass2android/EntryEditActivity.cs b/src/keepass2android/EntryEditActivity.cs index 7f6f0a4b..2b747a93 100644 --- a/src/keepass2android/EntryEditActivity.cs +++ b/src/keepass2android/EntryEditActivity.cs @@ -601,7 +601,7 @@ namespace keepass2android Intent intent = Intent; intent.PutExtra(IntentContinueWithEditing, true); OverridePendingTransition(0, 0); - intent.AddFlags(ActivityFlags.NoAnimation); + intent.AddFlags(ActivityFlags.NoAnimation | ActivityFlags.ForwardResult); _closeForReload = true; SetResult(KeePass.ExitRefreshTitle); //probably the entry will be modified -> let the EditActivity refresh to be safe Finish(); diff --git a/src/keepass2android/GroupBaseActivity.cs b/src/keepass2android/GroupBaseActivity.cs index 6e514659..4949dd65 100644 --- a/src/keepass2android/GroupBaseActivity.cs +++ b/src/keepass2android/GroupBaseActivity.cs @@ -70,7 +70,11 @@ namespace keepass2android { base.OnActivityResult(requestCode, resultCode, data); - AppTask.TryGetFromActivityResult(data, ref AppTask); + if (AppTask.TryGetFromActivityResult(data, ref AppTask)) + { + //make sure the app task is passed to the calling activity + AppTask.SetActivityResult(this, KeePass.ExitNormal); + } if (resultCode == Result.Ok) { @@ -236,17 +240,24 @@ namespace keepass2android class SuggestionListener: Java.Lang.Object, SearchView.IOnSuggestionListener { private readonly CursorAdapter _suggestionsAdapter; + private readonly GroupBaseActivity _activity; + private readonly IMenuItem _searchItem; - public SuggestionListener(CursorAdapter suggestionsAdapter) + + public SuggestionListener(CursorAdapter suggestionsAdapter, GroupBaseActivity activity, IMenuItem searchItem) { _suggestionsAdapter = suggestionsAdapter; + _activity = activity; + _searchItem = searchItem; } public bool OnSuggestionClick(int position) { var cursor = _suggestionsAdapter.Cursor; cursor.MoveToPosition(position); - var x = cursor.GetString(cursor.GetColumnIndexOrThrow(SearchManager.SuggestColumnIntentDataId)); + string entryIdAsHexString = cursor.GetString(cursor.GetColumnIndexOrThrow(SearchManager.SuggestColumnIntentDataId)); + EntryActivity.Launch(_activity, App.Kp2a.GetDb().Entries[new PwUuid(MemUtil.HexStringToByteArray(entryIdAsHexString))],-1,_activity.AppTask); + ((SearchView) _searchItem.ActionView).Iconified = true; return true; } @@ -255,6 +266,37 @@ namespace keepass2android return false; } } + + class OnQueryTextListener: Java.Lang.Object, SearchView.IOnQueryTextListener + { + private readonly GroupBaseActivity _activity; + + public OnQueryTextListener(GroupBaseActivity activity) + { + _activity = activity; + } + + public bool OnQueryTextChange(string newText) + { + return false; + } + + public bool OnQueryTextSubmit(string query) + { + if (String.IsNullOrEmpty(query)) + return false; //let the default happen + + Intent searchIntent = new Intent(_activity, typeof(search.SearchResults)); + searchIntent.SetAction(Intent.ActionSearch); //currently not necessary to set because SearchResults doesn't care, but let's be as close to the default as possible + searchIntent.PutExtra(SearchManager.Query, query); + //forward appTask: + _activity.AppTask.ToIntent(searchIntent); + + _activity.StartActivityForResult(searchIntent, 0); + + return true; + } + } public override bool OnCreateOptionsMenu(IMenu menu) { base.OnCreateOptionsMenu(menu); @@ -263,11 +305,13 @@ namespace keepass2android inflater.Inflate(Resource.Menu.group, menu); if (Util.HasActionBar(this)) { - var searchManager = (SearchManager) GetSystemService(Context.SearchService); - var searchView = (SearchView) menu.FindItem(Resource.Id.menu_search).ActionView; + var searchManager = (SearchManager) GetSystemService(SearchService); + IMenuItem searchItem = menu.FindItem(Resource.Id.menu_search); + var searchView = (SearchView) searchItem.ActionView; searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName)); - searchView.SetOnSuggestionListener(new SuggestionListener(searchView.SuggestionsAdapter)); + searchView.SetOnSuggestionListener(new SuggestionListener(searchView.SuggestionsAdapter, this, searchItem)); + searchView.SetOnQueryTextListener(new OnQueryTextListener(this)); } var item = menu.FindItem(Resource.Id.menu_sync); if (item != null) diff --git a/src/keepass2android/KeePass.cs b/src/keepass2android/KeePass.cs index dab2d040..ec22af59 100644 --- a/src/keepass2android/KeePass.cs +++ b/src/keepass2android/KeePass.cs @@ -46,6 +46,7 @@ using String = System.String; * (AdvancedSearch Menu) -> Search -> SearchResults -> EntryView -> EntryEdit * (SearchWidget) -> SearchResults -> EntryView -> EntryEdit * Password -> ShareUrlResults -> EntryView + * FileSelect -> Group (after Create DB) * * * In each of these activities, an AppTask may be present and must be passed to started activities and ActivityResults @@ -84,11 +85,23 @@ namespace keepass2android AppTask _appTask; private ActivityDesign _design; - protected override void OnCreate (Bundle bundle) + protected override void OnCreate(Bundle savedInstanceState) { - base.OnCreate (bundle); + base.OnCreate(savedInstanceState); _design.ApplyTheme(); - _appTask = AppTask.GetTaskInOnCreate(bundle, Intent); + //see comment to this in PasswordActivity. + //Note that this activity is affected even though it's finished when the app is closed because it + //seems that the "app launch intent" is re-delivered, so this might end up here. + if ((_appTask == null) && (Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory))) + { + _appTask = new NullTask(); + } + else + { + _appTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent); + } + + Kp2aLog.Log("KeePass.OnCreate"); } @@ -274,9 +287,8 @@ namespace keepass2android Intent intent = new Intent(this, typeof(FileSelectActivity)); _appTask.ToIntent(intent); - - - StartActivityForResult(intent, 0); + intent.AddFlags(ActivityFlags.ForwardResult); + StartActivity(intent); Finish(); } @@ -288,11 +300,6 @@ namespace keepass2android } - protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { - base.OnActivityResult(requestCode, resultCode, data); - - Finish(); - } } } diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 87d89f82..27806ecc 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -179,11 +179,11 @@ namespace keepass2android Intent i = new Intent(act, typeof(PasswordActivity)); PutIoConnectionToIntent(ioc, i); - i.SetFlags(ActivityFlags.ClearTask); + i.SetFlags(ActivityFlags.ClearTask | ActivityFlags.ForwardResult); appTask.ToIntent(i); - act.StartActivityForResult(i, 0); + act.StartActivity(i); } @@ -198,11 +198,21 @@ namespace keepass2android Kp2aLog.Log("PasswordActivity.OnActivityResult "+resultCode+"/"+requestCode); + AppTask.TryGetFromActivityResult(data, ref AppTask); + //NOTE: original code from k eepassdroid used switch ((Android.App.Result)requestCode) { (but doesn't work here, although k eepassdroid works) switch(resultCode) { - case KeePass.ExitNormal: // Returned to this screen using the Back key, treat as locking the database - App.Kp2a.LockDatabase(); + case KeePass.ExitNormal: // Returned to this screen using the Back key + if (PreferenceManager.GetDefaultSharedPreferences(this) + .GetBoolean(GetString(Resource.String.LockWhenNavigateBack_key), false)) + { + App.Kp2a.LockDatabase(); + } + //by leaving the app with the back button, the user probably wants to cancel the task + //The activity might be resumed (through Android's recent tasks list), then use a NullTask: + AppTask = new NullTask(); + Finish(); break; case KeePass.ExitLock: // The database has already been locked, and the quick unlock screen will be shown if appropriate @@ -266,6 +276,7 @@ namespace keepass2android } + private void LoadOtpFile() { new LoadingDialog(this, true, @@ -340,7 +351,19 @@ namespace keepass2android Intent i = Intent; - AppTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent); + //only load the AppTask if this is the "first" OnCreate (not because of kill/resume, i.e. savedInstanceState==null) + // and if the activity is not launched from history (i.e. recent tasks) because this would mean that + // the Activity was closed already (user cancelling the task or task complete) but is restarted due recent tasks. + // Don't re-start the task (especially bad if tak was complete already) + if ((savedInstanceState == null) && (Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory))) + { + AppTask = new NullTask(); + } + else + { + AppTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent); + } + String action = i.Action; @@ -470,7 +493,6 @@ namespace keepass2android Toast.MakeText(this, GetString(Resource.String.otp_discarded_because_no_db), ToastLength.Long).Show(); GoToFileSelectActivity(); - Finish(); return false; } @@ -1096,7 +1118,8 @@ namespace keepass2android Intent intent = new Intent(this, typeof (FileSelectActivity)); intent.PutExtra(FileSelectActivity.NoForwardToPasswordActivity, true); AppTask.ToIntent(intent); - StartActivityForResult(intent, 0); + intent.AddFlags(ActivityFlags.ForwardResult); + StartActivity(intent); Finish(); } diff --git a/src/keepass2android/Resources/Resource.designer.cs b/src/keepass2android/Resources/Resource.designer.cs index 4d62eb2c..63290ae2 100644 --- a/src/keepass2android/Resources/Resource.designer.cs +++ b/src/keepass2android/Resources/Resource.designer.cs @@ -3353,71 +3353,71 @@ namespace keepass2android public partial class String { - // aapt resource value: 0x7f09012f - public const int AboutText = 2131296559; + // aapt resource value: 0x7f090130 + public const int AboutText = 2131296560; - // aapt resource value: 0x7f09012a - public const int AcceptAllServerCertificates_default = 2131296554; + // aapt resource value: 0x7f09012b + public const int AcceptAllServerCertificates_default = 2131296555; - // aapt resource value: 0x7f09011f - public const int AcceptAllServerCertificates_key = 2131296543; + // aapt resource value: 0x7f090120 + public const int AcceptAllServerCertificates_key = 2131296544; - // aapt resource value: 0x7f090223 - public const int AcceptAllServerCertificates_summary = 2131296803; + // aapt resource value: 0x7f090226 + public const int AcceptAllServerCertificates_summary = 2131296806; - // aapt resource value: 0x7f090222 - public const int AcceptAllServerCertificates_title = 2131296802; + // aapt resource value: 0x7f090225 + public const int AcceptAllServerCertificates_title = 2131296805; + + // aapt resource value: 0x7f090211 + public const int AddUrlToEntryDialog_text = 2131296785; // aapt resource value: 0x7f090210 - public const int AddUrlToEntryDialog_text = 2131296784; + public const int AddUrlToEntryDialog_title = 2131296784; - // aapt resource value: 0x7f09020f - public const int AddUrlToEntryDialog_title = 2131296783; + // aapt resource value: 0x7f090247 + public const int AddingEntry = 2131296839; - // aapt resource value: 0x7f090244 - public const int AddingEntry = 2131296836; - - // aapt resource value: 0x7f090245 - public const int AddingGroup = 2131296837; + // aapt resource value: 0x7f090248 + public const int AddingGroup = 2131296840; // aapt resource value: 0x7f090015 public const int ApplicationName = 2131296277; - // aapt resource value: 0x7f09023a - public const int AskDeletePermanentlyEntry = 2131296826; - - // aapt resource value: 0x7f09023b - public const int AskDeletePermanentlyGroup = 2131296827; - - // aapt resource value: 0x7f09023c - public const int AskDeletePermanently_title = 2131296828; - - // aapt resource value: 0x7f09023f - public const int AskDiscardChanges = 2131296831; - - // aapt resource value: 0x7f090240 - public const int AskDiscardChanges_title = 2131296832; - - // aapt resource value: 0x7f090234 - public const int AskOverwriteBinary = 2131296820; - - // aapt resource value: 0x7f090237 - public const int AskOverwriteBinary_no = 2131296823; - - // aapt resource value: 0x7f090235 - public const int AskOverwriteBinary_title = 2131296821; - - // aapt resource value: 0x7f090236 - public const int AskOverwriteBinary_yes = 2131296822; + // aapt resource value: 0x7f09023d + public const int AskDeletePermanentlyEntry = 2131296829; // aapt resource value: 0x7f09023e - public const int AskReloadFile = 2131296830; + public const int AskDeletePermanentlyGroup = 2131296830; - // aapt resource value: 0x7f09023d - public const int AskReloadFile_title = 2131296829; + // aapt resource value: 0x7f09023f + public const int AskDeletePermanently_title = 2131296831; + + // aapt resource value: 0x7f090242 + public const int AskDiscardChanges = 2131296834; + + // aapt resource value: 0x7f090243 + public const int AskDiscardChanges_title = 2131296835; + + // aapt resource value: 0x7f090237 + public const int AskOverwriteBinary = 2131296823; + + // aapt resource value: 0x7f09023a + public const int AskOverwriteBinary_no = 2131296826; // aapt resource value: 0x7f090238 - public const int AttachFailed = 2131296824; + public const int AskOverwriteBinary_title = 2131296824; + + // aapt resource value: 0x7f090239 + public const int AskOverwriteBinary_yes = 2131296825; + + // aapt resource value: 0x7f090241 + public const int AskReloadFile = 2131296833; + + // aapt resource value: 0x7f090240 + public const int AskReloadFile_title = 2131296832; + + // aapt resource value: 0x7f09023b + public const int AttachFailed = 2131296827; // aapt resource value: 0x7f09010f public const int BinaryDirectory_default = 2131296527; @@ -3425,230 +3425,239 @@ namespace keepass2android // aapt resource value: 0x7f09010e public const int BinaryDirectory_key = 2131296526; + // aapt resource value: 0x7f090209 + public const int BinaryDirectory_summary = 2131296777; + // aapt resource value: 0x7f090208 - public const int BinaryDirectory_summary = 2131296776; + public const int BinaryDirectory_title = 2131296776; - // aapt resource value: 0x7f090207 - public const int BinaryDirectory_title = 2131296775; - - // aapt resource value: 0x7f090268 - public const int CannotMoveGroupHere = 2131296872; - - // aapt resource value: 0x7f0902a9 - public const int CertificateFailure = 2131296937; - - // aapt resource value: 0x7f0902a8 - public const int CertificateWarning = 2131296936; - - // aapt resource value: 0x7f0902ba - public const int ChangeLog = 2131296954; - - // aapt resource value: 0x7f0902b9 - public const int ChangeLog_0_7 = 2131296953; - - // aapt resource value: 0x7f0902b7 - public const int ChangeLog_0_8 = 2131296951; - - // aapt resource value: 0x7f0902b6 - public const int ChangeLog_0_8_1 = 2131296950; - - // aapt resource value: 0x7f0902b5 - public const int ChangeLog_0_8_2 = 2131296949; - - // aapt resource value: 0x7f0902b4 - public const int ChangeLog_0_8_3 = 2131296948; - - // aapt resource value: 0x7f0902b3 - public const int ChangeLog_0_8_4 = 2131296947; - - // aapt resource value: 0x7f0902b2 - public const int ChangeLog_0_8_5 = 2131296946; - - // aapt resource value: 0x7f0902b1 - public const int ChangeLog_0_8_6 = 2131296945; - - // aapt resource value: 0x7f0902b0 - public const int ChangeLog_0_9 = 2131296944; - - // aapt resource value: 0x7f0902af - public const int ChangeLog_0_9_1 = 2131296943; - - // aapt resource value: 0x7f0902ae - public const int ChangeLog_0_9_2 = 2131296942; - - // aapt resource value: 0x7f0902ad - public const int ChangeLog_0_9_3 = 2131296941; + // aapt resource value: 0x7f09026b + public const int CannotMoveGroupHere = 2131296875; // aapt resource value: 0x7f0902ac - public const int ChangeLog_0_9_3_r5 = 2131296940; - - // aapt resource value: 0x7f0902b8 - public const int ChangeLog_keptDonate = 2131296952; + public const int CertificateFailure = 2131296940; // aapt resource value: 0x7f0902ab - public const int ChangeLog_title = 2131296939; + public const int CertificateWarning = 2131296939; - // aapt resource value: 0x7f090120 - public const int CheckForFileChangesOnSave_key = 2131296544; + // aapt resource value: 0x7f0902bd + public const int ChangeLog = 2131296957; + + // aapt resource value: 0x7f0902bc + public const int ChangeLog_0_7 = 2131296956; + + // aapt resource value: 0x7f0902ba + public const int ChangeLog_0_8 = 2131296954; + + // aapt resource value: 0x7f0902b9 + public const int ChangeLog_0_8_1 = 2131296953; + + // aapt resource value: 0x7f0902b8 + public const int ChangeLog_0_8_2 = 2131296952; + + // aapt resource value: 0x7f0902b7 + public const int ChangeLog_0_8_3 = 2131296951; + + // aapt resource value: 0x7f0902b6 + public const int ChangeLog_0_8_4 = 2131296950; + + // aapt resource value: 0x7f0902b5 + public const int ChangeLog_0_8_5 = 2131296949; + + // aapt resource value: 0x7f0902b4 + public const int ChangeLog_0_8_6 = 2131296948; + + // aapt resource value: 0x7f0902b3 + public const int ChangeLog_0_9 = 2131296947; + + // aapt resource value: 0x7f0902b2 + public const int ChangeLog_0_9_1 = 2131296946; + + // aapt resource value: 0x7f0902b1 + public const int ChangeLog_0_9_2 = 2131296945; + + // aapt resource value: 0x7f0902b0 + public const int ChangeLog_0_9_3 = 2131296944; + + // aapt resource value: 0x7f0902af + public const int ChangeLog_0_9_3_r5 = 2131296943; + + // aapt resource value: 0x7f0902bb + public const int ChangeLog_keptDonate = 2131296955; + + // aapt resource value: 0x7f0902ae + public const int ChangeLog_title = 2131296942; + + // aapt resource value: 0x7f090121 + public const int CheckForFileChangesOnSave_key = 2131296545; + + // aapt resource value: 0x7f09022a + public const int CheckForFileChangesOnSave_summary = 2131296810; + + // aapt resource value: 0x7f090229 + public const int CheckForFileChangesOnSave_title = 2131296809; + + // aapt resource value: 0x7f09025c + public const int CheckingDatabaseForChanges = 2131296860; + + // aapt resource value: 0x7f090250 + public const int CheckingTargetFileForChanges = 2131296848; + + // aapt resource value: 0x7f09014f + public const int ClearClipboard = 2131296591; + + // aapt resource value: 0x7f090228 + public const int ClearOfflineCache_question = 2131296808; // aapt resource value: 0x7f090227 - public const int CheckForFileChangesOnSave_summary = 2131296807; + public const int ClearOfflineCache_title = 2131296807; - // aapt resource value: 0x7f090226 - public const int CheckForFileChangesOnSave_title = 2131296806; + // aapt resource value: 0x7f090125 + public const int CopyToClipboardNotification_key = 2131296549; - // aapt resource value: 0x7f090259 - public const int CheckingDatabaseForChanges = 2131296857; + // aapt resource value: 0x7f09025e + public const int CouldNotLoadFromRemote = 2131296862; - // aapt resource value: 0x7f09024d - public const int CheckingTargetFileForChanges = 2131296845; + // aapt resource value: 0x7f09025d + public const int CouldNotSaveToRemote = 2131296861; - // aapt resource value: 0x7f09014e - public const int ClearClipboard = 2131296590; + // aapt resource value: 0x7f090292 + public const int CouldntLoadOtpAuxFile = 2131296914; - // aapt resource value: 0x7f090225 - public const int ClearOfflineCache_question = 2131296805; + // aapt resource value: 0x7f090293 + public const int CouldntLoadOtpAuxFile_Hint = 2131296915; - // aapt resource value: 0x7f090224 - public const int ClearOfflineCache_title = 2131296804; - - // aapt resource value: 0x7f090124 - public const int CopyToClipboardNotification_key = 2131296548; - - // aapt resource value: 0x7f09025b - public const int CouldNotLoadFromRemote = 2131296859; - - // aapt resource value: 0x7f09025a - public const int CouldNotSaveToRemote = 2131296858; - - // aapt resource value: 0x7f09028f - public const int CouldntLoadOtpAuxFile = 2131296911; - - // aapt resource value: 0x7f090290 - public const int CouldntLoadOtpAuxFile_Hint = 2131296912; - - // aapt resource value: 0x7f090296 - public const int CouldntParseOtpSecret = 2131296918; - - // aapt resource value: 0x7f090130 - public const int CreditsText = 2131296560; + // aapt resource value: 0x7f090299 + public const int CouldntParseOtpSecret = 2131296921; // aapt resource value: 0x7f090131 - public const int CreditsTextSFTP = 2131296561; + public const int CreditsText = 2131296561; - // aapt resource value: 0x7f09024b - public const int DecodingDatabase = 2131296843; + // aapt resource value: 0x7f090132 + public const int CreditsTextSFTP = 2131296562; - // aapt resource value: 0x7f090246 - public const int DeletingEntry = 2131296838; + // aapt resource value: 0x7f09024e + public const int DecodingDatabase = 2131296846; - // aapt resource value: 0x7f090247 - public const int DeletingGroup = 2131296839; + // aapt resource value: 0x7f090249 + public const int DeletingEntry = 2131296841; - // aapt resource value: 0x7f090254 - public const int DownloadingRemoteFile = 2131296852; + // aapt resource value: 0x7f09024a + public const int DeletingGroup = 2131296842; - // aapt resource value: 0x7f090266 - public const int ErrorOcurred = 2131296870; + // aapt resource value: 0x7f090257 + public const int DownloadingRemoteFile = 2131296855; - // aapt resource value: 0x7f090298 - public const int ErrorUpdatingOtpAuxFile = 2131296920; + // aapt resource value: 0x7f090269 + public const int ErrorOcurred = 2131296873; - // aapt resource value: 0x7f09014a - public const int FileHandling_prefs = 2131296586; + // aapt resource value: 0x7f09029b + public const int ErrorUpdatingOtpAuxFile = 2131296923; + + // aapt resource value: 0x7f09014b + public const int FileHandling_prefs = 2131296587; // aapt resource value: 0x7f090114 public const int FileHandling_prefs_key = 2131296532; - // aapt resource value: 0x7f090180 - public const int FileNotFound = 2131296640; + // aapt resource value: 0x7f090181 + public const int FileNotFound = 2131296641; - // aapt resource value: 0x7f090257 - public const int FilesInSync = 2131296855; + // aapt resource value: 0x7f09025a + public const int FilesInSync = 2131296858; - // aapt resource value: 0x7f090191 - public const int InvalidPassword = 2131296657; + // aapt resource value: 0x7f090192 + public const int InvalidPassword = 2131296658; // aapt resource value: 0x7f09011b public const int LastInfoVersionCode_key = 2131296539; - // aapt resource value: 0x7f09025e - public const int LoadedFromRemoteInSync = 2131296862; + // aapt resource value: 0x7f090261 + public const int LoadedFromRemoteInSync = 2131296865; + + // aapt resource value: 0x7f09011e + public const int LockWhenNavigateBack_key = 2131296542; + + // aapt resource value: 0x7f090222 + public const int LockWhenNavigateBack_summary = 2131296802; + + // aapt resource value: 0x7f090221 + public const int LockWhenNavigateBack_title = 2131296801; // aapt resource value: 0x7f09011d public const int LockWhenScreenOff_key = 2131296541; + // aapt resource value: 0x7f090220 + public const int LockWhenScreenOff_summary = 2131296800; + // aapt resource value: 0x7f09021f - public const int LockWhenScreenOff_summary = 2131296799; + public const int LockWhenScreenOff_title = 2131296799; - // aapt resource value: 0x7f09021e - public const int LockWhenScreenOff_title = 2131296798; + // aapt resource value: 0x7f090122 + public const int MarketURL = 2131296546; - // aapt resource value: 0x7f090121 - public const int MarketURL = 2131296545; - - // aapt resource value: 0x7f09019b - public const int MaskedPassword = 2131296667; - - // aapt resource value: 0x7f09024f - public const int MessageSyncQuestion = 2131296847; + // aapt resource value: 0x7f09019c + public const int MaskedPassword = 2131296668; // aapt resource value: 0x7f090252 - public const int NoOverwrite = 2131296850; + public const int MessageSyncQuestion = 2131296850; - // aapt resource value: 0x7f09025d - public const int NotifyOpenFromLocalDueToConflict = 2131296861; + // aapt resource value: 0x7f090255 + public const int NoOverwrite = 2131296853; - // aapt resource value: 0x7f090126 - public const int OpenKp2aKeyboardAutomatically_key = 2131296550; + // aapt resource value: 0x7f090260 + public const int NotifyOpenFromLocalDueToConflict = 2131296864; - // aapt resource value: 0x7f09022d - public const int OpenKp2aKeyboardAutomatically_summary = 2131296813; + // aapt resource value: 0x7f090127 + public const int OpenKp2aKeyboardAutomatically_key = 2131296551; - // aapt resource value: 0x7f09022c - public const int OpenKp2aKeyboardAutomatically_title = 2131296812; + // aapt resource value: 0x7f090230 + public const int OpenKp2aKeyboardAutomatically_summary = 2131296816; - // aapt resource value: 0x7f090297 - public const int OtpKeyError = 2131296919; + // aapt resource value: 0x7f09022f + public const int OpenKp2aKeyboardAutomatically_title = 2131296815; - // aapt resource value: 0x7f09024c - public const int ParsingDatabase = 2131296844; + // aapt resource value: 0x7f09029a + public const int OtpKeyError = 2131296922; - // aapt resource value: 0x7f09012c - public const int PreloadDatabaseEnabled_key = 2131296556; + // aapt resource value: 0x7f09024f + public const int ParsingDatabase = 2131296847; - // aapt resource value: 0x7f090233 - public const int PreloadDatabaseEnabled_summary = 2131296819; + // aapt resource value: 0x7f09012d + public const int PreloadDatabaseEnabled_key = 2131296557; - // aapt resource value: 0x7f090232 - public const int PreloadDatabaseEnabled_title = 2131296818; + // aapt resource value: 0x7f090236 + public const int PreloadDatabaseEnabled_summary = 2131296822; + + // aapt resource value: 0x7f090235 + public const int PreloadDatabaseEnabled_title = 2131296821; // aapt resource value: 0x7f090115 public const int QuickUnlockDefaultEnabled_key = 2131296533; - // aapt resource value: 0x7f0901ff - public const int QuickUnlockDefaultEnabled_summary = 2131296767; + // aapt resource value: 0x7f090200 + public const int QuickUnlockDefaultEnabled_summary = 2131296768; - // aapt resource value: 0x7f0901fe - public const int QuickUnlockDefaultEnabled_title = 2131296766; + // aapt resource value: 0x7f0901ff + public const int QuickUnlockDefaultEnabled_title = 2131296767; // aapt resource value: 0x7f090119 public const int QuickUnlockIconHidden16_key = 2131296537; - // aapt resource value: 0x7f090203 - public const int QuickUnlockIconHidden16_summary = 2131296771; + // aapt resource value: 0x7f090204 + public const int QuickUnlockIconHidden16_summary = 2131296772; - // aapt resource value: 0x7f090202 - public const int QuickUnlockIconHidden16_title = 2131296770; + // aapt resource value: 0x7f090203 + public const int QuickUnlockIconHidden16_title = 2131296771; // aapt resource value: 0x7f090118 public const int QuickUnlockIconHidden_key = 2131296536; - // aapt resource value: 0x7f090201 - public const int QuickUnlockIconHidden_summary = 2131296769; + // aapt resource value: 0x7f090202 + public const int QuickUnlockIconHidden_summary = 2131296770; - // aapt resource value: 0x7f090200 - public const int QuickUnlockIconHidden_title = 2131296768; + // aapt resource value: 0x7f090201 + public const int QuickUnlockIconHidden_title = 2131296769; // aapt resource value: 0x7f090117 public const int QuickUnlockLength_default = 2131296535; @@ -3656,164 +3665,164 @@ namespace keepass2android // aapt resource value: 0x7f090116 public const int QuickUnlockLength_key = 2131296534; - // aapt resource value: 0x7f090205 - public const int QuickUnlockLength_summary = 2131296773; - - // aapt resource value: 0x7f090204 - public const int QuickUnlockLength_title = 2131296772; - - // aapt resource value: 0x7f0901fc - public const int QuickUnlock_button = 2131296764; - // aapt resource value: 0x7f090206 - public const int QuickUnlock_fail = 2131296774; + public const int QuickUnlockLength_summary = 2131296774; - // aapt resource value: 0x7f0901fb - public const int QuickUnlock_label = 2131296763; + // aapt resource value: 0x7f090205 + public const int QuickUnlockLength_title = 2131296773; // aapt resource value: 0x7f0901fd - public const int QuickUnlock_lockButton = 2131296765; + public const int QuickUnlock_button = 2131296765; - // aapt resource value: 0x7f090149 - public const int QuickUnlock_prefs = 2131296585; + // aapt resource value: 0x7f090207 + public const int QuickUnlock_fail = 2131296775; + + // aapt resource value: 0x7f0901fc + public const int QuickUnlock_label = 2131296764; + + // aapt resource value: 0x7f0901fe + public const int QuickUnlock_lockButton = 2131296766; + + // aapt resource value: 0x7f09014a + public const int QuickUnlock_prefs = 2131296586; // aapt resource value: 0x7f090113 public const int QuickUnlock_prefs_key = 2131296531; - // aapt resource value: 0x7f090239 - public const int RecycleBin = 2131296825; + // aapt resource value: 0x7f09023c + public const int RecycleBin = 2131296828; // aapt resource value: 0x7f09010b public const int RememberRecentFiles_key = 2131296523; + // aapt resource value: 0x7f0901f0 + public const int RememberRecentFiles_summary = 2131296752; + // aapt resource value: 0x7f0901ef - public const int RememberRecentFiles_summary = 2131296751; + public const int RememberRecentFiles_title = 2131296751; - // aapt resource value: 0x7f0901ee - public const int RememberRecentFiles_title = 2131296750; + // aapt resource value: 0x7f090263 + public const int RemoteDatabaseUnchanged = 2131296867; - // aapt resource value: 0x7f090260 - public const int RemoteDatabaseUnchanged = 2131296864; + // aapt resource value: 0x7f090265 + public const int ResolvedCacheConflictByUsingLocalOtpAux = 2131296869; - // aapt resource value: 0x7f090262 - public const int ResolvedCacheConflictByUsingLocalOtpAux = 2131296866; + // aapt resource value: 0x7f090264 + public const int ResolvedCacheConflictByUsingRemoteOtpAux = 2131296868; - // aapt resource value: 0x7f090261 - public const int ResolvedCacheConflictByUsingRemoteOtpAux = 2131296865; + // aapt resource value: 0x7f090259 + public const int RestoringRemoteFile = 2131296857; - // aapt resource value: 0x7f090256 - public const int RestoringRemoteFile = 2131296854; + // aapt resource value: 0x7f0902a9 + public const int SCOPE_CURRENT_ENTRY_explanation = 2131296937; + + // aapt resource value: 0x7f0902a8 + public const int SCOPE_CURRENT_ENTRY_title = 2131296936; + + // aapt resource value: 0x7f0902a7 + public const int SCOPE_DATABASE_ACTIONS_explanation = 2131296935; // aapt resource value: 0x7f0902a6 - public const int SCOPE_CURRENT_ENTRY_explanation = 2131296934; - - // aapt resource value: 0x7f0902a5 - public const int SCOPE_CURRENT_ENTRY_title = 2131296933; - - // aapt resource value: 0x7f0902a4 - public const int SCOPE_DATABASE_ACTIONS_explanation = 2131296932; - - // aapt resource value: 0x7f0902a3 - public const int SCOPE_DATABASE_ACTIONS_title = 2131296931; - - // aapt resource value: 0x7f09020c - public const int SaveAttachmentDialog_open = 2131296780; - - // aapt resource value: 0x7f09020b - public const int SaveAttachmentDialog_save = 2131296779; - - // aapt resource value: 0x7f09020a - public const int SaveAttachmentDialog_text = 2131296778; - - // aapt resource value: 0x7f090209 - public const int SaveAttachmentDialog_title = 2131296777; - - // aapt resource value: 0x7f09020e - public const int SaveAttachment_Failed = 2131296782; + public const int SCOPE_DATABASE_ACTIONS_title = 2131296934; // aapt resource value: 0x7f09020d - public const int SaveAttachment_doneMessage = 2131296781; + public const int SaveAttachmentDialog_open = 2131296781; - // aapt resource value: 0x7f090299 - public const int SavingOtpAuxFile = 2131296921; + // aapt resource value: 0x7f09020c + public const int SaveAttachmentDialog_save = 2131296780; - // aapt resource value: 0x7f090248 - public const int SettingPassword = 2131296840; + // aapt resource value: 0x7f09020b + public const int SaveAttachmentDialog_text = 2131296779; - // aapt resource value: 0x7f090229 - public const int ShowCopyToClipboardNotification_summary = 2131296809; + // aapt resource value: 0x7f09020a + public const int SaveAttachmentDialog_title = 2131296778; - // aapt resource value: 0x7f090228 - public const int ShowCopyToClipboardNotification_title = 2131296808; + // aapt resource value: 0x7f09020f + public const int SaveAttachment_Failed = 2131296783; + + // aapt resource value: 0x7f09020e + public const int SaveAttachment_doneMessage = 2131296782; + + // aapt resource value: 0x7f09029c + public const int SavingOtpAuxFile = 2131296924; + + // aapt resource value: 0x7f09024b + public const int SettingPassword = 2131296843; + + // aapt resource value: 0x7f09022c + public const int ShowCopyToClipboardNotification_summary = 2131296812; // aapt resource value: 0x7f09022b - public const int ShowKp2aKeyboardNotification_summary = 2131296811; + public const int ShowCopyToClipboardNotification_title = 2131296811; - // aapt resource value: 0x7f09022a - public const int ShowKp2aKeyboardNotification_title = 2131296810; + // aapt resource value: 0x7f09022e + public const int ShowKp2aKeyboardNotification_summary = 2131296814; - // aapt resource value: 0x7f09012b - public const int ShowUnlockedNotification_key = 2131296555; + // aapt resource value: 0x7f09022d + public const int ShowKp2aKeyboardNotification_title = 2131296813; - // aapt resource value: 0x7f090231 - public const int ShowUnlockedNotification_summary = 2131296817; + // aapt resource value: 0x7f09012c + public const int ShowUnlockedNotification_key = 2131296556; - // aapt resource value: 0x7f090230 - public const int ShowUnlockedNotification_title = 2131296816; + // aapt resource value: 0x7f090234 + public const int ShowUnlockedNotification_summary = 2131296820; + + // aapt resource value: 0x7f090233 + public const int ShowUnlockedNotification_title = 2131296819; // aapt resource value: 0x7f09010a public const int ShowUsernameInList_key = 2131296522; + // aapt resource value: 0x7f0901ee + public const int ShowUsernameInList_summary = 2131296750; + // aapt resource value: 0x7f0901ed - public const int ShowUsernameInList_summary = 2131296749; + public const int ShowUsernameInList_title = 2131296749; - // aapt resource value: 0x7f0901ec - public const int ShowUsernameInList_title = 2131296748; + // aapt resource value: 0x7f090123 + public const int SuggestionsURL = 2131296547; - // aapt resource value: 0x7f090122 - public const int SuggestionsURL = 2131296546; + // aapt resource value: 0x7f09025b + public const int SynchronizedDatabaseSuccessfully = 2131296859; - // aapt resource value: 0x7f090258 - public const int SynchronizedDatabaseSuccessfully = 2131296856; + // aapt resource value: 0x7f090256 + public const int SynchronizingCachedDatabase = 2131296854; // aapt resource value: 0x7f090253 - public const int SynchronizingCachedDatabase = 2131296851; + public const int SynchronizingDatabase = 2131296851; - // aapt resource value: 0x7f090250 - public const int SynchronizingDatabase = 2131296848; - - // aapt resource value: 0x7f090263 - public const int SynchronizingOtpAuxFile = 2131296867; + // aapt resource value: 0x7f090266 + public const int SynchronizingOtpAuxFile = 2131296870; // aapt resource value: 0x7f090109 public const int TanExpiresOnUse_key = 2131296521; + // aapt resource value: 0x7f0901ec + public const int TanExpiresOnUse_summary = 2131296748; + // aapt resource value: 0x7f0901eb - public const int TanExpiresOnUse_summary = 2131296747; + public const int TanExpiresOnUse_title = 2131296747; - // aapt resource value: 0x7f0901ea - public const int TanExpiresOnUse_title = 2131296746; + // aapt resource value: 0x7f090251 + public const int TitleSyncQuestion = 2131296849; - // aapt resource value: 0x7f09024e - public const int TitleSyncQuestion = 2131296846; + // aapt resource value: 0x7f09024d + public const int TransformingKey = 2131296845; - // aapt resource value: 0x7f09024a - public const int TransformingKey = 2131296842; + // aapt resource value: 0x7f090124 + public const int TranslationURL = 2131296548; - // aapt resource value: 0x7f090123 - public const int TranslationURL = 2131296547; + // aapt resource value: 0x7f09024c + public const int UndoingChanges = 2131296844; - // aapt resource value: 0x7f090249 - public const int UndoingChanges = 2131296841; + // aapt resource value: 0x7f090262 + public const int UpdatedCachedFileOnLoad = 2131296866; // aapt resource value: 0x7f09025f - public const int UpdatedCachedFileOnLoad = 2131296863; + public const int UpdatedRemoteFileOnLoad = 2131296863; - // aapt resource value: 0x7f09025c - public const int UpdatedRemoteFileOnLoad = 2131296860; - - // aapt resource value: 0x7f090255 - public const int UploadingFile = 2131296853; + // aapt resource value: 0x7f090258 + public const int UploadingFile = 2131296856; // aapt resource value: 0x7f09011a public const int UsageCount_key = 2131296538; @@ -3821,53 +3830,53 @@ namespace keepass2android // aapt resource value: 0x7f09011c public const int UseFileTransactions_key = 2131296540; + // aapt resource value: 0x7f09021e + public const int UseFileTransactions_summary = 2131296798; + // aapt resource value: 0x7f09021d - public const int UseFileTransactions_summary = 2131296797; + public const int UseFileTransactions_title = 2131296797; - // aapt resource value: 0x7f09021c - public const int UseFileTransactions_title = 2131296796; + // aapt resource value: 0x7f090126 + public const int UseKp2aKeyboard_key = 2131296550; - // aapt resource value: 0x7f090125 - public const int UseKp2aKeyboard_key = 2131296549; + // aapt resource value: 0x7f09011f + public const int UseOfflineCache_key = 2131296543; - // aapt resource value: 0x7f09011e - public const int UseOfflineCache_key = 2131296542; + // aapt resource value: 0x7f090224 + public const int UseOfflineCache_summary = 2131296804; - // aapt resource value: 0x7f090221 - public const int UseOfflineCache_summary = 2131296801; + // aapt resource value: 0x7f090223 + public const int UseOfflineCache_title = 2131296803; - // aapt resource value: 0x7f090220 - public const int UseOfflineCache_title = 2131296800; - - // aapt resource value: 0x7f090251 - public const int YesSynchronize = 2131296849; - - // aapt resource value: 0x7f09012d - public const int about_feedback = 2131296557; + // aapt resource value: 0x7f090254 + public const int YesSynchronize = 2131296852; // aapt resource value: 0x7f09012e - public const int about_homepage = 2131296558; + public const int about_feedback = 2131296558; - // aapt resource value: 0x7f090132 - public const int accept = 2131296562; + // aapt resource value: 0x7f09012f + public const int about_homepage = 2131296559; - // aapt resource value: 0x7f090216 - public const int add_binary = 2131296790; - - // aapt resource value: 0x7f090134 - public const int add_entry = 2131296564; + // aapt resource value: 0x7f090133 + public const int accept = 2131296563; // aapt resource value: 0x7f090217 - public const int add_extra_string = 2131296791; - - // aapt resource value: 0x7f090136 - public const int add_group = 2131296566; - - // aapt resource value: 0x7f090137 - public const int add_group_title = 2131296567; + public const int add_binary = 2131296791; // aapt resource value: 0x7f090135 - public const int add_url_entry = 2131296565; + public const int add_entry = 2131296565; + + // aapt resource value: 0x7f090218 + public const int add_extra_string = 2131296792; + + // aapt resource value: 0x7f090137 + public const int add_group = 2131296567; + + // aapt resource value: 0x7f090138 + public const int add_group_title = 2131296568; + + // aapt resource value: 0x7f090136 + public const int add_url_entry = 2131296566; // aapt resource value: 0x7f09005a public const int added_word = 2131296346; @@ -4052,11 +4061,11 @@ namespace keepass2android // aapt resource value: 0x7f0900ef public const int afc_yesterday = 2131296495; - // aapt resource value: 0x7f090139 - public const int algorithm = 2131296569; - // aapt resource value: 0x7f09013a - public const int algorithm_colon = 2131296570; + public const int algorithm = 2131296570; + + // aapt resource value: 0x7f09013b + public const int algorithm_colon = 2131296571; // aapt resource value: 0x7f0900fc public const int algorithm_key = 2131296508; @@ -4139,26 +4148,26 @@ namespace keepass2android // aapt resource value: 0x7f0900fd public const int app_key = 2131296509; - // aapt resource value: 0x7f09013b - public const int app_name = 2131296571; + // aapt resource value: 0x7f09013c + public const int app_name = 2131296572; - // aapt resource value: 0x7f09013d - public const int app_name_nonet = 2131296573; + // aapt resource value: 0x7f09013e + public const int app_name_nonet = 2131296574; - // aapt resource value: 0x7f09013f - public const int app_timeout = 2131296575; + // aapt resource value: 0x7f090140 + public const int app_timeout = 2131296576; // aapt resource value: 0x7f0900fe public const int app_timeout_key = 2131296510; - // aapt resource value: 0x7f090140 - public const int app_timeout_summary = 2131296576; - - // aapt resource value: 0x7f090144 - public const int application = 2131296580; + // aapt resource value: 0x7f090141 + public const int app_timeout_summary = 2131296577; // aapt resource value: 0x7f090145 - public const int application_settings = 2131296581; + public const int application = 2131296581; + + // aapt resource value: 0x7f090146 + public const int application_settings = 2131296582; // aapt resource value: 0x7f090010 public const int auth_client_needs_enabling_title = 2131296272; @@ -4178,8 +4187,8 @@ namespace keepass2android // aapt resource value: 0x7f09000f public const int auth_client_using_bad_version_title = 2131296271; - // aapt resource value: 0x7f0901e2 - public const int author = 2131296738; + // aapt resource value: 0x7f0901e3 + public const int author = 2131296739; // aapt resource value: 0x7f090047 public const int auto_cap = 2131296327; @@ -4214,8 +4223,8 @@ namespace keepass2android // aapt resource value: 0x7f090088 public const int auto_submit_summary = 2131296392; - // aapt resource value: 0x7f090153 - public const int available_through_keyboard = 2131296595; + // aapt resource value: 0x7f090154 + public const int available_through_keyboard = 2131296596; // aapt resource value: 0x7f090055 public const int bigram_suggestion = 2131296341; @@ -4223,38 +4232,38 @@ namespace keepass2android // aapt resource value: 0x7f090056 public const int bigram_suggestion_summary = 2131296342; - // aapt resource value: 0x7f09014d - public const int brackets = 2131296589; + // aapt resource value: 0x7f09014e + public const int brackets = 2131296590; - // aapt resource value: 0x7f0902bf - public const int browser_intall_text = 2131296959; + // aapt resource value: 0x7f0902c2 + public const int browser_intall_text = 2131296962; - // aapt resource value: 0x7f0902c0 - public const int building_search_idx = 2131296960; + // aapt resource value: 0x7f0902c3 + public const int building_search_idx = 2131296963; - // aapt resource value: 0x7f090283 - public const int button_change_location = 2131296899; + // aapt resource value: 0x7f090286 + public const int button_change_location = 2131296902; // aapt resource value: 0x7f090081 public const int cancel = 2131296385; - // aapt resource value: 0x7f0901f3 - public const int caseSensitive = 2131296755; + // aapt resource value: 0x7f0901f4 + public const int caseSensitive = 2131296756; // aapt resource value: 0x7f0900a5 public const int change_entry = 2131296421; - // aapt resource value: 0x7f09014f - public const int clipboard_timeout = 2131296591; + // aapt resource value: 0x7f090150 + public const int clipboard_timeout = 2131296592; - // aapt resource value: 0x7f090127 - public const int clipboard_timeout_default = 2131296551; + // aapt resource value: 0x7f090128 + public const int clipboard_timeout_default = 2131296552; // aapt resource value: 0x7f090100 public const int clipboard_timeout_key = 2131296512; - // aapt resource value: 0x7f090150 - public const int clipboard_timeout_summary = 2131296592; + // aapt resource value: 0x7f090151 + public const int clipboard_timeout_summary = 2131296593; // aapt resource value: 0x7f09008a public const int close_the_keyboard = 2131296394; @@ -4304,56 +4313,56 @@ namespace keepass2android // aapt resource value: 0x7f09000e public const int common_signin_button_text_long = 2131296270; - // aapt resource value: 0x7f0901e8 - public const int contributors = 2131296744; + // aapt resource value: 0x7f0901e9 + public const int contributors = 2131296745; + + // aapt resource value: 0x7f090153 + public const int copy_password = 2131296595; // aapt resource value: 0x7f090152 - public const int copy_password = 2131296594; + public const int copy_username = 2131296594; - // aapt resource value: 0x7f090151 - public const int copy_username = 2131296593; - - // aapt resource value: 0x7f0901bf - public const int create_database = 2131296703; - - // aapt resource value: 0x7f090156 - public const int creating_db_key = 2131296598; - - // aapt resource value: 0x7f09021b - public const int credentials_dialog_title = 2131296795; - - // aapt resource value: 0x7f0901e5 - public const int credit_android_filechooser = 2131296741; - - // aapt resource value: 0x7f0901e6 - public const int credit_keyboard = 2131296742; - - // aapt resource value: 0x7f0901e4 - public const int credit_plugin1 = 2131296740; + // aapt resource value: 0x7f0901c0 + public const int create_database = 2131296704; // aapt resource value: 0x7f090157 - public const int current_group = 2131296599; + public const int creating_db_key = 2131296599; + + // aapt resource value: 0x7f09021c + public const int credentials_dialog_title = 2131296796; + + // aapt resource value: 0x7f0901e6 + public const int credit_android_filechooser = 2131296742; + + // aapt resource value: 0x7f0901e7 + public const int credit_keyboard = 2131296743; + + // aapt resource value: 0x7f0901e5 + public const int credit_plugin1 = 2131296741; // aapt resource value: 0x7f090158 - public const int current_group_root = 2131296600; + public const int current_group = 2131296600; // aapt resource value: 0x7f090159 - public const int database = 2131296601; + public const int current_group_root = 2131296601; - // aapt resource value: 0x7f090264 - public const int database_file = 2131296868; + // aapt resource value: 0x7f09015a + public const int database = 2131296602; - // aapt resource value: 0x7f090219 - public const int database_loaded_quickunlock_enabled = 2131296793; + // aapt resource value: 0x7f090267 + public const int database_file = 2131296871; // aapt resource value: 0x7f09021a - public const int database_loaded_unlocked = 2131296794; + public const int database_loaded_quickunlock_enabled = 2131296794; - // aapt resource value: 0x7f090280 - public const int database_location = 2131296896; + // aapt resource value: 0x7f09021b + public const int database_loaded_unlocked = 2131296795; - // aapt resource value: 0x7f0901c9 - public const int database_name = 2131296713; + // aapt resource value: 0x7f090283 + public const int database_location = 2131296899; + + // aapt resource value: 0x7f0901ca + public const int database_name = 2131296714; // aapt resource value: 0x7f09010d public const int database_name_key = 2131296525; @@ -4361,77 +4370,77 @@ namespace keepass2android // aapt resource value: 0x7f090101 public const int db_key = 2131296513; - // aapt resource value: 0x7f0902c1 - public const int decrypting_db = 2131296961; + // aapt resource value: 0x7f0902c4 + public const int decrypting_db = 2131296964; - // aapt resource value: 0x7f0902c2 - public const int decrypting_entry = 2131296962; + // aapt resource value: 0x7f0902c5 + public const int decrypting_entry = 2131296965; - // aapt resource value: 0x7f0902c3 - public const int default_checkbox = 2131296963; + // aapt resource value: 0x7f0902c6 + public const int default_checkbox = 2131296966; // aapt resource value: 0x7f0900f3 public const int default_file_path = 2131296499; - // aapt resource value: 0x7f0901ca - public const int default_username = 2131296714; + // aapt resource value: 0x7f0901cb + public const int default_username = 2131296715; // aapt resource value: 0x7f09010c public const int default_username_key = 2131296524; - // aapt resource value: 0x7f090218 - public const int delete_extra_string = 2131296792; + // aapt resource value: 0x7f090219 + public const int delete_extra_string = 2131296793; - // aapt resource value: 0x7f090133 - public const int deny = 2131296563; + // aapt resource value: 0x7f090134 + public const int deny = 2131296564; - // aapt resource value: 0x7f090129 - public const int design_default = 2131296553; + // aapt resource value: 0x7f09012a + public const int design_default = 2131296554; // aapt resource value: 0x7f090107 public const int design_key = 2131296519; - // aapt resource value: 0x7f0902bb - public const int design_title = 2131296955; - - // aapt resource value: 0x7f09015a - public const int digits = 2131296602; + // aapt resource value: 0x7f0902be + public const int design_title = 2131296958; // aapt resource value: 0x7f09015b - public const int disclaimer_formal = 2131296603; + public const int digits = 2131296603; - // aapt resource value: 0x7f090147 - public const int display_prefs = 2131296583; + // aapt resource value: 0x7f09015c + public const int disclaimer_formal = 2131296604; + + // aapt resource value: 0x7f090148 + public const int display_prefs = 2131296584; // aapt resource value: 0x7f090112 public const int display_prefs_key = 2131296530; - // aapt resource value: 0x7f09026a - public const int donate_bday_question = 2131296874; + // aapt resource value: 0x7f09026d + public const int donate_bday_question = 2131296877; - // aapt resource value: 0x7f09026b - public const int donate_missedbday_question = 2131296875; + // aapt resource value: 0x7f09026e + public const int donate_missedbday_question = 2131296878; - // aapt resource value: 0x7f090269 - public const int donate_question = 2131296873; + // aapt resource value: 0x7f09026c + public const int donate_question = 2131296876; // aapt resource value: 0x7f0900f4 public const int donate_url = 2131296500; - // aapt resource value: 0x7f090138 - public const int edit_group_title = 2131296568; + // aapt resource value: 0x7f090139 + public const int edit_group_title = 2131296569; - // aapt resource value: 0x7f09015c - public const int ellipsis = 2131296604; + // aapt resource value: 0x7f09015d + public const int ellipsis = 2131296605; - // aapt resource value: 0x7f0902bd - public const int enable_plugin_question = 2131296957; + // aapt resource value: 0x7f0902c0 + public const int enable_plugin_question = 2131296960; - // aapt resource value: 0x7f0902bc - public const int enable_plugin_title = 2131296956; + // aapt resource value: 0x7f0902bf + public const int enable_plugin_title = 2131296959; - // aapt resource value: 0x7f0901fa - public const int enable_quickunlock = 2131296762; + // aapt resource value: 0x7f0901fb + public const int enable_quickunlock = 2131296763; // aapt resource value: 0x7f0900a3 public const int english_ime_debug_settings = 2131296419; @@ -4445,287 +4454,287 @@ namespace keepass2android // aapt resource value: 0x7f090036 public const int english_ime_settings = 2131296310; - // aapt resource value: 0x7f09015d - public const int enter_filename = 2131296605; + // aapt resource value: 0x7f09015e + public const int enter_filename = 2131296606; + + // aapt resource value: 0x7f0901fa + public const int enter_filename_details_create_import = 2131296762; // aapt resource value: 0x7f0901f9 - public const int enter_filename_details_create_import = 2131296761; - - // aapt resource value: 0x7f0901f8 - public const int enter_filename_details_url = 2131296760; - - // aapt resource value: 0x7f090271 - public const int enter_sftp_login_title = 2131296881; - - // aapt resource value: 0x7f09015e - public const int entry_accessed = 2131296606; - - // aapt resource value: 0x7f0902c4 - public const int entry_and_or = 2131296964; - - // aapt resource value: 0x7f09016e - public const int entry_binaries = 2131296622; - - // aapt resource value: 0x7f09015f - public const int entry_cancel = 2131296607; - - // aapt resource value: 0x7f090160 - public const int entry_comment = 2131296608; - - // aapt resource value: 0x7f090163 - public const int entry_confpassword = 2131296611; - - // aapt resource value: 0x7f090164 - public const int entry_created = 2131296612; - - // aapt resource value: 0x7f090165 - public const int entry_expires = 2131296613; - - // aapt resource value: 0x7f09016d - public const int entry_extra_strings = 2131296621; - - // aapt resource value: 0x7f090166 - public const int entry_keyfile = 2131296614; - - // aapt resource value: 0x7f090167 - public const int entry_modified = 2131296615; - - // aapt resource value: 0x7f090162 - public const int entry_override_url = 2131296610; - - // aapt resource value: 0x7f090168 - public const int entry_password = 2131296616; - - // aapt resource value: 0x7f090169 - public const int entry_save = 2131296617; - - // aapt resource value: 0x7f090161 - public const int entry_tags = 2131296609; - - // aapt resource value: 0x7f09016a - public const int entry_title = 2131296618; - - // aapt resource value: 0x7f09016b - public const int entry_url = 2131296619; - - // aapt resource value: 0x7f09016c - public const int entry_user_name = 2131296620; - - // aapt resource value: 0x7f09028b - public const int error_adding_keyfile = 2131296907; - - // aapt resource value: 0x7f0902c5 - public const int error_arc4 = 2131296965; - - // aapt resource value: 0x7f09016f - public const int error_can_not_handle_uri = 2131296623; - - // aapt resource value: 0x7f090170 - public const int error_could_not_create_group = 2131296624; - - // aapt resource value: 0x7f090171 - public const int error_could_not_create_parent = 2131296625; - - // aapt resource value: 0x7f090172 - public const int error_database_exists = 2131296626; - - // aapt resource value: 0x7f090173 - public const int error_database_settings = 2131296627; - - // aapt resource value: 0x7f090174 - public const int error_failed_to_launch_link = 2131296628; - - // aapt resource value: 0x7f090176 - public const int error_file_not_create = 2131296630; - - // aapt resource value: 0x7f090175 - public const int error_filename_required = 2131296629; - - // aapt resource value: 0x7f090177 - public const int error_invalid_db = 2131296631; - - // aapt resource value: 0x7f090211 - public const int error_invalid_expiry_date = 2131296785; - - // aapt resource value: 0x7f090178 - public const int error_invalid_path = 2131296632; - - // aapt resource value: 0x7f090179 - public const int error_no_name = 2131296633; - - // aapt resource value: 0x7f09017a - public const int error_nopass = 2131296634; - - // aapt resource value: 0x7f0902c6 - public const int error_out_of_memory = 2131296966; - - // aapt resource value: 0x7f09017b - public const int error_pass_gen_type = 2131296635; - - // aapt resource value: 0x7f09017c - public const int error_pass_match = 2131296636; - - // aapt resource value: 0x7f09017d - public const int error_rounds_not_number = 2131296637; - - // aapt resource value: 0x7f0902c7 - public const int error_rounds_too_large = 2131296967; - - // aapt resource value: 0x7f090212 - public const int error_string_key = 2131296786; - - // aapt resource value: 0x7f09017e - public const int error_title_required = 2131296638; - - // aapt resource value: 0x7f09017f - public const int error_wrong_length = 2131296639; - - // aapt resource value: 0x7f0901f1 - public const int excludeExpiredEntries = 2131296753; - - // aapt resource value: 0x7f0901cd - public const int export_database_successful = 2131296717; - - // aapt resource value: 0x7f0902aa - public const int export_fileformats_title = 2131296938; - - // aapt resource value: 0x7f09014c - public const int export_prefs = 2131296588; - - // aapt resource value: 0x7f0901cc - public const int exporting_database = 2131296716; - - // aapt resource value: 0x7f090213 - public const int field_name = 2131296787; - - // aapt resource value: 0x7f090214 - public const int field_value = 2131296788; - - // aapt resource value: 0x7f090181 - public const int file_browser = 2131296641; - - // aapt resource value: 0x7f09027f - public const int filestorage_setup_title = 2131296895; - - // aapt resource value: 0x7f09027b - public const int filestoragehelp_dropboxKP2A = 2131296891; + public const int enter_filename_details_url = 2131296761; // aapt resource value: 0x7f090274 - public const int filestoragename_androidget = 2131296884; + public const int enter_sftp_login_title = 2131296884; - // aapt resource value: 0x7f090275 - public const int filestoragename_androidsend = 2131296885; + // aapt resource value: 0x7f09015f + public const int entry_accessed = 2131296607; - // aapt resource value: 0x7f090279 - public const int filestoragename_dropbox = 2131296889; + // aapt resource value: 0x7f0902c7 + public const int entry_and_or = 2131296967; - // aapt resource value: 0x7f09027a - public const int filestoragename_dropboxKP2A = 2131296890; + // aapt resource value: 0x7f09016f + public const int entry_binaries = 2131296623; - // aapt resource value: 0x7f090273 - public const int filestoragename_file = 2131296883; + // aapt resource value: 0x7f090160 + public const int entry_cancel = 2131296608; - // aapt resource value: 0x7f090276 - public const int filestoragename_ftp = 2131296886; + // aapt resource value: 0x7f090161 + public const int entry_comment = 2131296609; - // aapt resource value: 0x7f09027c - public const int filestoragename_gdrive = 2131296892; + // aapt resource value: 0x7f090164 + public const int entry_confpassword = 2131296612; - // aapt resource value: 0x7f090277 - public const int filestoragename_http = 2131296887; + // aapt resource value: 0x7f090165 + public const int entry_created = 2131296613; - // aapt resource value: 0x7f090278 - public const int filestoragename_https = 2131296888; + // aapt resource value: 0x7f090166 + public const int entry_expires = 2131296614; + + // aapt resource value: 0x7f09016e + public const int entry_extra_strings = 2131296622; + + // aapt resource value: 0x7f090167 + public const int entry_keyfile = 2131296615; + + // aapt resource value: 0x7f090168 + public const int entry_modified = 2131296616; + + // aapt resource value: 0x7f090163 + public const int entry_override_url = 2131296611; + + // aapt resource value: 0x7f090169 + public const int entry_password = 2131296617; + + // aapt resource value: 0x7f09016a + public const int entry_save = 2131296618; + + // aapt resource value: 0x7f090162 + public const int entry_tags = 2131296610; + + // aapt resource value: 0x7f09016b + public const int entry_title = 2131296619; + + // aapt resource value: 0x7f09016c + public const int entry_url = 2131296620; + + // aapt resource value: 0x7f09016d + public const int entry_user_name = 2131296621; + + // aapt resource value: 0x7f09028e + public const int error_adding_keyfile = 2131296910; + + // aapt resource value: 0x7f0902c8 + public const int error_arc4 = 2131296968; + + // aapt resource value: 0x7f090170 + public const int error_can_not_handle_uri = 2131296624; + + // aapt resource value: 0x7f090171 + public const int error_could_not_create_group = 2131296625; + + // aapt resource value: 0x7f090172 + public const int error_could_not_create_parent = 2131296626; + + // aapt resource value: 0x7f090173 + public const int error_database_exists = 2131296627; + + // aapt resource value: 0x7f090174 + public const int error_database_settings = 2131296628; + + // aapt resource value: 0x7f090175 + public const int error_failed_to_launch_link = 2131296629; + + // aapt resource value: 0x7f090177 + public const int error_file_not_create = 2131296631; + + // aapt resource value: 0x7f090176 + public const int error_filename_required = 2131296630; + + // aapt resource value: 0x7f090178 + public const int error_invalid_db = 2131296632; + + // aapt resource value: 0x7f090212 + public const int error_invalid_expiry_date = 2131296786; + + // aapt resource value: 0x7f090179 + public const int error_invalid_path = 2131296633; + + // aapt resource value: 0x7f09017a + public const int error_no_name = 2131296634; + + // aapt resource value: 0x7f09017b + public const int error_nopass = 2131296635; + + // aapt resource value: 0x7f0902c9 + public const int error_out_of_memory = 2131296969; + + // aapt resource value: 0x7f09017c + public const int error_pass_gen_type = 2131296636; + + // aapt resource value: 0x7f09017d + public const int error_pass_match = 2131296637; + + // aapt resource value: 0x7f09017e + public const int error_rounds_not_number = 2131296638; + + // aapt resource value: 0x7f0902ca + public const int error_rounds_too_large = 2131296970; + + // aapt resource value: 0x7f090213 + public const int error_string_key = 2131296787; + + // aapt resource value: 0x7f09017f + public const int error_title_required = 2131296639; + + // aapt resource value: 0x7f090180 + public const int error_wrong_length = 2131296640; + + // aapt resource value: 0x7f0901f2 + public const int excludeExpiredEntries = 2131296754; + + // aapt resource value: 0x7f0901ce + public const int export_database_successful = 2131296718; + + // aapt resource value: 0x7f0902ad + public const int export_fileformats_title = 2131296941; + + // aapt resource value: 0x7f09014d + public const int export_prefs = 2131296589; + + // aapt resource value: 0x7f0901cd + public const int exporting_database = 2131296717; + + // aapt resource value: 0x7f090214 + public const int field_name = 2131296788; + + // aapt resource value: 0x7f090215 + public const int field_value = 2131296789; + + // aapt resource value: 0x7f090182 + public const int file_browser = 2131296642; + + // aapt resource value: 0x7f090282 + public const int filestorage_setup_title = 2131296898; // aapt resource value: 0x7f09027e - public const int filestoragename_sftp = 2131296894; + public const int filestoragehelp_dropboxKP2A = 2131296894; + + // aapt resource value: 0x7f090277 + public const int filestoragename_androidget = 2131296887; + + // aapt resource value: 0x7f090278 + public const int filestoragename_androidsend = 2131296888; + + // aapt resource value: 0x7f09027c + public const int filestoragename_dropbox = 2131296892; // aapt resource value: 0x7f09027d - public const int filestoragename_skydrive = 2131296893; + public const int filestoragename_dropboxKP2A = 2131296893; + + // aapt resource value: 0x7f090276 + public const int filestoragename_file = 2131296886; + + // aapt resource value: 0x7f090279 + public const int filestoragename_ftp = 2131296889; + + // aapt resource value: 0x7f09027f + public const int filestoragename_gdrive = 2131296895; + + // aapt resource value: 0x7f09027a + public const int filestoragename_http = 2131296890; + + // aapt resource value: 0x7f09027b + public const int filestoragename_https = 2131296891; + + // aapt resource value: 0x7f090281 + public const int filestoragename_sftp = 2131296897; + + // aapt resource value: 0x7f090280 + public const int filestoragename_skydrive = 2131296896; // aapt resource value: 0x7f0900f7 public const int further_author_names = 2131296503; - // aapt resource value: 0x7f0901e3 - public const int further_authors = 2131296739; - - // aapt resource value: 0x7f090182 - public const int generate_password = 2131296642; - - // aapt resource value: 0x7f0902a7 - public const int get_regular_version = 2131296935; + // aapt resource value: 0x7f0901e4 + public const int further_authors = 2131296740; // aapt resource value: 0x7f090183 - public const int group = 2131296643; + public const int generate_password = 2131296643; + + // aapt resource value: 0x7f0902aa + public const int get_regular_version = 2131296938; + + // aapt resource value: 0x7f090184 + public const int group = 2131296644; // aapt resource value: 0x7f090096 public const int has_dictionary = 2131296406; - // aapt resource value: 0x7f090281 - public const int help_database_location = 2131296897; + // aapt resource value: 0x7f090284 + public const int help_database_location = 2131296900; + + // aapt resource value: 0x7f09028b + public const int help_key_file = 2131296907; // aapt resource value: 0x7f090288 - public const int help_key_file = 2131296904; - - // aapt resource value: 0x7f090285 - public const int help_master_password = 2131296901; + public const int help_master_password = 2131296904; // aapt resource value: 0x7f090095 public const int hint_add_to_dictionary = 2131296405; - // aapt resource value: 0x7f090184 - public const int hint_comment = 2131296644; - // aapt resource value: 0x7f090185 - public const int hint_conf_pass = 2131296645; - - // aapt resource value: 0x7f090282 - public const int hint_database_location = 2131296898; + public const int hint_comment = 2131296645; // aapt resource value: 0x7f090186 - public const int hint_generated_password = 2131296646; + public const int hint_conf_pass = 2131296646; + + // aapt resource value: 0x7f090285 + public const int hint_database_location = 2131296901; // aapt resource value: 0x7f090187 - public const int hint_group_name = 2131296647; - - // aapt resource value: 0x7f090289 - public const int hint_key_file = 2131296905; + public const int hint_generated_password = 2131296647; // aapt resource value: 0x7f090188 - public const int hint_keyfile = 2131296648; + public const int hint_group_name = 2131296648; + + // aapt resource value: 0x7f09028c + public const int hint_key_file = 2131296908; // aapt resource value: 0x7f090189 - public const int hint_length = 2131296649; - - // aapt resource value: 0x7f09018b - public const int hint_login_pass = 2131296651; - - // aapt resource value: 0x7f090286 - public const int hint_master_password = 2131296902; - - // aapt resource value: 0x7f09018e - public const int hint_override_url = 2131296654; + public const int hint_keyfile = 2131296649; // aapt resource value: 0x7f09018a - public const int hint_pass = 2131296650; - - // aapt resource value: 0x7f09026e - public const int hint_sftp_host = 2131296878; - - // aapt resource value: 0x7f09026f - public const int hint_sftp_port = 2131296879; - - // aapt resource value: 0x7f09018f - public const int hint_tags = 2131296655; + public const int hint_length = 2131296650; // aapt resource value: 0x7f09018c - public const int hint_title = 2131296652; + public const int hint_login_pass = 2131296652; - // aapt resource value: 0x7f09018d - public const int hint_url = 2131296653; + // aapt resource value: 0x7f090289 + public const int hint_master_password = 2131296905; + + // aapt resource value: 0x7f09018f + public const int hint_override_url = 2131296655; + + // aapt resource value: 0x7f09018b + public const int hint_pass = 2131296651; + + // aapt resource value: 0x7f090271 + public const int hint_sftp_host = 2131296881; + + // aapt resource value: 0x7f090272 + public const int hint_sftp_port = 2131296882; // aapt resource value: 0x7f090190 - public const int hint_username = 2131296656; + public const int hint_tags = 2131296656; + + // aapt resource value: 0x7f09018d + public const int hint_title = 2131296653; + + // aapt resource value: 0x7f09018e + public const int hint_url = 2131296654; + + // aapt resource value: 0x7f090191 + public const int hint_username = 2131296657; // aapt resource value: 0x7f09003b public const int hit_correction = 2131296315; @@ -4748,53 +4757,53 @@ namespace keepass2android // aapt resource value: 0x7f0900f2 public const int icon_info = 2131296498; - // aapt resource value: 0x7f09028c - public const int init_otp = 2131296908; + // aapt resource value: 0x7f09028f + public const int init_otp = 2131296911; - // aapt resource value: 0x7f090270 - public const int initial_directory = 2131296880; + // aapt resource value: 0x7f090273 + public const int initial_directory = 2131296883; - // aapt resource value: 0x7f0901d9 - public const int insert_element_here = 2131296729; + // aapt resource value: 0x7f0901da + public const int insert_element_here = 2131296730; - // aapt resource value: 0x7f0902c8 - public const int install_from_market = 2131296968; + // aapt resource value: 0x7f0902cb + public const int install_from_market = 2131296971; - // aapt resource value: 0x7f0902c9 - public const int install_from_website = 2131296969; - - // aapt resource value: 0x7f090192 - public const int invalid_algorithm = 2131296658; + // aapt resource value: 0x7f0902cc + public const int install_from_website = 2131296972; // aapt resource value: 0x7f090193 - public const int invalid_db_sig = 2131296659; + public const int invalid_algorithm = 2131296659; + + // aapt resource value: 0x7f090194 + public const int invalid_db_sig = 2131296660; // aapt resource value: 0x7f0900f8 public const int issues = 2131296504; - // aapt resource value: 0x7f090287 - public const int key_file = 2131296903; + // aapt resource value: 0x7f09028a + public const int key_file = 2131296906; // aapt resource value: 0x7f09009b public const int keyboard_layout = 2131296411; - // aapt resource value: 0x7f09014b - public const int keyboard_prefs = 2131296587; + // aapt resource value: 0x7f09014c + public const int keyboard_prefs = 2131296588; // aapt resource value: 0x7f09008c public const int keyboard_settings = 2131296396; - // aapt resource value: 0x7f090194 - public const int keyfile_does_not_exist = 2131296660; - // aapt resource value: 0x7f090195 - public const int keyfile_is_empty = 2131296661; + public const int keyfile_does_not_exist = 2131296661; + + // aapt resource value: 0x7f090196 + public const int keyfile_is_empty = 2131296662; // aapt resource value: 0x7f090103 public const int keyfile_key = 2131296515; - // aapt resource value: 0x7f090141 - public const int kill_app_label = 2131296577; + // aapt resource value: 0x7f090142 + public const int kill_app_label = 2131296578; // aapt resource value: 0x7f0900ab public const int kp2a_auto_fill = 2131296427; @@ -4802,8 +4811,8 @@ namespace keepass2android // aapt resource value: 0x7f0900ac public const int kp2a_auto_fill_summary = 2131296428; - // aapt resource value: 0x7f0901f0 - public const int kp2a_findUrl = 2131296752; + // aapt resource value: 0x7f0901f1 + public const int kp2a_findUrl = 2131296753; // aapt resource value: 0x7f0900b1 public const int kp2a_lock_on_sendgodone = 2131296433; @@ -4835,11 +4844,11 @@ namespace keepass2android // aapt resource value: 0x7f0900b4 public const int kp2a_switch_on_sendgodone_summary = 2131296436; - // aapt resource value: 0x7f09022e - public const int kp2a_switch_rooted = 2131296814; + // aapt resource value: 0x7f090231 + public const int kp2a_switch_rooted = 2131296817; - // aapt resource value: 0x7f09022f - public const int kp2a_switch_rooted_summary = 2131296815; + // aapt resource value: 0x7f090232 + public const int kp2a_switch_rooted_summary = 2131296818; // aapt resource value: 0x7f0900a8 public const int kp2a_user = 2131296424; @@ -4889,131 +4898,131 @@ namespace keepass2android // aapt resource value: 0x7f09009f public const int layout_stone_normal = 2131296415; - // aapt resource value: 0x7f090196 - public const int length = 2131296662; + // aapt resource value: 0x7f090197 + public const int length = 2131296663; // aapt resource value: 0x7f0900b5 public const int library_name = 2131296437; - // aapt resource value: 0x7f090128 - public const int list_size_default = 2131296552; + // aapt resource value: 0x7f090129 + public const int list_size_default = 2131296553; // aapt resource value: 0x7f090106 public const int list_size_key = 2131296518; - // aapt resource value: 0x7f090198 - public const int list_size_summary = 2131296664; - - // aapt resource value: 0x7f090197 - public const int list_size_title = 2131296663; - - // aapt resource value: 0x7f09029a - public const int loading = 2131296922; - // aapt resource value: 0x7f090199 - public const int loading_database = 2131296665; + public const int list_size_summary = 2131296665; + + // aapt resource value: 0x7f090198 + public const int list_size_title = 2131296664; + + // aapt resource value: 0x7f09029d + public const int loading = 2131296925; // aapt resource value: 0x7f09019a - public const int lowercase = 2131296666; + public const int loading_database = 2131296666; + + // aapt resource value: 0x7f09019b + public const int lowercase = 2131296667; // aapt resource value: 0x7f090104 public const int maskpass_key = 2131296516; - // aapt resource value: 0x7f09019d - public const int maskpass_summary = 2131296669; - - // aapt resource value: 0x7f09019c - public const int maskpass_title = 2131296668; - - // aapt resource value: 0x7f0901bd - public const int master_key_type = 2131296701; - - // aapt resource value: 0x7f090284 - public const int master_password = 2131296900; - // aapt resource value: 0x7f09019e - public const int menu_about = 2131296670; + public const int maskpass_summary = 2131296670; - // aapt resource value: 0x7f0901a3 - public const int menu_app_settings = 2131296675; + // aapt resource value: 0x7f09019d + public const int maskpass_title = 2131296669; - // aapt resource value: 0x7f0901b0 - public const int menu_change_db = 2131296688; + // aapt resource value: 0x7f0901be + public const int master_key_type = 2131296702; + + // aapt resource value: 0x7f090287 + public const int master_password = 2131296903; // aapt resource value: 0x7f09019f - public const int menu_change_key = 2131296671; - - // aapt resource value: 0x7f0901a0 - public const int menu_copy_pass = 2131296672; - - // aapt resource value: 0x7f0901a1 - public const int menu_copy_user = 2131296673; - - // aapt resource value: 0x7f0901a2 - public const int menu_create = 2131296674; + public const int menu_about = 2131296671; // aapt resource value: 0x7f0901a4 - public const int menu_db_settings = 2131296676; - - // aapt resource value: 0x7f0901a5 - public const int menu_delete = 2131296677; - - // aapt resource value: 0x7f0901a7 - public const int menu_donate = 2131296679; - - // aapt resource value: 0x7f0901a8 - public const int menu_edit = 2131296680; - - // aapt resource value: 0x7f0901a9 - public const int menu_hide_password = 2131296681; - - // aapt resource value: 0x7f0902ca - public const int menu_homepage = 2131296970; - - // aapt resource value: 0x7f0901aa - public const int menu_lock = 2131296682; - - // aapt resource value: 0x7f0901a6 - public const int menu_move = 2131296678; - - // aapt resource value: 0x7f0901ab - public const int menu_open = 2131296683; - - // aapt resource value: 0x7f0901ac - public const int menu_rename = 2131296684; - - // aapt resource value: 0x7f0901ad - public const int menu_search = 2131296685; - - // aapt resource value: 0x7f0901ae - public const int menu_search_advanced = 2131296686; - - // aapt resource value: 0x7f0901af - public const int menu_url = 2131296687; + public const int menu_app_settings = 2131296676; // aapt resource value: 0x7f0901b1 - public const int minus = 2131296689; + public const int menu_change_db = 2131296689; + + // aapt resource value: 0x7f0901a0 + public const int menu_change_key = 2131296672; + + // aapt resource value: 0x7f0901a1 + public const int menu_copy_pass = 2131296673; + + // aapt resource value: 0x7f0901a2 + public const int menu_copy_user = 2131296674; + + // aapt resource value: 0x7f0901a3 + public const int menu_create = 2131296675; + + // aapt resource value: 0x7f0901a5 + public const int menu_db_settings = 2131296677; + + // aapt resource value: 0x7f0901a6 + public const int menu_delete = 2131296678; + + // aapt resource value: 0x7f0901a8 + public const int menu_donate = 2131296680; + + // aapt resource value: 0x7f0901a9 + public const int menu_edit = 2131296681; + + // aapt resource value: 0x7f0901aa + public const int menu_hide_password = 2131296682; + + // aapt resource value: 0x7f0902cd + public const int menu_homepage = 2131296973; + + // aapt resource value: 0x7f0901ab + public const int menu_lock = 2131296683; + + // aapt resource value: 0x7f0901a7 + public const int menu_move = 2131296679; + + // aapt resource value: 0x7f0901ac + public const int menu_open = 2131296684; + + // aapt resource value: 0x7f0901ad + public const int menu_rename = 2131296685; + + // aapt resource value: 0x7f0901ae + public const int menu_search = 2131296686; + + // aapt resource value: 0x7f0901af + public const int menu_search_advanced = 2131296687; + + // aapt resource value: 0x7f0901b0 + public const int menu_url = 2131296688; // aapt resource value: 0x7f0901b2 - public const int never = 2131296690; + public const int minus = 2131296690; - // aapt resource value: 0x7f0901b4 - public const int no = 2131296692; + // aapt resource value: 0x7f0901b3 + public const int never = 2131296691; // aapt resource value: 0x7f0901b5 - public const int no_keys = 2131296693; + public const int no = 2131296693; // aapt resource value: 0x7f0901b6 - public const int no_results = 2131296694; - - // aapt resource value: 0x7f09026d - public const int no_thanks = 2131296877; + public const int no_keys = 2131296694; // aapt resource value: 0x7f0901b7 - public const int no_url_handler = 2131296695; + public const int no_results = 2131296695; - // aapt resource value: 0x7f090154 - public const int not_possible_im_picker = 2131296596; + // aapt resource value: 0x7f090270 + public const int no_thanks = 2131296880; + + // aapt resource value: 0x7f0901b8 + public const int no_url_handler = 2131296696; + + // aapt resource value: 0x7f090155 + public const int not_possible_im_picker = 2131296597; // aapt resource value: 0x7f0900f9 public const int oi_filemanager_market = 2131296505; @@ -5024,17 +5033,17 @@ namespace keepass2android // aapt resource value: 0x7f090082 public const int ok = 2131296386; - // aapt resource value: 0x7f09026c - public const int ok_donate = 2131296876; + // aapt resource value: 0x7f09026f + public const int ok_donate = 2131296879; // aapt resource value: 0x7f090105 public const int omitbackup_key = 2131296517; - // aapt resource value: 0x7f0901ba - public const int omitbackup_summary = 2131296698; + // aapt resource value: 0x7f0901bb + public const int omitbackup_summary = 2131296699; - // aapt resource value: 0x7f0901b9 - public const int omitbackup_title = 2131296697; + // aapt resource value: 0x7f0901ba + public const int omitbackup_title = 2131296698; // aapt resource value: 0x7f0900a6 public const int open_entry = 2131296422; @@ -5042,83 +5051,83 @@ namespace keepass2android // aapt resource value: 0x7f0900a7 public const int open_entry_for_app = 2131296423; - // aapt resource value: 0x7f0901b8 - public const int open_recent = 2131296696; + // aapt resource value: 0x7f0901b9 + public const int open_recent = 2131296697; // aapt resource value: 0x7f090089 public const int open_the_keyboard = 2131296393; - // aapt resource value: 0x7f090265 - public const int otp_aux_file = 2131296869; + // aapt resource value: 0x7f090268 + public const int otp_aux_file = 2131296872; - // aapt resource value: 0x7f090293 - public const int otp_discarded_because_db_open = 2131296915; - - // aapt resource value: 0x7f090291 - public const int otp_discarded_because_no_db = 2131296913; - - // aapt resource value: 0x7f090292 - public const int otp_discarded_no_space = 2131296914; - - // aapt resource value: 0x7f09028d - public const int otp_explanation = 2131296909; - - // aapt resource value: 0x7f09028e - public const int otp_hint = 2131296910; + // aapt resource value: 0x7f090296 + public const int otp_discarded_because_db_open = 2131296918; // aapt resource value: 0x7f090294 - public const int otps_pending = 2131296916; + public const int otp_discarded_because_no_db = 2131296916; // aapt resource value: 0x7f090295 - public const int otpsecret_hint = 2131296917; + public const int otp_discarded_no_space = 2131296917; - // aapt resource value: 0x7f0901bb - public const int pass_filename = 2131296699; + // aapt resource value: 0x7f090290 + public const int otp_explanation = 2131296912; - // aapt resource value: 0x7f090148 - public const int password_access_prefs = 2131296584; + // aapt resource value: 0x7f090291 + public const int otp_hint = 2131296913; + + // aapt resource value: 0x7f090297 + public const int otps_pending = 2131296919; + + // aapt resource value: 0x7f090298 + public const int otpsecret_hint = 2131296920; + + // aapt resource value: 0x7f0901bc + public const int pass_filename = 2131296700; + + // aapt resource value: 0x7f090149 + public const int password_access_prefs = 2131296585; // aapt resource value: 0x7f090110 public const int password_access_prefs_key = 2131296528; - // aapt resource value: 0x7f0901bc - public const int password_title = 2131296700; + // aapt resource value: 0x7f0901bd + public const int password_title = 2131296701; // aapt resource value: 0x7f0900fb public const int permission_desc = 2131296507; - // aapt resource value: 0x7f090155 - public const int please_activate_keyboard = 2131296597; + // aapt resource value: 0x7f090156 + public const int please_activate_keyboard = 2131296598; - // aapt resource value: 0x7f0901e7 - public const int please_note = 2131296743; - - // aapt resource value: 0x7f09029e - public const int plugin_author = 2131296926; - - // aapt resource value: 0x7f09029d - public const int plugin_description = 2131296925; - - // aapt resource value: 0x7f0902a0 - public const int plugin_disabled = 2131296928; - - // aapt resource value: 0x7f09029f - public const int plugin_enabled = 2131296927; - - // aapt resource value: 0x7f0902a2 - public const int plugin_enabled_checkbox = 2131296930; - - // aapt resource value: 0x7f09029c - public const int plugin_packagename = 2131296924; + // aapt resource value: 0x7f0901e8 + public const int please_note = 2131296744; // aapt resource value: 0x7f0902a1 - public const int plugin_web = 2131296929; + public const int plugin_author = 2131296929; - // aapt resource value: 0x7f09029b - public const int plugins = 2131296923; + // aapt resource value: 0x7f0902a0 + public const int plugin_description = 2131296928; - // aapt resource value: 0x7f0902be - public const int plugins_text = 2131296958; + // aapt resource value: 0x7f0902a3 + public const int plugin_disabled = 2131296931; + + // aapt resource value: 0x7f0902a2 + public const int plugin_enabled = 2131296930; + + // aapt resource value: 0x7f0902a5 + public const int plugin_enabled_checkbox = 2131296933; + + // aapt resource value: 0x7f09029f + public const int plugin_packagename = 2131296927; + + // aapt resource value: 0x7f0902a4 + public const int plugin_web = 2131296932; + + // aapt resource value: 0x7f09029e + public const int plugins = 2131296926; + + // aapt resource value: 0x7f0902c1 + public const int plugins_text = 2131296961; // aapt resource value: 0x7f09008d public const int popular_domain_0 = 2131296397; @@ -5180,14 +5189,14 @@ namespace keepass2android // aapt resource value: 0x7f090051 public const int prefs_settings_key = 2131296337; - // aapt resource value: 0x7f0901be - public const int progress_create = 2131296702; + // aapt resource value: 0x7f0901bf + public const int progress_create = 2131296703; - // aapt resource value: 0x7f0901c0 - public const int progress_title = 2131296704; + // aapt resource value: 0x7f0901c1 + public const int progress_title = 2131296705; - // aapt resource value: 0x7f090215 - public const int protection = 2131296789; + // aapt resource value: 0x7f090216 + public const int protection = 2131296790; // aapt resource value: 0x7f09004b public const int quick_fixes = 2131296331; @@ -5195,59 +5204,59 @@ namespace keepass2android // aapt resource value: 0x7f09004c public const int quick_fixes_summary = 2131296332; - // aapt resource value: 0x7f090242 - public const int rate_app = 2131296834; + // aapt resource value: 0x7f090245 + public const int rate_app = 2131296837; - // aapt resource value: 0x7f0901e9 - public const int regular_expression = 2131296745; - - // aapt resource value: 0x7f0901c1 - public const int remember_keyfile_summary = 2131296705; + // aapt resource value: 0x7f0901ea + public const int regular_expression = 2131296746; // aapt resource value: 0x7f0901c2 - public const int remember_keyfile_title = 2131296706; + public const int remember_keyfile_summary = 2131296706; // aapt resource value: 0x7f0901c3 - public const int remove_from_filelist = 2131296707; + public const int remember_keyfile_title = 2131296707; // aapt resource value: 0x7f0901c4 - public const int rijndael = 2131296708; + public const int remove_from_filelist = 2131296708; // aapt resource value: 0x7f0901c5 - public const int root = 2131296709; + public const int rijndael = 2131296709; // aapt resource value: 0x7f0901c6 - public const int rounds = 2131296710; + public const int root = 2131296710; // aapt resource value: 0x7f0901c7 - public const int rounds_explaination = 2131296711; + public const int rounds = 2131296711; // aapt resource value: 0x7f0901c8 - public const int rounds_hint = 2131296712; + public const int rounds_explaination = 2131296712; + + // aapt resource value: 0x7f0901c9 + public const int rounds_hint = 2131296713; // aapt resource value: 0x7f090102 public const int rounds_key = 2131296514; - // aapt resource value: 0x7f0901cb - public const int saving_database = 2131296715; - - // aapt resource value: 0x7f0901d4 - public const int search_hint = 2131296724; - - // aapt resource value: 0x7f0901d6 - public const int search_in = 2131296726; - - // aapt resource value: 0x7f0901cf - public const int search_label = 2131296719; - - // aapt resource value: 0x7f0901f2 - public const int search_options = 2131296754; + // aapt resource value: 0x7f0901cc + public const int saving_database = 2131296716; // aapt resource value: 0x7f0901d5 - public const int search_results = 2131296725; + public const int search_hint = 2131296725; - // aapt resource value: 0x7f090146 - public const int security_prefs = 2131296582; + // aapt resource value: 0x7f0901d7 + public const int search_in = 2131296727; + + // aapt resource value: 0x7f0901d0 + public const int search_label = 2131296720; + + // aapt resource value: 0x7f0901f3 + public const int search_options = 2131296755; + + // aapt resource value: 0x7f0901d6 + public const int search_results = 2131296726; + + // aapt resource value: 0x7f090147 + public const int security_prefs = 2131296583; // aapt resource value: 0x7f090111 public const int security_prefs_key = 2131296529; @@ -5255,14 +5264,14 @@ namespace keepass2android // aapt resource value: 0x7f090092 public const int selectInputMethod = 2131296402; + // aapt resource value: 0x7f0901d9 + public const int select_group_then_add = 2131296729; + // aapt resource value: 0x7f0901d8 - public const int select_group_then_add = 2131296728; + public const int select_other_entry = 2131296728; - // aapt resource value: 0x7f0901d7 - public const int select_other_entry = 2131296727; - - // aapt resource value: 0x7f090272 - public const int select_storage_type = 2131296882; + // aapt resource value: 0x7f090275 + public const int select_storage_type = 2131296885; // aapt resource value: 0x7f090030 public const int sentence_separators = 2131296304; @@ -5285,23 +5294,23 @@ namespace keepass2android // aapt resource value: 0x7f090052 public const int settings_key_mode_auto_name = 2131296338; - // aapt resource value: 0x7f09013c - public const int short_app_name = 2131296572; + // aapt resource value: 0x7f09013d + public const int short_app_name = 2131296573; - // aapt resource value: 0x7f09013e - public const int short_app_name_nonet = 2131296574; + // aapt resource value: 0x7f09013f + public const int short_app_name_nonet = 2131296575; - // aapt resource value: 0x7f090142 - public const int show_kill_app = 2131296578; + // aapt resource value: 0x7f090143 + public const int show_kill_app = 2131296579; // aapt resource value: 0x7f0900ff public const int show_kill_app_key = 2131296511; - // aapt resource value: 0x7f090143 - public const int show_kill_app_summary = 2131296579; + // aapt resource value: 0x7f090144 + public const int show_kill_app_summary = 2131296580; - // aapt resource value: 0x7f0901d0 - public const int show_password = 2131296720; + // aapt resource value: 0x7f0901d1 + public const int show_password = 2131296721; // aapt resource value: 0x7f09004d public const int show_suggestions = 2131296333; @@ -5309,35 +5318,35 @@ namespace keepass2android // aapt resource value: 0x7f09004e public const int show_suggestions_summary = 2131296334; - // aapt resource value: 0x7f0901d2 - public const int sort_db = 2131296722; + // aapt resource value: 0x7f0901d3 + public const int sort_db = 2131296723; // aapt resource value: 0x7f090108 public const int sort_key = 2131296520; - // aapt resource value: 0x7f0901d1 - public const int sort_name = 2131296721; + // aapt resource value: 0x7f0901d2 + public const int sort_name = 2131296722; // aapt resource value: 0x7f090039 public const int sound_on_keypress = 2131296313; - // aapt resource value: 0x7f0901ce - public const int space = 2131296718; + // aapt resource value: 0x7f0901cf + public const int space = 2131296719; - // aapt resource value: 0x7f0901d3 - public const int special = 2131296723; - - // aapt resource value: 0x7f0901f5 - public const int start_create = 2131296757; - - // aapt resource value: 0x7f0901f7 - public const int start_create_import = 2131296759; - - // aapt resource value: 0x7f0901f4 - public const int start_open_file = 2131296756; + // aapt resource value: 0x7f0901d4 + public const int special = 2131296724; // aapt resource value: 0x7f0901f6 - public const int start_open_url = 2131296758; + public const int start_create = 2131296758; + + // aapt resource value: 0x7f0901f8 + public const int start_create_import = 2131296760; + + // aapt resource value: 0x7f0901f5 + public const int start_open_file = 2131296757; + + // aapt resource value: 0x7f0901f7 + public const int start_open_url = 2131296759; // aapt resource value: 0x7f0900a1 public const int subtype_mode_keyboard = 2131296417; @@ -5345,14 +5354,14 @@ namespace keepass2android // aapt resource value: 0x7f0900a2 public const int subtype_mode_voice = 2131296418; - // aapt resource value: 0x7f090241 - public const int suggest_improvements = 2131296833; + // aapt resource value: 0x7f090244 + public const int suggest_improvements = 2131296836; // aapt resource value: 0x7f090031 public const int suggested_punctuations = 2131296305; - // aapt resource value: 0x7f090267 - public const int synchronize_database_menu = 2131296871; + // aapt resource value: 0x7f09026a + public const int synchronize_database_menu = 2131296874; // aapt resource value: 0x7f09005d public const int tip_access_symbols = 2131296349; @@ -5393,29 +5402,29 @@ namespace keepass2android // aapt resource value: 0x7f090060 public const int touch_to_finish = 2131296352; - // aapt resource value: 0x7f090243 - public const int translate_app = 2131296835; - - // aapt resource value: 0x7f0901da - public const int twofish = 2131296730; + // aapt resource value: 0x7f090246 + public const int translate_app = 2131296838; // aapt resource value: 0x7f0901db - public const int underline = 2131296731; + public const int twofish = 2131296731; // aapt resource value: 0x7f0901dc - public const int unsupported_db_version = 2131296732; + public const int underline = 2131296732; // aapt resource value: 0x7f0901dd - public const int uppercase = 2131296733; + public const int unsupported_db_version = 2131296733; - // aapt resource value: 0x7f09028a - public const int use_key_file = 2131296906; + // aapt resource value: 0x7f0901de + public const int uppercase = 2131296734; + + // aapt resource value: 0x7f09028d + public const int use_key_file = 2131296909; + + // aapt resource value: 0x7f0901e2 + public const int version_history = 2131296738; // aapt resource value: 0x7f0901e1 - public const int version_history = 2131296737; - - // aapt resource value: 0x7f0901e0 - public const int version_label = 2131296736; + public const int version_label = 2131296737; // aapt resource value: 0x7f090038 public const int vibrate_on_keypress = 2131296312; @@ -5486,17 +5495,17 @@ namespace keepass2android // aapt resource value: 0x7f090075 public const int voice_working = 2131296373; - // aapt resource value: 0x7f0901de - public const int warning_read_only = 2131296734; - // aapt resource value: 0x7f0901df - public const int warning_unmounted = 2131296735; + public const int warning_read_only = 2131296735; + + // aapt resource value: 0x7f0901e0 + public const int warning_unmounted = 2131296736; // aapt resource value: 0x7f09002f public const int word_separators = 2131296303; - // aapt resource value: 0x7f0901b3 - public const int yes = 2131296691; + // aapt resource value: 0x7f0901b4 + public const int yes = 2131296692; static String() { diff --git a/src/keepass2android/Resources/drawable/ic_menu_copy_holo_light.png b/src/keepass2android/Resources/drawable/ic_menu_copy_holo_light.png new file mode 100644 index 00000000..0dd8865f Binary files /dev/null and b/src/keepass2android/Resources/drawable/ic_menu_copy_holo_light.png differ diff --git a/src/keepass2android/Resources/values/config.xml b/src/keepass2android/Resources/values/config.xml index 24402e9d..43be789a 100644 --- a/src/keepass2android/Resources/values/config.xml +++ b/src/keepass2android/Resources/values/config.xml @@ -90,6 +90,8 @@ UseFileTransactions LockWhenScreenOff + LockWhenNavigateBack + UseOfflineCache AcceptAllServerCertificates CheckForFileChangesOnSave diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml index 25e0e72d..776971fb 100644 --- a/src/keepass2android/Resources/values/strings.xml +++ b/src/keepass2android/Resources/values/strings.xml @@ -251,6 +251,11 @@ Use file transactions for writing databases Lock when screen off Lock the database when screen is switched off. + + Lock when leaving app + Lock the database when leaving the app by pressing the back button. + + Database caching Keep a copy of remote database files in the application cache directory. This allows to use remote databases even when offline. diff --git a/src/keepass2android/Resources/xml/preferences.xml b/src/keepass2android/Resources/xml/preferences.xml index b467bc28..673eb6ca 100644 --- a/src/keepass2android/Resources/xml/preferences.xml +++ b/src/keepass2android/Resources/xml/preferences.xml @@ -88,6 +88,14 @@ android:title="@string/LockWhenScreenOff_title" android:key="@string/LockWhenScreenOff_key" /> + + + + \ No newline at end of file diff --git a/src/keepass2android/app/AppTask.cs b/src/keepass2android/app/AppTask.cs index b0a6db63..c1161cd4 100644 --- a/src/keepass2android/app/AppTask.cs +++ b/src/keepass2android/app/AppTask.cs @@ -105,11 +105,6 @@ namespace keepass2android { } - public virtual bool CloseEntryActivityAfterCreate - { - get { return false;} - } - public virtual void PrepareNewEntry(PwEntry newEntry) { @@ -233,7 +228,10 @@ namespace keepass2android public static bool TryGetFromActivityResult(Intent data, ref AppTask task) { if (data == null) + { + Kp2aLog.Log("TryGetFromActivityResult: no data"); return false; + } AppTask tempTask = CreateFromBundle(data.Extras, null); if (tempTask == null) { @@ -253,9 +251,9 @@ namespace keepass2android } - public virtual void OnCompleteCreateEntryActivity(EntryActivity entryActivity) + public virtual void CompleteOnCreateEntryActivity(EntryActivity activity) { - entryActivity.CompleteOnCreate(); + activity.StartNotificationsService(false); } } @@ -310,10 +308,14 @@ namespace keepass2android //act.AppTask = new NullTask(); } - public override bool CloseEntryActivityAfterCreate + public override void CompleteOnCreateEntryActivity(EntryActivity activity) { - get { return true;} + //show the notifications + activity.StartNotificationsService(true); + //close + activity.CloseAfterTaskComplete(); } + } @@ -322,11 +324,12 @@ namespace keepass2android /// public class SelectEntryTask: AppTask { - - public override bool CloseEntryActivityAfterCreate + public override void CompleteOnCreateEntryActivity(EntryActivity activity) { - //keypoint here: close the app after selecting the entry - get { return true;} + //show the notifications + activity.StartNotificationsService(true); + //close + activity.CloseAfterTaskComplete(); } } @@ -369,20 +372,49 @@ namespace keepass2android } } - public override bool CloseEntryActivityAfterCreate - { - get { return true; } - } - - public override void OnCompleteCreateEntryActivity(EntryActivity entryActivity) + public override void CompleteOnCreateEntryActivity(EntryActivity activity) { //if the database is readonly, don't offer to modify the URL if (App.Kp2a.GetDb().CanWrite == false) { - base.OnCompleteCreateEntryActivity(entryActivity); + ShowNotificationsAndClose(activity); return; } - entryActivity.AskAddUrlThenCompleteCreate(UrlToSearchFor); + + + AskAddUrlThenCompleteCreate(activity, UrlToSearchFor); + + } + + private static void ShowNotificationsAndClose(EntryActivity activity) + { + activity.StartNotificationsService(true); + activity.CloseAfterTaskComplete(); + } + + /// + /// brings up a dialog asking the user whether he wants to add the given URL to the entry for automatic finding + /// + public void AskAddUrlThenCompleteCreate(EntryActivity activity, string url) + { + AlertDialog.Builder builder = new AlertDialog.Builder(activity); + builder.SetTitle(activity.GetString(Resource.String.AddUrlToEntryDialog_title)); + + builder.SetMessage(activity.GetString(Resource.String.AddUrlToEntryDialog_text, new Java.Lang.Object[] { url })); + + builder.SetPositiveButton(activity.GetString(Resource.String.yes), (dlgSender, dlgEvt) => + { + activity.AddUrlToEntry(url, () => ShowNotificationsAndClose(activity)); + }); + + builder.SetNegativeButton(activity.GetString(Resource.String.no), (dlgSender, dlgEvt) => + { + ShowNotificationsAndClose(activity); + }); + + Dialog dialog = builder.Create(); + dialog.Show(); + } } @@ -499,16 +531,14 @@ namespace keepass2android public override void AfterAddNewEntry(EntryEditActivity entryEditActivity, PwEntry newEntry) { - EntryActivity.Launch(entryEditActivity, newEntry, -1, new SelectEntryTask()); - entryEditActivity.SetResult - (KeePass.ExitCloseAfterTaskComplete); + EntryActivity.Launch(entryEditActivity, newEntry, -1, new SelectEntryTask(), ActivityFlags.ForwardResult); //no need to call Finish here, that's done in EntryEditActivity ("closeOrShowError") } - public override bool CloseEntryActivityAfterCreate + public override void CompleteOnCreateEntryActivity(EntryActivity activity) { //if the user selects an entry before creating the new one, we're not closing the app - get { return false;} + base.CompleteOnCreateEntryActivity(activity); } } } diff --git a/src/keepass2android/fileselect/FileSelectActivity.cs b/src/keepass2android/fileselect/FileSelectActivity.cs index e55facaa..4dedb38c 100644 --- a/src/keepass2android/fileselect/FileSelectActivity.cs +++ b/src/keepass2android/fileselect/FileSelectActivity.cs @@ -83,7 +83,15 @@ namespace keepass2android } else { - AppTask = AppTask.CreateFromIntent(Intent); + //see PasswordActivity for an explanation + if ((savedInstanceState == null) && (Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory))) + { + AppTask = new NullTask(); + } + else + { + AppTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent); + } } @@ -301,8 +309,14 @@ namespace keepass2android { base.OnActivityResult(requestCode, resultCode, data); + //update app task. + //this is important even if we're about to close, because then we should get a NullTask here + //in order not to do the same task next time again! + AppTask.TryGetFromActivityResult(data, ref AppTask); + if (resultCode == KeePass.ExitCloseAfterTaskComplete) { + //no need to set the result ExitCloseAfterTaskComplete here, there's no parent Activity on the stack Finish(); return; } diff --git a/src/keepass2android/password/PasswordGenerator.cs b/src/keepass2android/password/PasswordGenerator.cs index dcace1cc..43e0dd20 100644 --- a/src/keepass2android/password/PasswordGenerator.cs +++ b/src/keepass2android/password/PasswordGenerator.cs @@ -16,6 +16,7 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file */ using System; +using System.Security.Cryptography; using System.Text; using Android.Content; @@ -35,6 +36,47 @@ namespace keepass2android private const String BracketChars = "[]{}()<>"; private readonly Context _cxt; + + public sealed class SecureRandom : Random + { + + private readonly RandomNumberGenerator _rng = new RNGCryptoServiceProvider(); + + + public override int Next() + { + var data = new byte[sizeof(int)]; + _rng.GetBytes(data); + return BitConverter.ToInt32(data, 0) & (int.MaxValue - 1); + } + + public override int Next(int maxValue) + { + return Next(0, maxValue); + } + + public override int Next(int minValue, int maxValue) + { + if (minValue > maxValue) + { + throw new ArgumentOutOfRangeException(); + } + return (int)Math.Floor((minValue + (maxValue - minValue) * NextDouble())); + } + + public override double NextDouble() + { + var data = new byte[sizeof(uint)]; + _rng.GetBytes(data); + var randUint = BitConverter.ToUInt32(data, 0); + return randUint / (uint.MaxValue + 1.0); + } + + public override void NextBytes(byte[] data) + { + _rng.GetBytes(data); + } + } public PasswordGenerator(Context cxt) { _cxt = cxt; @@ -52,11 +94,12 @@ namespace keepass2android int size = characterSet.Length; StringBuilder buffer = new StringBuilder(); - - Random random = new Random(); - if (size > 0) { - - for (int i = 0; i < length; i++) { + + Random random = new SecureRandom(); + if (size > 0) + { + for (int i = 0; i < length; i++) + { char c = characterSet[random.Next(size)]; buffer.Append(c); diff --git a/src/keepass2android/search/SearchResults.cs b/src/keepass2android/search/SearchResults.cs index f2784a13..6d2926e6 100644 --- a/src/keepass2android/search/SearchResults.cs +++ b/src/keepass2android/search/SearchResults.cs @@ -64,7 +64,7 @@ namespace keepass2android.search { var entryIntent = new Intent(this, typeof(EntryActivity)); entryIntent.PutExtra(EntryActivity.KeyEntry, intent.Data.LastPathSegment); - + entryIntent.AddFlags(ActivityFlags.ForwardResult); Finish(); // Close this activity so that the entry activity is navigated to from the main activity, not this one. StartActivity(entryIntent); }