diff --git a/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-debug.aar b/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-debug.aar
index 2678769e..f7634d5d 100644
Binary files a/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-debug.aar and b/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-debug.aar differ
diff --git a/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-release.aar b/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-release.aar
index 5ff3e4d6..3b6e38ae 100644
Binary files a/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-release.aar and b/src/java/JavaFileStorage/app/build/outputs/aar/JavaFileStorage-release.aar 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 a02d26f6..fcdfbbaa 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
@@ -23,6 +23,7 @@ import com.onedrive.sdk.http.OneDriveServiceException;
import java.io.FileNotFoundException;
import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
@@ -166,16 +167,52 @@ public class OneDriveStorage extends JavaFileStorageBase
}
-
- String removeProtocol(String path)
+ String getPathFromSkydrivePath(String skydrivePath)
{
+ String path = "";
+ if (skydrivePath.equals(""))
+ return "";
+
+ String[] parts = skydrivePath.split("/");
+
+ for (int i = 0; i < parts.length; i++) {
+ String part = parts[i];
+ logDebug("parsing part " + part);
+ int indexOfSeparator = part.lastIndexOf(NAME_ID_SEP);
+ if (indexOfSeparator < 0) {
+ // seems invalid, but we're very generous here
+ path += "/" + part;
+ continue;
+ }
+ String name = part.substring(0, indexOfSeparator);
+ try {
+ name = decode(name);
+ } catch (UnsupportedEncodingException e) {
+ // ignore
+ }
+ path += "/" + name;
+ }
+ logDebug("return " +path + ". original was " + skydrivePath);
+ return path;
+
+ }
+
+ String removeProtocol(String path) throws Exception {
if (path == null)
return null;
+ if (path.startsWith("skydrive"))
+ return getPathFromSkydrivePath(path.substring("skydrive://".length()));
return path.substring(getProtocolId().length()+3);
}
@Override
public String getDisplayName(String path) {
+
+ if (path == null)
+ return null;
+ if (path.startsWith("skydrive"))
+ return getProtocolId()+"://"+getPathFromSkydrivePath(path.substring("skydrive://".length()));
+
return path;
}
@@ -198,18 +235,21 @@ public class OneDriveStorage extends JavaFileStorageBase
public InputStream openFileForRead(String path) throws Exception {
try {
path = removeProtocol(path);
- return oneDriveClient.getDrive()
+ logDebug("openFileForRead. Path="+path);
+ InputStream result = oneDriveClient.getDrive()
.getRoot()
.getItemWithPath(path)
.getContent()
.buildRequest()
.get();
+ logDebug("ok");
+ return result;
+
}
catch (OneDriveServiceException e)
{
throw convertException(e);
}
-
}
private Exception convertException(OneDriveServiceException e) {
diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml b/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml
index dfc76476..ba871b9e 100644
--- a/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml
+++ b/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml
@@ -33,11 +33,11 @@
-
+
-
-
+
+
@@ -119,7 +119,7 @@
-
+
@@ -1846,14 +1846,6 @@
-
-
-
-
-
-
-
-
@@ -1886,5 +1878,13 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/ChangeLog.cs b/src/keepass2android/ChangeLog.cs
index 6f48044b..7e369a19 100644
--- a/src/keepass2android/ChangeLog.cs
+++ b/src/keepass2android/ChangeLog.cs
@@ -26,7 +26,7 @@ namespace keepass2android
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeHoloLightDialog));
builder.SetTitle(ctx.GetString(Resource.String.ChangeLog_title));
List changeLog = new List{
- ctx.GetString(Resource.String.ChangeLog_1_01f),
+ ctx.GetString(Resource.String.ChangeLog_1_01g),
ctx.GetString(Resource.String.ChangeLog_1_01d),
ctx.GetString(Resource.String.ChangeLog_1_01),
ctx.GetString(Resource.String.ChangeLog_1_0_0e),
diff --git a/src/keepass2android/FingerprintModule.cs b/src/keepass2android/FingerprintModule.cs
index 3afcaeb1..9fd64e89 100644
--- a/src/keepass2android/FingerprintModule.cs
+++ b/src/keepass2android/FingerprintModule.cs
@@ -278,8 +278,9 @@ namespace keepass2android
_cryptoObject = new FingerprintManager.CryptoObject(_cipher);
return true;
}
- catch (KeyPermanentlyInvalidatedException)
+ catch (KeyPermanentlyInvalidatedException e)
{
+ Kp2aLog.Log("FP: KeyPermanentlyInvalidatedException." + e.ToString());
return false;
}
catch (KeyStoreException e)
diff --git a/src/keepass2android/Properties/AndroidManifest_net.xml b/src/keepass2android/Properties/AndroidManifest_net.xml
index a33be397..1dfc9225 100644
--- a/src/keepass2android/Properties/AndroidManifest_net.xml
+++ b/src/keepass2android/Properties/AndroidManifest_net.xml
@@ -1,7 +1,7 @@
diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml
index 3c03c1f8..56b3cdbe 100644
--- a/src/keepass2android/Resources/values/strings.xml
+++ b/src/keepass2android/Resources/values/strings.xml
@@ -680,8 +680,8 @@
Use AutoFill service
Please enable the Keepass2Android service.
Show soft keyboard for password input when fingerprint scan is active.
-
- Version 1.01-f\n
+
+ Version 1.01-g\n
* Fix for crash when trying to work offline\n
* Fix for incorrect encoding of FTP(S) credentials\n
* Fix for crashes when using OneDrive and on older Android versions\n