diff --git a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj index 5c0af83e..3b3be243 100644 --- a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj +++ b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj @@ -10,7 +10,8 @@ AndroidFileChooserBinding AndroidFileChooserBinding 512 - v5.0 + v6.0 + True true @@ -54,6 +55,9 @@ + + Jars\app-debug.aar + @@ -71,11 +75,6 @@ --> - - - project.zip - - 20.0.0.4 diff --git a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj index 20ff6272..a0ed90dd 100644 --- a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj +++ b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj @@ -10,7 +10,8 @@ KP2AKdbLibraryBinding KP2AKdbLibraryBinding 512 - v5.0 + v6.0 + True true diff --git a/src/Kp2aBusinessLogic/Io/BuiltInFileStorage.cs b/src/Kp2aBusinessLogic/Io/BuiltInFileStorage.cs index eb4973ce..8af5e735 100644 --- a/src/Kp2aBusinessLogic/Io/BuiltInFileStorage.cs +++ b/src/Kp2aBusinessLogic/Io/BuiltInFileStorage.cs @@ -254,7 +254,8 @@ namespace keepass2android.Io //check if we need to request the external-storage-permission at runtime if (ioc.IsLocalFile()) { - bool requiresPermission = !ioc.Path.StartsWith(activity.Activity.FilesDir.CanonicalPath); + bool requiresPermission = !(ioc.Path.StartsWith(activity.Activity.FilesDir.CanonicalPath) + || ioc.Path.StartsWith(IoUtil.GetInternalDirectory(activity.Activity).CanonicalPath)); var extDirectory = activity.Activity.GetExternalFilesDir(null); if ((extDirectory != null) && (ioc.Path.StartsWith(extDirectory.CanonicalPath))) diff --git a/src/Kp2aBusinessLogic/Io/IoUtil.cs b/src/Kp2aBusinessLogic/Io/IoUtil.cs index 74368c36..03463d3a 100644 --- a/src/Kp2aBusinessLogic/Io/IoUtil.cs +++ b/src/Kp2aBusinessLogic/Io/IoUtil.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text; using Android.Content; +using Android.OS; using Java.IO; using KeePassLib.Serialization; @@ -53,13 +54,14 @@ namespace keepass2android.Io try { File filesDir = context.FilesDir.CanonicalFile; + File noBackupDir = GetInternalDirectory(context).CanonicalFile; File ourFile = new File(path).CanonicalFile; //http://www.java2s.com/Tutorial/Java/0180__File/Checkswhetherthechilddirectoryisasubdirectoryofthebasedirectory.htm File parentFile = ourFile; while (parentFile != null) { - if (filesDir.Equals(parentFile)) + if ((filesDir.Equals(parentFile) || noBackupDir.Equals(parentFile))) { return true; } @@ -92,5 +94,13 @@ namespace keepass2android.Io writeTransaction.CommitWrite(); } } + + public static Java.IO.File GetInternalDirectory(Context ctx) + { + if ((int)Android.OS.Build.VERSION.SdkInt >= 21) + return ctx.NoBackupFilesDir; + else + return ctx.FilesDir; + } } } diff --git a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj index d3b7422b..c5fa51e7 100644 --- a/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj +++ b/src/Kp2aBusinessLogic/Kp2aBusinessLogic.csproj @@ -94,7 +94,6 @@ - diff --git a/src/Kp2aBusinessLogic/database/edit/LoadDB.cs b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs index b5fc06f3..fdd8e7f2 100644 --- a/src/Kp2aBusinessLogic/database/edit/LoadDB.cs +++ b/src/Kp2aBusinessLogic/database/edit/LoadDB.cs @@ -101,7 +101,7 @@ namespace keepass2android } catch (DuplicateUuidsException e) { - Kp2aLog.LogUnexpectedError(e); + Kp2aLog.Log(e.ToString()); Finish(false, _app.GetResourceString(UiStringKey.DuplicateUuidsError) + " " + e.Message + _app.GetResourceString(UiStringKey.DuplicateUuidsErrorAdditional), Exception); return; } diff --git a/src/SamsungPass b/src/SamsungPass index 1495b1ad..6d376e4c 160000 --- a/src/SamsungPass +++ b/src/SamsungPass @@ -1 +1 @@ -Subproject commit 1495b1ad7914fa2be69e111b90039770d101aa3d +Subproject commit 6d376e4caca9131ea841e985d7cda85ac5906d67 diff --git a/src/java/JavaFileStorage/.idea/libraries/1_commons_logging_1_1_1.xml b/src/java/JavaFileStorage/.idea/libraries/1_commons_logging_1_1_1.xml new file mode 100644 index 00000000..bae06560 --- /dev/null +++ b/src/java/JavaFileStorage/.idea/libraries/1_commons_logging_1_1_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/java/JavaFileStorage/.idea/libraries/1_httpcore_4_0_1.xml b/src/java/JavaFileStorage/.idea/libraries/1_httpcore_4_0_1.xml new file mode 100644 index 00000000..ac99a181 --- /dev/null +++ b/src/java/JavaFileStorage/.idea/libraries/1_httpcore_4_0_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/java/JavaFileStorage/.idea/libraries/commons_codec_1_3.xml b/src/java/JavaFileStorage/.idea/libraries/commons_codec_1_3.xml new file mode 100644 index 00000000..45be99d4 --- /dev/null +++ b/src/java/JavaFileStorage/.idea/libraries/commons_codec_1_3.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/java/JavaFileStorage/.idea/libraries/httpclient_4_0_1.xml b/src/java/JavaFileStorage/.idea/libraries/httpclient_4_0_1.xml new file mode 100644 index 00000000..4f53d2c9 --- /dev/null +++ b/src/java/JavaFileStorage/.idea/libraries/httpclient_4_0_1.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/java/JavaFileStorage/app/app.iml b/src/java/JavaFileStorage/app/app.iml index d65f680f..889b621b 100644 --- a/src/java/JavaFileStorage/app/app.iml +++ b/src/java/JavaFileStorage/app/app.iml @@ -104,8 +104,8 @@ - + diff --git a/src/java/JavaFileStorage/app/build/outputs/aar/app-debug.aar b/src/java/JavaFileStorage/app/build/outputs/aar/app-debug.aar index 0ec94f02..efb541d1 100644 Binary files a/src/java/JavaFileStorage/app/build/outputs/aar/app-debug.aar and b/src/java/JavaFileStorage/app/build/outputs/aar/app-debug.aar differ diff --git a/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileHashes.bin b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileHashes.bin new file mode 100644 index 00000000..083e420f Binary files /dev/null and b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileHashes.bin differ diff --git a/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin new file mode 100644 index 00000000..7b19439f Binary files /dev/null and b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin differ diff --git a/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/outputFileStates.bin b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/outputFileStates.bin new file mode 100644 index 00000000..81b34fa0 Binary files /dev/null and b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/outputFileStates.bin differ diff --git a/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin new file mode 100644 index 00000000..68c327f3 Binary files /dev/null and b/src/java/KP2ASoftkeyboard_AS/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin differ diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/.name b/src/java/KP2ASoftkeyboard_AS/.idea/.name index 85863977..51b9745d 100644 --- a/src/java/KP2ASoftkeyboard_AS/.idea/.name +++ b/src/java/KP2ASoftkeyboard_AS/.idea/.name @@ -1 +1 @@ -java \ No newline at end of file +KP2ASoftkeyboard_AS \ No newline at end of file diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/encodings.xml b/src/java/KP2ASoftkeyboard_AS/.idea/encodings.xml new file mode 100644 index 00000000..97626ba4 --- /dev/null +++ b/src/java/KP2ASoftkeyboard_AS/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/gradle.xml b/src/java/KP2ASoftkeyboard_AS/.idea/gradle.xml index 3ed2e6cb..7e732c56 100644 --- a/src/java/KP2ASoftkeyboard_AS/.idea/gradle.xml +++ b/src/java/KP2ASoftkeyboard_AS/.idea/gradle.xml @@ -5,7 +5,7 @@ + diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/runConfigurations.xml b/src/java/KP2ASoftkeyboard_AS/.idea/runConfigurations.xml new file mode 100644 index 00000000..7f68460d --- /dev/null +++ b/src/java/KP2ASoftkeyboard_AS/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml b/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml new file mode 100644 index 00000000..eee10623 --- /dev/null +++ b/src/java/KP2ASoftkeyboard_AS/.idea/workspace.xml @@ -0,0 +1,1629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1458676967567 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/java/KP2ASoftkeyboard_AS/KP2ASoftkeyboard_AS.iml b/src/java/KP2ASoftkeyboard_AS/KP2ASoftkeyboard_AS.iml index d01d4599..279898fc 100644 --- a/src/java/KP2ASoftkeyboard_AS/KP2ASoftkeyboard_AS.iml +++ b/src/java/KP2ASoftkeyboard_AS/KP2ASoftkeyboard_AS.iml @@ -13,7 +13,7 @@ - + \ No newline at end of file diff --git a/src/java/KP2ASoftkeyboard_AS/app/app.iml b/src/java/KP2ASoftkeyboard_AS/app/app.iml index 2b96be4c..6644dd61 100644 --- a/src/java/KP2ASoftkeyboard_AS/app/app.iml +++ b/src/java/KP2ASoftkeyboard_AS/app/app.iml @@ -12,10 +12,8 @@