diff --git a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
index 3b3be243..3fe01d37 100644
--- a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
+++ b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
@@ -55,8 +55,8 @@
-
- Jars\app-debug.aar
+
+ Jars\android-filechooser-release.aar
diff --git a/src/JavaFileStorageBindings/JavaFileStorageBindings.csproj b/src/JavaFileStorageBindings/JavaFileStorageBindings.csproj
index dd77e6e9..7ca7564e 100644
--- a/src/JavaFileStorageBindings/JavaFileStorageBindings.csproj
+++ b/src/JavaFileStorageBindings/JavaFileStorageBindings.csproj
@@ -64,8 +64,8 @@
-
- Jars\app-debug.aar
+
+ Jars\JavaFileStorage-debug.aar
@@ -75,81 +75,6 @@
-
-
- Jars\json_simple-1.1.jar
-
-
-
-
- Jars\google-api-client-1.16.0-rc.jar
-
-
-
-
- Jars\google-api-client-android-1.16.0-rc.jar
-
-
-
-
- Jars\google-api-services-drive-v2-rev102-1.16.0-rc.jar
-
-
-
-
- Jars\google-http-client-1.16.0-rc.jar
-
-
-
-
- Jars\google-http-client-android-1.16.0-rc.jar
-
-
-
-
- Jars\google-http-client-gson-1.16.0-rc.jar
-
-
-
-
- Jars\google-http-client-jackson-1.16.0-rc.jar
-
-
-
-
- Jars\google-http-client-jackson2-1.16.0-rc.jar
-
-
-
-
- Jars\google-oauth-client-1.16.0-rc.jar
-
-
-
-
- Jars\gson-2.1.jar
-
-
-
-
- Jars\httpmime-4.0.3.jar
-
-
-
-
- Jars\jackson-core-2.1.3.jar
-
-
-
-
- Jars\jackson-core-asl-1.9.11.jar
-
-
-
-
- Jars\jsr305-1.3.9.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/src/Kp2aBusinessLogic/IKp2aApp.cs b/src/Kp2aBusinessLogic/IKp2aApp.cs
index 0c92c942..ce6f00a4 100644
--- a/src/Kp2aBusinessLogic/IKp2aApp.cs
+++ b/src/Kp2aBusinessLogic/IKp2aApp.cs
@@ -9,6 +9,7 @@ using KeePassLib;
using KeePassLib.Keys;
using KeePassLib.Serialization;
using keepass2android.Io;
+using Keepass2android.Javafilestorage;
namespace keepass2android
{
@@ -28,7 +29,7 @@ namespace keepass2android
/// Interface through which Activities and the logic layer can access some app specific functionalities and Application static data
///
/// This also contains methods which are UI specific and should be replacable for testing.
- public interface IKp2aApp: ICertificateValidationHandler
+ public interface IKp2aApp : ICertificateValidationHandler
{
///
/// Locks the currently open database, quicklocking if available (unless false is passed for allowQuickUnlock)
@@ -106,5 +107,6 @@ namespace keepass2android
bool CheckForDuplicateUuids { get; }
+ ICertificateErrorHandler CertificateErrorHandler { get; }
}
}
\ No newline at end of file
diff --git a/src/Kp2aBusinessLogic/Io/DropboxFileStorage.cs b/src/Kp2aBusinessLogic/Io/DropboxFileStorage.cs
index 20dd1ecf..e4b3e774 100644
--- a/src/Kp2aBusinessLogic/Io/DropboxFileStorage.cs
+++ b/src/Kp2aBusinessLogic/Io/DropboxFileStorage.cs
@@ -6,7 +6,7 @@ namespace keepass2android.Io
public partial class DropboxFileStorage: JavaFileStorage
{
public DropboxFileStorage(Context ctx, IKp2aApp app) :
- base(new Keepass2android.Javafilestorage.DropboxFileStorage(ctx, AppKey, AppSecret), app)
+ base(new Keepass2android.Javafilestorage.DropboxV2Storage(ctx, AppKey, AppSecret), app)
{
}
@@ -16,7 +16,7 @@ namespace keepass2android.Io
public partial class DropboxAppFolderFileStorage: JavaFileStorage
{
public DropboxAppFolderFileStorage(Context ctx, IKp2aApp app) :
- base(new Keepass2android.Javafilestorage.DropboxAppFolderFileStorage(ctx, AppKey, AppSecret), app)
+ base(new Keepass2android.Javafilestorage.DropboxV2AppFolderStorage(ctx, AppKey, AppSecret), app)
{
}
diff --git a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
index fa584281..716d47f9 100644
--- a/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
+++ b/src/Kp2aBusinessLogic/Io/JavaFileStorage.cs
@@ -21,7 +21,7 @@ namespace keepass2android.Io
{
protected string Protocol { get { return _jfs.ProtocolId; } }
- public IEnumerable SupportedProtocols { get { yield return Protocol; } }
+ public virtual IEnumerable SupportedProtocols { get { yield return Protocol; } }
private readonly IJavaFileStorage _jfs;
diff --git a/src/Kp2aBusinessLogic/Io/SkyDriveFileStorage.cs b/src/Kp2aBusinessLogic/Io/SkyDriveFileStorage.cs
deleted file mode 100644
index 663036fe..00000000
--- a/src/Kp2aBusinessLogic/Io/SkyDriveFileStorage.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-using KeePassLib.Serialization;
-#if !EXCLUDE_JAVAFILESTORAGE
-using Keepass2android.Javafilestorage;
-
-namespace keepass2android.Io
-{
- public class SkyDriveFileStorage: JavaFileStorage
- {
- private const string ClientId = "000000004010C234";
-
- public SkyDriveFileStorage(Context ctx, IKp2aApp app) :
- base(new Keepass2android.Javafilestorage.SkyDriveFileStorage(ClientId, ctx), app)
- {
- }
-
-
- }
-}
-#endif
\ No newline at end of file
diff --git a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj
index 0ff26287..015203d8 100644
--- a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj
+++ b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj
@@ -96,7 +96,8 @@
-
+
+
diff --git a/src/java/JavaFileStorage/app/build.gradle b/src/java/JavaFileStorage/app/build.gradle
index 0874801c..fb7b28f1 100644
--- a/src/java/JavaFileStorage/app/build.gradle
+++ b/src/java/JavaFileStorage/app/build.gradle
@@ -33,14 +33,14 @@ dependencies {
compile 'com.google.android.gms:play-services:4.0.30'
- compile('com.google.api-client:google-api-client-xml:1.17.0-rc') {
+ /* compile('com.google.api-client:google-api-client-xml:1.16.0-rc') {
+ exclude group: 'com.google.android.google-play-services'
+ }*/
+ compile 'com.google.http-client:google-http-client-gson:1.16.0-rc'
+ compile('com.google.api-client:google-api-client-android:1.16.0-rc') {
exclude group: 'com.google.android.google-play-services'
}
- compile 'com.google.http-client:google-http-client-gson:1.17.0-rc'
- compile('com.google.api-client:google-api-client-android:1.17.0-rc') {
- exclude group: 'com.google.android.google-play-services'
- }
- compile 'com.google.apis:google-api-services-drive:v2-rev105-1.17.0-rc'
+ compile 'com.google.apis:google-api-services-drive:v2-rev102-1.16.0-rc'
//compile 'com.dropbox.core:dropbox-core-sdk:2.0.1'
//compile group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true
@@ -52,7 +52,6 @@ dependencies {
compile ('com.onedrive.sdk:onedrive-sdk-android:1.2+') {
transitive = false
}
- // Include the gson dependency
compile ('com.google.code.gson:gson:2.3.1')
compile ('com.microsoft.services.msa:msa-auth:0.8.+')
compile ('com.microsoft.aad:adal:1.1.+')
diff --git a/src/java/JavaFileStorage/app/libs/commons-logging-1.1.1.jar b/src/java/JavaFileStorage/app/libs/commons-logging-1.1.1.jar
deleted file mode 100644
index 8758a96b..00000000
Binary files a/src/java/JavaFileStorage/app/libs/commons-logging-1.1.1.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/dropbox-android-sdk-1.6.2.jar b/src/java/JavaFileStorage/app/libs/dropbox-android-sdk-1.6.2.jar
deleted file mode 100644
index 997663e8..00000000
Binary files a/src/java/JavaFileStorage/app/libs/dropbox-android-sdk-1.6.2.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-api-client-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-api-client-1.16.0-rc.jar
deleted file mode 100644
index 4097d1bf..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-api-client-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-api-client-android-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-api-client-android-1.16.0-rc.jar
deleted file mode 100644
index f938da9e..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-api-client-android-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-api-services-drive-v2-rev102-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-api-services-drive-v2-rev102-1.16.0-rc.jar
deleted file mode 100644
index 5baa6abc..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-api-services-drive-v2-rev102-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-http-client-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-http-client-1.16.0-rc.jar
deleted file mode 100644
index e10f42d4..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-http-client-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-http-client-android-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-http-client-android-1.16.0-rc.jar
deleted file mode 100644
index 447db5e9..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-http-client-android-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-http-client-jackson-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-http-client-jackson-1.16.0-rc.jar
deleted file mode 100644
index 411d2238..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-http-client-jackson-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-http-client-jackson2-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-http-client-jackson2-1.16.0-rc.jar
deleted file mode 100644
index 23175261..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-http-client-jackson2-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/google-oauth-client-1.16.0-rc.jar b/src/java/JavaFileStorage/app/libs/google-oauth-client-1.16.0-rc.jar
deleted file mode 100644
index fb07f9be..00000000
Binary files a/src/java/JavaFileStorage/app/libs/google-oauth-client-1.16.0-rc.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/httpclient-4.0.3.jar b/src/java/JavaFileStorage/app/libs/httpclient-4.0.3.jar
deleted file mode 100644
index fd0d3774..00000000
Binary files a/src/java/JavaFileStorage/app/libs/httpclient-4.0.3.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/httpcore-4.0.1.jar b/src/java/JavaFileStorage/app/libs/httpcore-4.0.1.jar
deleted file mode 100644
index 4638daa5..00000000
Binary files a/src/java/JavaFileStorage/app/libs/httpcore-4.0.1.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/httpmime-4.0.3.jar b/src/java/JavaFileStorage/app/libs/httpmime-4.0.3.jar
deleted file mode 100644
index 0dfd3312..00000000
Binary files a/src/java/JavaFileStorage/app/libs/httpmime-4.0.3.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/jackson-core-2.1.3.jar b/src/java/JavaFileStorage/app/libs/jackson-core-2.1.3.jar
deleted file mode 100644
index f47619f4..00000000
Binary files a/src/java/JavaFileStorage/app/libs/jackson-core-2.1.3.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/jackson-core-asl-1.9.11.jar b/src/java/JavaFileStorage/app/libs/jackson-core-asl-1.9.11.jar
deleted file mode 100644
index 145fc489..00000000
Binary files a/src/java/JavaFileStorage/app/libs/jackson-core-asl-1.9.11.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/json_simple-1.1.jar b/src/java/JavaFileStorage/app/libs/json_simple-1.1.jar
deleted file mode 100644
index f395f414..00000000
Binary files a/src/java/JavaFileStorage/app/libs/json_simple-1.1.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/libs/jsr305-1.3.9.jar b/src/java/JavaFileStorage/app/libs/jsr305-1.3.9.jar
deleted file mode 100644
index a9afc661..00000000
Binary files a/src/java/JavaFileStorage/app/libs/jsr305-1.3.9.jar and /dev/null differ
diff --git a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/OneDriveStorage.java b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/OneDriveStorage.java
index d329f26f..6a97617f 100644
--- a/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/OneDriveStorage.java
+++ b/src/java/JavaFileStorage/app/src/main/java/keepass2android/javafilestorage/OneDriveStorage.java
@@ -63,7 +63,7 @@ public class OneDriveStorage extends JavaFileStorageBase
@Override
public void startSelectFile(FileStorageSetupInitiatorActivity activity, boolean isForSave, int requestCode) {
- initAuthenticator((Activity)activity);
+ initAuthenticator((Activity)activity.getActivity());
String path = getProtocolId()+":///";
Log.d("KP2AJ", "startSelectFile "+path+", connected: "+path);
@@ -113,8 +113,8 @@ public class OneDriveStorage extends JavaFileStorageBase
@Override
public void prepareFileUsage(FileStorageSetupInitiatorActivity activity, String path, int requestCode, boolean alwaysReturnSuccess) {
- initAuthenticator((Activity)activity);
- if (isConnected((Activity)activity))
+ initAuthenticator((Activity)activity.getActivity());
+ if (isConnected((Activity)activity.getActivity()))
{
Intent intent = new Intent();
intent.putExtra(EXTRA_PATH, path);
@@ -151,58 +151,7 @@ public class OneDriveStorage extends JavaFileStorageBase
@Override
public void onResume(final FileStorageSetupActivity activity) {
- Log.d("KP2AJ", "onResume");
- if (activity.getProcessName().equals(PROCESS_NAME_SELECTFILE))
- activity.getState().putString(EXTRA_PATH, activity.getPath());
- JavaFileStorage.FileStorageSetupActivity storageSetupAct = activity;
-
- if (storageSetupAct.getState().containsKey("hasStartedAuth"))
- {
- Log.d("KP2AJ", "auth started");
-
-
- if (oneDriveClient != null) {
- Log.d("KP2AJ", "auth successful");
- try {
-
- finishActivityWithSuccess(activity);
- return;
-
- } catch (Exception e) {
- Log.d("KP2AJ", "finish with error: " + e.toString());
- finishWithError(activity, e);
- return;
- }
- }
-
-
- Log.i(TAG, "authenticating not succesful");
- Intent data = new Intent();
- data.putExtra(EXTRA_ERROR_MESSAGE, "authenticating not succesful");
- ((Activity)activity).setResult(Activity.RESULT_CANCELED, data);
- ((Activity)activity).finish();
- }
- else
- {
- Log.d("KP2AJ", "Starting auth");
- new AsyncTask