Compare commits
33 Commits
bugfix/ref
...
update/upg
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96960ef376 | ||
|
|
46194317a8 | ||
|
|
c4d6e18759 | ||
|
|
ee41a600b1 | ||
|
|
07562cc5a9 | ||
|
|
0f5b411dc7 | ||
|
|
7577e3064c | ||
|
|
d33e1f266c | ||
|
|
aeda21f163 | ||
|
|
4d1142df4d | ||
|
|
4c632d0c72 | ||
|
|
cd75d7cda8 | ||
|
|
deb3701ebf | ||
|
|
2bd0d415b6 | ||
|
|
0bd58bd51f | ||
|
|
d998e08b4f | ||
|
|
60e5dc21f1 | ||
|
|
793341918b | ||
|
|
8759fe5346 | ||
|
|
1b8c0b8a70 | ||
|
|
087af49514 | ||
|
|
05e270bde3 | ||
|
|
7c6ce14348 | ||
|
|
fdfa2b0bf2 | ||
|
|
3fde725657 | ||
|
|
146f181682 | ||
|
|
1094b43009 | ||
|
|
379d43e2b8 | ||
|
|
73fc93ed96 | ||
|
|
980df2b3a7 | ||
|
|
830494851d | ||
|
|
6e30dd35ee | ||
|
|
f001d1fa54 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -1,6 +1,10 @@
|
||||
name: Build keepass2android app
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
# macos:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1 align="center"><img src="/src/keepass2android/Resources/mipmap-xxxhdpi/ic_launcher_online.png" align="center" width="100" alt="Keepass2Android Logo">Keepass2Android</h1>
|
||||
<h1 align="center"><img src="/src/keepass2android-app/Resources/mipmap-xxxhdpi/ic_launcher_online.png" align="center" width="100" alt="Keepass2Android Logo">Keepass2Android</h1>
|
||||
|
||||
|
||||
# What is Keepass2Android?
|
||||
|
||||
48
src/DropboxBinding/Additions/AboutAdditions.txt
Normal file
48
src/DropboxBinding/Additions/AboutAdditions.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
Additions allow you to add arbitrary C# to the generated classes
|
||||
before they are compiled. This can be helpful for providing convenience
|
||||
methods or adding pure C# classes.
|
||||
|
||||
== Adding Methods to Generated Classes ==
|
||||
|
||||
Let's say the library being bound has a Rectangle class with a constructor
|
||||
that takes an x and y position, and a width and length size. It will look like
|
||||
this:
|
||||
|
||||
public partial class Rectangle
|
||||
{
|
||||
public Rectangle (int x, int y, int width, int height)
|
||||
{
|
||||
// JNI bindings
|
||||
}
|
||||
}
|
||||
|
||||
Imagine we want to add a constructor to this class that takes a Point and
|
||||
Size structure instead of 4 ints. We can add a new file called Rectangle.cs
|
||||
with a partial class containing our new method:
|
||||
|
||||
public partial class Rectangle
|
||||
{
|
||||
public Rectangle (Point location, Size size) :
|
||||
this (location.X, location.Y, size.Width, size.Height)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
At compile time, the additions class will be added to the generated class
|
||||
and the final assembly will a Rectangle class with both constructors.
|
||||
|
||||
|
||||
== Adding C# Classes ==
|
||||
|
||||
Another thing that can be done is adding fully C# managed classes to the
|
||||
generated library. In the above example, let's assume that there isn't a
|
||||
Point class available in Java or our library. The one we create doesn't need
|
||||
to interact with Java, so we'll create it like a normal class in C#.
|
||||
|
||||
By adding a Point.cs file with this class, it will end up in the binding library:
|
||||
|
||||
public class Point
|
||||
{
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
}
|
||||
8
src/DropboxBinding/DropboxBinding.csproj
Normal file
8
src/DropboxBinding/DropboxBinding.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
14
src/DropboxBinding/Transforms/EnumFields.xml
Normal file
14
src/DropboxBinding/Transforms/EnumFields.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<enum-field-mappings>
|
||||
<!--
|
||||
This example converts the constants Fragment_id, Fragment_name,
|
||||
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
|
||||
to an enum called Android.Support.V4.App.FragmentTagType with values
|
||||
Id, Name, and Tag.
|
||||
|
||||
<mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType">
|
||||
<field jni-name="Fragment_name" clr-name="Name" value="0" />
|
||||
<field jni-name="Fragment_id" clr-name="Id" value="1" />
|
||||
<field jni-name="Fragment_tag" clr-name="Tag" value="2" />
|
||||
</mapping>
|
||||
-->
|
||||
</enum-field-mappings>
|
||||
13
src/DropboxBinding/Transforms/EnumMethods.xml
Normal file
13
src/DropboxBinding/Transforms/EnumMethods.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<enum-method-mappings>
|
||||
<!--
|
||||
This example changes the Java method:
|
||||
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
|
||||
to be:
|
||||
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
|
||||
when bound in C#.
|
||||
|
||||
<mapping jni-class="android/support/v4/app/Fragment.SavedState">
|
||||
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
|
||||
</mapping>
|
||||
-->
|
||||
</enum-method-mappings>
|
||||
35
src/DropboxBinding/Transforms/Metadata.xml
Normal file
35
src/DropboxBinding/Transforms/Metadata.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<metadata>
|
||||
|
||||
<remove-node path="/api/package[@name='com.dropbox.core']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.http']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.json']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.oauth']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.sdk.android']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.stone']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.util']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v1']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.account']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.callbacks']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.check']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.seenstate']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teamcommon']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.secondaryemails']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.async']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.auth']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.common']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.contacts']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.fileproperties']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.filerequests']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.files']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.paper']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.openid']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.sharing']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.team']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teamlog']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teampolicies']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.users']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.userscommon']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.android']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.android']" />
|
||||
</metadata>
|
||||
BIN
src/DropboxBinding/dropbox-android-sdk-7.0.0.aar
Normal file
BIN
src/DropboxBinding/dropbox-android-sdk-7.0.0.aar
Normal file
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCloudBindings", "PCloudBin
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kp2aAutofillParser.Tests", "Kp2aAutofillParser.Tests\Kp2aAutofillParser.Tests.csproj", "{F5A2A8F9-C084-498F-9603-9D927BA5C626}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropboxBinding", "DropboxBinding\DropboxBinding.csproj", "{2FE6E335-E834-4F86-AB83-2C5D225DA929}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -369,6 +371,30 @@ Global
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|Win32.Build.0 = Release|Any CPU
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|x64.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Win32.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
using Java.Lang;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@@ -179,6 +180,7 @@ namespace KeePassLib.Cryptography.KeyDerivation
|
||||
Marshal.Copy(pbSalt, 0, saltPtr, pbSalt.Length);
|
||||
|
||||
const UInt32 Argon2_d = 0;
|
||||
JavaSystem.LoadLibrary("argon2");
|
||||
|
||||
int ret = argon2_hash(
|
||||
(UInt32)uIt, (UInt32)(uMem / 1024), uPar,
|
||||
@@ -189,7 +191,7 @@ namespace KeePassLib.Cryptography.KeyDerivation
|
||||
|
||||
if (ret != 0)
|
||||
{
|
||||
throw new Exception("argon2_hash failed with " + ret);
|
||||
throw new System.Exception("argon2_hash failed with " + ret);
|
||||
}
|
||||
|
||||
pbRet = new byte[32];
|
||||
@@ -214,8 +216,9 @@ namespace KeePassLib.Cryptography.KeyDerivation
|
||||
return p;
|
||||
}
|
||||
|
||||
[DllImport("argon2")]
|
||||
static extern int argon2_hash(
|
||||
[LibraryImport("argon2")]
|
||||
[return: MarshalAs(UnmanagedType.I4)]
|
||||
public static partial int argon2_hash(
|
||||
UInt32 t_cost, UInt32 m_cost, UInt32 parallelism,
|
||||
IntPtr pwd, IntPtr pwdlen,
|
||||
IntPtr salt, IntPtr saltlen,
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\values\Strings.xml" />
|
||||
|
||||
@@ -730,7 +730,7 @@ namespace Kp2aAutofillParser
|
||||
{
|
||||
public List<TField> InputFields { get; set; } = new List<TField>();
|
||||
|
||||
public string PackageId { get; set; } = null;
|
||||
public string? PackageId { get; set; } = null;
|
||||
public string WebDomain { get; set; } = null;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,9 +11,9 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentFTP" Version="51.1.0" />
|
||||
<PackageReference Include="MegaApiClient" Version="1.10.4" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="1.21.0" />
|
||||
<PackageReference Include="Microsoft.Graph.Auth" Version="1.0.0-preview.7" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.49.1" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="5.68.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.8.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.13.1.5" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.11.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -138,7 +138,8 @@ namespace keepass2android
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (host.IndexOf(otherHost, StringComparison.InvariantCultureIgnoreCase) > -1)
|
||||
if (string.Equals(host, otherHost, StringComparison.OrdinalIgnoreCase) ||
|
||||
host.EndsWith("." + otherHost, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
pgResults.AddEntry(entry, false);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,8 @@ dependencies {
|
||||
exclude group: 'com.google.android.google-play-services'
|
||||
}
|
||||
implementation 'com.google.apis:google-api-services-drive:v2-rev102-1.16.0-rc'
|
||||
implementation 'com.dropbox.core:dropbox-core-sdk:5.4.6'
|
||||
implementation 'com.dropbox.core:dropbox-core-sdk:7.0.0'
|
||||
implementation 'com.dropbox.core:dropbox-android-sdk:7.0.0'
|
||||
implementation 'com.google.api-client:google-api-client:1.30.5'
|
||||
implementation 'com.google.api-client:google-api-client-android:1.30.5'
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.dropbox.core.DbxOAuth1Upgrader;
|
||||
import com.dropbox.core.DbxRequestConfig;
|
||||
import com.dropbox.core.InvalidAccessTokenException;
|
||||
import com.dropbox.core.android.Auth;
|
||||
|
||||
import com.dropbox.core.json.JsonReadException;
|
||||
import com.dropbox.core.oauth.DbxCredential;
|
||||
import com.dropbox.core.v2.DbxClientV2;
|
||||
@@ -154,7 +155,7 @@ public class DropboxV2Storage extends JavaFileStorageBase
|
||||
{
|
||||
if ((previousFileVersion == null) || (previousFileVersion.equals("")))
|
||||
return false;
|
||||
path = removeProtocol(path);
|
||||
path = removeProtocol(path);
|
||||
try {
|
||||
Metadata entry = dbxClient.files().getMetadata(path);
|
||||
return !String.valueOf(entry.hashCode()) .equals(previousFileVersion);
|
||||
|
||||
@@ -356,7 +356,13 @@ public class KP2AKeyboard extends InputMethodService
|
||||
pFilter.addAction("android.intent.action.PACKAGE_ADDED");
|
||||
pFilter.addAction("android.intent.action.PACKAGE_REPLACED");
|
||||
pFilter.addAction("android.intent.action.PACKAGE_REMOVED");
|
||||
registerReceiver(mPluginManager, pFilter);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
registerReceiver(mPluginManager, pFilter, RECEIVER_EXPORTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerReceiver(mPluginManager, pFilter);
|
||||
}
|
||||
|
||||
|
||||
LatinIMEUtil.GCUtils.getInstance().reset();
|
||||
@@ -375,16 +381,28 @@ public class KP2AKeyboard extends InputMethodService
|
||||
|
||||
// register to receive ringer mode changes for silent mode
|
||||
IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION);
|
||||
registerReceiver(mSilentModeReceiver, filter);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
registerReceiver(mSilentModeReceiver, filter, RECEIVER_EXPORTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerReceiver(mSilentModeReceiver, filter);
|
||||
}
|
||||
|
||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||
|
||||
//check if we have KP2A data available:
|
||||
mHadKp2aData = mShowKp2aKeyboard = keepass2android.kbbridge.KeyboardData.hasData();
|
||||
mHadKp2aData = mShowKp2aKeyboard = KeyboardData.hasData();
|
||||
|
||||
mClearKeyboardReceiver = new ClearKeyboardBroadcastReceiver();
|
||||
registerReceiver(mClearKeyboardReceiver, new IntentFilter(get_KEEPASS2ANDROID_KEYBOARD_CLEARED(this)));
|
||||
android.util.Log.d("KP2AK", "registered receiver for clear keyboard broadcast: "+get_KEEPASS2ANDROID_KEYBOARD_CLEARED(this));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
registerReceiver(mClearKeyboardReceiver, new IntentFilter(get_KEEPASS2ANDROID_KEYBOARD_CLEARED(this)), RECEIVER_EXPORTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
registerReceiver(mClearKeyboardReceiver, new IntentFilter(get_KEEPASS2ANDROID_KEYBOARD_CLEARED(this)));
|
||||
}
|
||||
Log.d("KP2AK", "registered receiver for clear keyboard broadcast: "+get_KEEPASS2ANDROID_KEYBOARD_CLEARED(this));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace keepass2android
|
||||
{
|
||||
[Activity(Label = "@string/app_name",
|
||||
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden,
|
||||
Theme = "@style/Kp2aTheme_ActionBar")]
|
||||
Theme = "@style/Kp2aTheme_BlueActionBar")]
|
||||
public class CreateDatabaseActivity : LifecycleAwareActivity
|
||||
{
|
||||
private IOConnectionInfo _ioc;
|
||||
|
||||
@@ -53,6 +53,7 @@ using keepass2android.fileselect;
|
||||
using KeeTrayTOTP.Libraries;
|
||||
using Boolean = Java.Lang.Boolean;
|
||||
using Android.Util;
|
||||
using AndroidX.Core.Content;
|
||||
using Google.Android.Material.Dialog;
|
||||
using keepass2android;
|
||||
|
||||
@@ -491,9 +492,9 @@ namespace keepass2android
|
||||
App.Kp2a.LastOpenedEntry = new PwEntryOutput(Entry, App.Kp2a.CurrentDb);
|
||||
|
||||
_pluginActionReceiver = new PluginActionReceiver(this);
|
||||
RegisterReceiver(_pluginActionReceiver, new IntentFilter(Strings.ActionAddEntryAction));
|
||||
ContextCompat.RegisterReceiver(this, _pluginActionReceiver, new IntentFilter(Strings.ActionAddEntryAction), (int)ReceiverFlags.Exported);
|
||||
_pluginFieldReceiver = new PluginFieldReceiver(this);
|
||||
RegisterReceiver(_pluginFieldReceiver, new IntentFilter(Strings.ActionSetEntryField));
|
||||
ContextCompat.RegisterReceiver(this, _pluginFieldReceiver, new IntentFilter(Strings.ActionSetEntryField), (int)ReceiverFlags.Exported);
|
||||
|
||||
var notifyPluginsOnOpenThread = new Thread(NotifyPluginsOnOpen);
|
||||
notifyPluginsOnOpenThread.Start();
|
||||
|
||||
@@ -21,6 +21,7 @@ using Android.OS;
|
||||
using Android.Preferences;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using AndroidX.Core.Content;
|
||||
using KeePassLib.Serialization;
|
||||
|
||||
namespace keepass2android
|
||||
@@ -69,7 +70,7 @@ namespace keepass2android
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
|
||||
@@ -21,6 +21,7 @@ using Android.OS;
|
||||
using Android.Preferences;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using AndroidX.Core.Content;
|
||||
using KeePassLib.Serialization;
|
||||
|
||||
namespace keepass2android
|
||||
@@ -55,7 +56,7 @@ namespace keepass2android
|
||||
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
|
||||
using System;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using AndroidX.Core.Content;
|
||||
using KeePassLib.Serialization;
|
||||
|
||||
namespace keepass2android
|
||||
@@ -39,7 +40,7 @@ namespace keepass2android
|
||||
_intentReceiver = new LockCloseActivityBroadcastReceiver(this);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
|
||||
protected override void OnResume() {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</queries>
|
||||
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_notify_locked" android:label="KP2A entry search" android:name="keepass2android.keepass2android_debug.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_debug.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
<application
|
||||
@@ -256,6 +256,7 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" android:maxSdkVersion="22" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" android:maxSdkVersion="22" />
|
||||
<uses-permission android:name="keepass2android.keepass2android_debug.permission.KP2aInternalFileBrowsing" />
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher" android:label="KP2A entry search" android:name="keepass2android.keepass2android.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
@@ -270,6 +270,7 @@ The scheme=file is still there for old OS devices. It's also queried by apps lik
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" android:maxSdkVersion="22" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" android:maxSdkVersion="22" />
|
||||
<uses-permission android:name="keepass2android.keepass2android.permission.KP2aInternalFileBrowsing" />
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||
<permission android:description="@string/permission_desc2" android:icon="@drawable/ic_launcher_offline" android:label="KP2A entry search" android:name="keepass2android.keepass2android_nonet.permission.KP2aInternalSearch" android:protectionLevel="signature" />
|
||||
<permission android:description="@string/permission_desc3" android:icon="@drawable/ic_launcher_offline" android:label="KP2A choose autofill dataset" android:name="keepass2android.keepass2android_nonet.permission.Kp2aChooseAutofill" android:protectionLevel="signature" />
|
||||
<application
|
||||
|
||||
@@ -65,6 +65,7 @@ using Enum = System.Enum;
|
||||
using Exception = System.Exception;
|
||||
using String = System.String;
|
||||
using Toolbar = AndroidX.AppCompat.Widget.Toolbar;
|
||||
using AndroidX.Core.Content;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@@ -647,7 +648,7 @@ namespace keepass2android
|
||||
_intentReceiver = new PasswordActivityBroadcastReceiver(this);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
|
||||
|
||||
//use FlagSecure to make sure the last (revealed) character of the master password is not visible in recent apps
|
||||
|
||||
@@ -34,6 +34,7 @@ using keepass2android;
|
||||
using KeePassLib;
|
||||
using KeePassLib.Serialization;
|
||||
using Toolbar = AndroidX.AppCompat.Widget.Toolbar;
|
||||
using AndroidX.Core.Content;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@@ -153,7 +154,7 @@ namespace keepass2android
|
||||
_intentReceiver = new QuickUnlockBroadcastReceiver(this);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
|
||||
Util.SetNoPersonalizedLearning(FindViewById<EditText>(Resource.Id.QuickUnlock_password));
|
||||
|
||||
@@ -503,8 +504,6 @@ namespace keepass2android
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@@ -82,7 +83,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:inputType="textPassword"
|
||||
android:hint="password"
|
||||
android:hint="@string/hint_pass"
|
||||
android:importantForAccessibility="no"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<LinearLayout
|
||||
@@ -135,6 +136,7 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/entry_extras_container"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
@@ -173,6 +175,7 @@
|
||||
</LinearLayout>
|
||||
<!-- file attachments -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/entry_binaries_container"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
@@ -228,6 +231,7 @@
|
||||
</LinearLayout>
|
||||
<!--expires-->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/expires_section"
|
||||
style="@style/EntryEditSingleLine_container">
|
||||
<ImageView
|
||||
|
||||
@@ -26,6 +26,7 @@ using KeePassLib.Keys;
|
||||
using KeePassLib.Serialization;
|
||||
using Console = System.Console;
|
||||
using Object = Java.Lang.Object;
|
||||
using AndroidX.Core.Content;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@@ -343,7 +344,7 @@ namespace keepass2android
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
RegisterReceiver(_intentReceiver, filter);
|
||||
ContextCompat.RegisterReceiver(this, _intentReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1342,7 +1342,7 @@ namespace keepass2android
|
||||
intentFilter.AddAction(Intents.LockDatabase);
|
||||
intentFilter.AddAction(Intents.LockDatabaseByTimeout);
|
||||
intentFilter.AddAction(Intents.CloseDatabase);
|
||||
Context.RegisterReceiver(broadcastReceiver, intentFilter);
|
||||
ContextCompat.RegisterReceiver(Context, broadcastReceiver, intentFilter, (int)ReceiverFlags.Exported);
|
||||
|
||||
//ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<ApplicationId>keepass2android.keepass2android</ApplicationId>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\fontawesome-webfont.ttf" />
|
||||
@@ -712,9 +713,6 @@
|
||||
<None Remove="Resources\xml\searchable_mattest.xml" />
|
||||
<None Remove="Resources\xml\searchable_offline.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidNativeLibrary Include="..\java\argon2\libs\armeabi-v7a\libargon2.so" Link="libargon2.so" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-mdpi\ic_storage_kp2a">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -728,6 +726,12 @@
|
||||
<Folder Include="Resources\drawable-xxhdpi\" />
|
||||
<Folder Include="Resources\drawable-xxxhdpi\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidNativeLibrary Include="..\java\argon2\libs\arm64-v8a\libargon2.so" Link="arm64-v8a\libargon2.so" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidNativeLibrary Include="..\java\argon2\libs\armeabi-v7a\libargon2.so" Link="armeabi-v7a\libargon2.so" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.7.0.3" />
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat.AppCompatResources" Version="1.7.0.3" />
|
||||
@@ -744,6 +748,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
||||
<ProjectReference Include="..\DropboxBinding\DropboxBinding.csproj" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" />
|
||||
<ProjectReference Include="..\Kp2aAutofillParser\Kp2aAutofillParser.csproj" />
|
||||
<ProjectReference Include="..\KP2AKdbLibraryBinding\KP2AKdbLibraryBinding.csproj" />
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace keepass2android.services.AutofillBase
|
||||
static readonly HashSet<string> _trustedBrowsers = new HashSet<string>
|
||||
{
|
||||
"org.mozilla.firefox","org.mozilla.firefox_beta","org.mozilla.klar","org.mozilla.focus",
|
||||
"org.mozilla.fenix","org.mozilla.fenix.nightly","org.mozilla.reference.browser",
|
||||
"org.mozilla.fenix","org.mozilla.reference.browser",
|
||||
"com.android.browser","com.android.chrome","com.chrome.beta","com.chrome.dev","com.chrome.canary",
|
||||
"com.google.android.apps.chrome","com.google.android.apps.chrome_dev",
|
||||
"com.opera.browser","com.opera.browser.beta","com.opera.mini.native","com.opera.mini.native.beta","com.opera.touch",
|
||||
|
||||
@@ -86,6 +86,8 @@ namespace keepass2android.services.AutofillBase
|
||||
ParseRecursive(autofillView, view, isManualRequest);
|
||||
}
|
||||
|
||||
autofillView.PackageId = autofillView.PackageId ?? _structure.ActivityComponent.PackageName;
|
||||
|
||||
return autofillView;
|
||||
|
||||
}
|
||||
@@ -122,7 +124,6 @@ namespace keepass2android.services.AutofillBase
|
||||
}
|
||||
|
||||
autofillView.InputFields.Add(new ViewNodeInputField(viewNode));
|
||||
|
||||
var childrenSize = viewNode.ChildCount;
|
||||
if (childrenSize > 0)
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ using KeePass.Util.Spr;
|
||||
using keepass2android;
|
||||
using KeePassLib.Serialization;
|
||||
using PluginTOTP;
|
||||
using AndroidX.Core.Content;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@@ -322,7 +323,8 @@ namespace keepass2android
|
||||
_stopOnLockBroadcastReceiver = new StopOnLockBroadcastReceiver(this);
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intents.DatabaseLocked);
|
||||
RegisterReceiver(_stopOnLockBroadcastReceiver, filter);
|
||||
|
||||
ContextCompat.RegisterReceiver(this, _stopOnLockBroadcastReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
|
||||
if ((intent.Action == Intents.ShowNotification) || (intent.Action == Intents.UpdateKeyboard))
|
||||
@@ -529,7 +531,7 @@ namespace keepass2android
|
||||
_notificationDeletedBroadcastReceiver = new NotificationDeletedBroadcastReceiver(this);
|
||||
IntentFilter deletefilter = new IntentFilter();
|
||||
deletefilter.AddAction(ActionNotificationCancelled);
|
||||
RegisterReceiver(_notificationDeletedBroadcastReceiver, deletefilter);
|
||||
ContextCompat.RegisterReceiver(this, _notificationDeletedBroadcastReceiver, deletefilter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,10 +18,12 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
|
||||
using System;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.Graphics;
|
||||
using Android.OS;
|
||||
using Android.Preferences;
|
||||
using AndroidX.Core.App;
|
||||
using AndroidX.Core.Content;
|
||||
using keepass2android;
|
||||
using KeePassLib.Utility;
|
||||
|
||||
@@ -37,7 +39,9 @@ namespace keepass2android
|
||||
/// used by the user. This ensures the database is kept in memory (until Android kills it due to low memory).
|
||||
/// It is important to also have a foreground service also for the "unlocked" state because it's really
|
||||
/// irritating if the db is closed while switching between apps.
|
||||
[Service]
|
||||
[Service(ForegroundServiceType = ForegroundService.TypeSpecialUse )]
|
||||
[MetaData("android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE", Value = " This service is running as foreground service to keep the app alive even when it's not currently used by the user. This ensures the database is kept in memory (until Android kills it due to low memory). It is important to also have a foreground service also for the \"unlocked\" state because it's really irritating if the db is closed while switching between apps.")]
|
||||
|
||||
public class OngoingNotificationsService : Service
|
||||
{
|
||||
protected override void AttachBaseContext(Context baseContext)
|
||||
@@ -57,8 +61,8 @@ namespace keepass2android
|
||||
_screenOffReceiver = new ScreenOffReceiver();
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.AddAction(Intent.ActionScreenOff);
|
||||
RegisterReceiver(_screenOffReceiver, filter);
|
||||
}
|
||||
ContextCompat.RegisterReceiver(this, _screenOffReceiver, filter, (int)ReceiverFlags.Exported);
|
||||
}
|
||||
|
||||
|
||||
public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId)
|
||||
|
||||
Reference in New Issue
Block a user