Compare commits
9 Commits
feature/de
...
bugfix/lis
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
677c6555e8 | ||
|
|
c62f6ef139 | ||
|
|
0c34625782 | ||
|
|
e86fa6f9fa | ||
|
|
e2e975f357 | ||
|
|
a9fed1c203 | ||
|
|
1157716c9c | ||
|
|
861615b7a4 | ||
|
|
e12d11264e |
@@ -1148,30 +1148,46 @@ namespace keepass2android.Io
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
string? driveId = parentPath.DriveId;
|
|
||||||
if ((string.IsNullOrEmpty(driveId)) && (drives?.Any() == true))
|
|
||||||
{
|
|
||||||
driveId = drives.First().Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!CanListShares)
|
if (!CanListShares)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
||||||
var sharedWithMeResponse = await client.Drives[driveId].SharedWithMe.GetAsSharedWithMeGetResponseAsync();
|
try
|
||||||
|
|
||||||
foreach (DriveItem i in sharedWithMeResponse?.Value ?? [])
|
|
||||||
{
|
{
|
||||||
var oneDrive2ItemLocation = parentPath.BuildShare(i.RemoteItem.Id, i.RemoteItem.Name, i.RemoteItem.WebUrl, i.RemoteItem.ParentReference.DriveId);
|
string? driveId = parentPath.DriveId;
|
||||||
FileDescription sharedFileEntry = new FileDescription()
|
if (string.IsNullOrEmpty(driveId))
|
||||||
{
|
{
|
||||||
CanWrite = true, CanRead = true, DisplayName = i.Name,
|
driveId = (await client.Me.Drive.GetAsync()).Id;
|
||||||
IsDirectory = true,
|
}
|
||||||
Path = oneDrive2ItemLocation.ToString()
|
if ((string.IsNullOrEmpty(driveId)) && (drives?.Any() == true))
|
||||||
};
|
{
|
||||||
result.Add(sharedFileEntry);
|
driveId = drives.First().Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
var sharedWithMeResponse = await client.Drives[driveId].SharedWithMe.GetAsSharedWithMeGetResponseAsync();
|
||||||
|
|
||||||
|
foreach (DriveItem i in sharedWithMeResponse?.Value ?? [])
|
||||||
|
{
|
||||||
|
var oneDrive2ItemLocation = parentPath.BuildShare(i.RemoteItem.Id, i.RemoteItem.Name, i.RemoteItem.WebUrl, i.RemoteItem.ParentReference.DriveId);
|
||||||
|
FileDescription sharedFileEntry = new FileDescription()
|
||||||
|
{
|
||||||
|
CanWrite = true,
|
||||||
|
CanRead = true,
|
||||||
|
DisplayName = i.Name,
|
||||||
|
IsDirectory = (i.Folder != null) || ((i.RemoteItem != null) && (i.RemoteItem.Folder != null)),
|
||||||
|
Path = oneDrive2ItemLocation.ToString()
|
||||||
|
};
|
||||||
|
result.Add(sharedFileEntry);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
logDebug("Failed to list shares: " + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,4 +113,15 @@ extends Activity implements JavaFileStorage.FileStorageSetupActivity {
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
|
MainActivity.storageToTest.onRequestPermissionsResult(this, requestCode, permissions, grantResults);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ import java.util.List;
|
|||||||
//import keepass2android.javafilestorage.DropboxCloudRailStorage;
|
//import keepass2android.javafilestorage.DropboxCloudRailStorage;
|
||||||
import keepass2android.javafilestorage.DropboxV2Storage;
|
import keepass2android.javafilestorage.DropboxV2Storage;
|
||||||
import keepass2android.javafilestorage.GoogleDriveAppDataFileStorage;
|
import keepass2android.javafilestorage.GoogleDriveAppDataFileStorage;
|
||||||
|
import keepass2android.javafilestorage.GoogleDriveFullFileStorage;
|
||||||
import keepass2android.javafilestorage.ICertificateErrorHandler;
|
import keepass2android.javafilestorage.ICertificateErrorHandler;
|
||||||
import keepass2android.javafilestorage.JavaFileStorage;
|
import keepass2android.javafilestorage.JavaFileStorage;
|
||||||
import keepass2android.javafilestorage.JavaFileStorage.FileEntry;
|
import keepass2android.javafilestorage.JavaFileStorage.FileEntry;
|
||||||
@@ -547,7 +548,7 @@ public class MainActivity extends Activity implements JavaFileStorage.FileStorag
|
|||||||
|
|
||||||
|
|
||||||
//storageToTest = new GoogleDriveAppDataFileStorage();
|
//storageToTest = new GoogleDriveAppDataFileStorage();
|
||||||
storageToTest = new WebDavStorage(new ICertificateErrorHandler() {
|
/*storageToTest = new WebDavStorage(new ICertificateErrorHandler() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onValidationError(String error) {
|
public boolean onValidationError(String error) {
|
||||||
return false;
|
return false;
|
||||||
@@ -558,10 +559,11 @@ public class MainActivity extends Activity implements JavaFileStorage.FileStorag
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
//storageToTest = new DropboxV2Storage(ctx,"4ybka4p4a1027n6", "1z5lv528un9nre8", !simulateRestart);
|
//storageToTest = new DropboxV2Storage(ctx,"4ybka4p4a1027n6", "1z5lv528un9nre8", !simulateRestart);
|
||||||
//storageToTest = new DropboxFileStorage(ctx,"4ybka4p4a1027n6", "1z5lv528un9nre8", !simulateRestart);
|
//storageToTest = new DropboxFileStorage(ctx,"4ybka4p4a1027n6", "1z5lv528un9nre8", !simulateRestart);
|
||||||
//storageToTest = new DropboxAppFolderFileStorage(ctx,"ax0268uydp1ya57", "3s86datjhkihwyc", true);
|
//storageToTest = new DropboxAppFolderFileStorage(ctx,"ax0268uydp1ya57", "3s86datjhkihwyc", true);
|
||||||
|
storageToTest = new GoogleDriveFullFileStorage();
|
||||||
|
|
||||||
|
|
||||||
return storageToTest;
|
return storageToTest;
|
||||||
@@ -580,6 +582,8 @@ public class MainActivity extends Activity implements JavaFileStorage.FileStorag
|
|||||||
getMenuInflater().inflate(R.menu.main, menu);
|
getMenuInflater().inflate(R.menu.main, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
|||||||
@@ -243,6 +243,15 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
|
|||||||
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="otpauth"/>
|
||||||
|
<data android:host="totp"/>
|
||||||
|
<data android:host="hotp"/>
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
||||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="203"
|
android:versionCode="204"
|
||||||
android:versionName="1.12-r2"
|
android:versionName="1.12-r3"
|
||||||
package="keepass2android.keepass2android"
|
package="keepass2android.keepass2android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
@@ -255,7 +255,14 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
|
|||||||
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
x
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="otpauth"/>
|
||||||
|
<data android:host="totp"/>
|
||||||
|
<data android:host="hotp"/>
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
||||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
||||||
|
|||||||
@@ -236,6 +236,14 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
|
|||||||
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
<action android:name="keepass2android.ACTION_START_WITH_TASK" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="otpauth"/>
|
||||||
|
<data android:host="totp"/>
|
||||||
|
<data android:host="hotp"/>
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
|
||||||
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ using KeePassLib.Serialization;
|
|||||||
using Console = System.Console;
|
using Console = System.Console;
|
||||||
using Object = Java.Lang.Object;
|
using Object = Java.Lang.Object;
|
||||||
using AndroidX.Core.Content;
|
using AndroidX.Core.Content;
|
||||||
|
using Uri = Android.Net.Uri;
|
||||||
|
|
||||||
namespace keepass2android
|
namespace keepass2android
|
||||||
{
|
{
|
||||||
@@ -302,9 +303,23 @@ namespace keepass2android
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Intent.Action == Intent.ActionView)
|
if (Intent.Action == Intent.ActionView)
|
||||||
{
|
{
|
||||||
GetIocFromViewIntent(Intent);
|
if (IsOtpUri(Intent.Data))
|
||||||
|
{
|
||||||
|
AppTask = new CreateEntryThenCloseTask()
|
||||||
|
{
|
||||||
|
AllFields = Newtonsoft.Json.JsonConvert.SerializeObject(new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "otp", Intent.DataString }
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetIocFromViewIntent(Intent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (Intent.Action == Intent.ActionSend)
|
else if (Intent.Action == Intent.ActionSend)
|
||||||
{
|
{
|
||||||
@@ -334,6 +349,11 @@ namespace keepass2android
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsOtpUri(Uri? uri)
|
||||||
|
{
|
||||||
|
return uri?.Scheme == "otpauth";
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnStart()
|
protected override void OnStart()
|
||||||
{
|
{
|
||||||
base.OnStart();
|
base.OnStart();
|
||||||
|
|||||||
@@ -733,18 +733,20 @@
|
|||||||
<AndroidNativeLibrary Include="..\java\argon2\libs\armeabi-v7a\libargon2.so" Link="armeabi-v7a\libargon2.so" />
|
<AndroidNativeLibrary Include="..\java\argon2\libs\armeabi-v7a\libargon2.so" Link="armeabi-v7a\libargon2.so" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.7.0.3" />
|
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.7.0.5" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.AppCompat.AppCompatResources" Version="1.7.0.3" />
|
<PackageReference Include="Xamarin.AndroidX.AppCompat.AppCompatResources" Version="1.7.0.5" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.28" />
|
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.30" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.Biometric" Version="1.1.0.25" />
|
<PackageReference Include="Xamarin.AndroidX.Biometric" Version="1.1.0.27" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.CoordinatorLayout" Version="1.2.0.17" />
|
<PackageReference Include="Xamarin.AndroidX.CoordinatorLayout" Version="1.3.0" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.CursorAdapter" Version="1.0.0.29" />
|
<PackageReference Include="Xamarin.AndroidX.CursorAdapter" Version="1.0.0.31" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Common" Version="2.8.5.1" />
|
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Common" Version="2.8.7.2" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime" Version="2.8.5.1" />
|
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime" Version="2.8.7.2" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.10" />
|
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.12" />
|
||||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.11.0.3" />
|
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.12.0.2" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.2" />
|
<PackageReference Include="Xamarin.Google.Guava" Version="33.4.0.1" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.3" />
|
<PackageReference Include="Xamarin.GooglePlayServices.Auth" Version="121.3.0.1" />
|
||||||
|
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.4" />
|
||||||
|
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
||||||
|
|||||||
Reference in New Issue
Block a user