refactoring regarding AppTasks:

- AppTasks are now returned by ActivityResult through all AppTask-Related activities (includes ForwardResult)
 - AppTasks are now passed correctly even when using search (this fixes a problem that AppTasks like SearchUrl were not passed to EntryActivity so the App didn't return to the browser automatically)
 - AppTasks are deleted by ActivityResult or by checking for LaunchedFromHistory

Added option to leave app with db unlocked (this is even the default now!)

Added missing EntryActivity files
This commit is contained in:
Philipp Crocoll
2014-05-16 17:15:43 +02:00
parent f613206dab
commit bcbc225652
29 changed files with 1762 additions and 1069 deletions

View File

@@ -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]);
}
}
}