mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-11 20:15:04 -05:00
Adaptions to 2.24 KPLib changes
This commit is contained in:
parent
1b84707970
commit
38572cf2a6
@ -592,7 +592,7 @@ namespace KeePassLib.Serialization
|
|||||||
[ProtoMember(5, OverwriteList = true)]
|
[ProtoMember(5, OverwriteList = true)]
|
||||||
public byte[] CustomIconUuid
|
public byte[] CustomIconUuid
|
||||||
{
|
{
|
||||||
get { return mGroup.CustomIconUuid.EqualsValue(PwUuid.Zero) ? null : mGroup.CustomIconUuid.UuidBytes; ; }
|
get { return mGroup.CustomIconUuid.Equals(PwUuid.Zero) ? null : mGroup.CustomIconUuid.UuidBytes; ; }
|
||||||
set { mGroup.CustomIconUuid = value == null ? PwUuid.Zero : new PwUuid(value); }
|
set { mGroup.CustomIconUuid = value == null ? PwUuid.Zero : new PwUuid(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ namespace KeePassLib.Serialization
|
|||||||
[ProtoMember(3, OverwriteList = true)]
|
[ProtoMember(3, OverwriteList = true)]
|
||||||
public byte[] CustomIconUuid
|
public byte[] CustomIconUuid
|
||||||
{
|
{
|
||||||
get { return mEntry.CustomIconUuid.EqualsValue(PwUuid.Zero) ? null : mEntry.CustomIconUuid.UuidBytes; }
|
get { return mEntry.CustomIconUuid.Equals(PwUuid.Zero) ? null : mEntry.CustomIconUuid.UuidBytes; }
|
||||||
set { mEntry.CustomIconUuid = value == null ? PwUuid.Zero : new PwUuid(value); }
|
set { mEntry.CustomIconUuid = value == null ? PwUuid.Zero : new PwUuid(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace keepass2android
|
|||||||
#region IEqualityComparer implementation
|
#region IEqualityComparer implementation
|
||||||
public bool Equals (PwGroup x, PwGroup y)
|
public bool Equals (PwGroup x, PwGroup y)
|
||||||
{
|
{
|
||||||
return x.Uuid.EqualsValue(y.Uuid);
|
return x.Uuid.Equals(y.Uuid);
|
||||||
}
|
}
|
||||||
public int GetHashCode (PwGroup obj)
|
public int GetHashCode (PwGroup obj)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ namespace keepass2android
|
|||||||
#region IEqualityComparer implementation
|
#region IEqualityComparer implementation
|
||||||
public bool Equals (PwUuid x, PwUuid y)
|
public bool Equals (PwUuid x, PwUuid y)
|
||||||
{
|
{
|
||||||
return x.EqualsValue(y);
|
return x.Equals(y);
|
||||||
}
|
}
|
||||||
public int GetHashCode (PwUuid obj)
|
public int GetHashCode (PwUuid obj)
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ namespace keepass2android
|
|||||||
pwDatabase.Open(databaseData ?? fileStorage.OpenFileForRead(iocInfo), filename, iocInfo, compositeKey, status);
|
pwDatabase.Open(databaseData ?? fileStorage.OpenFileForRead(iocInfo), filename, iocInfo, compositeKey, status);
|
||||||
LastFileVersion = fileVersion;
|
LastFileVersion = fileVersion;
|
||||||
}
|
}
|
||||||
catch (InvalidCompositeKeyException e)
|
catch (InvalidCompositeKeyException)
|
||||||
{
|
{
|
||||||
if ((password == "") && (keyfile != null))
|
if ((password == "") && (keyfile != null))
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ namespace keepass2android
|
|||||||
|
|
||||||
bGroupListUpdateRequired = true;
|
bGroupListUpdateRequired = true;
|
||||||
}
|
}
|
||||||
else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.EqualsValue(Db.KpDatabase.RecycleBinUuid)); }
|
else { System.Diagnostics.Debug.Assert(pgRecycleBin.Uuid.Equals(Db.KpDatabase.RecycleBinUuid)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract UiStringKey QuestionsResourceId
|
protected abstract UiStringKey QuestionsResourceId
|
||||||
|
@ -56,7 +56,7 @@ namespace keepass2android
|
|||||||
// Mark group dirty if title, icon or Expiry stuff changes
|
// Mark group dirty if title, icon or Expiry stuff changes
|
||||||
if ( ! _backup.Strings.ReadSafe (PwDefs.TitleField).Equals(_updatedEntry.Strings.ReadSafe (PwDefs.TitleField))
|
if ( ! _backup.Strings.ReadSafe (PwDefs.TitleField).Equals(_updatedEntry.Strings.ReadSafe (PwDefs.TitleField))
|
||||||
|| ! _backup.IconId.Equals(_updatedEntry.IconId)
|
|| ! _backup.IconId.Equals(_updatedEntry.IconId)
|
||||||
|| ! _backup.CustomIconUuid.EqualsValue(_updatedEntry.CustomIconUuid)
|
|| !_backup.CustomIconUuid.Equals(_updatedEntry.CustomIconUuid)
|
||||||
|| _backup.Expires != _updatedEntry.Expires
|
|| _backup.Expires != _updatedEntry.Expires
|
||||||
|| (_backup.Expires && (! _backup.ExpiryTime.Equals(_updatedEntry.ExpiryTime)))
|
|| (_backup.Expires && (! _backup.ExpiryTime.Equals(_updatedEntry.ExpiryTime)))
|
||||||
)
|
)
|
||||||
|
@ -21,8 +21,6 @@ namespace Kp2aUnitTests
|
|||||||
_builtIn.Delete(ioc);
|
_builtIn.Delete(ioc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IFileStorageSetup RequiredSetup { get { return null; } }
|
|
||||||
|
|
||||||
public void Delete(IOConnectionInfo ioc)
|
public void Delete(IOConnectionInfo ioc)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
@ -120,7 +120,7 @@ namespace keepass2android
|
|||||||
entryId = new PwUuid(MemUtil.HexStringToByteArray(uuidBytes));
|
entryId = new PwUuid(MemUtil.HexStringToByteArray(uuidBytes));
|
||||||
|
|
||||||
State.ParentGroup = null;
|
State.ParentGroup = null;
|
||||||
if (entryId.EqualsValue(PwUuid.Zero))
|
if (entryId.Equals(PwUuid.Zero))
|
||||||
{
|
{
|
||||||
String groupId = i.GetStringExtra(KeyParent);
|
String groupId = i.GetStringExtra(KeyParent);
|
||||||
State.ParentGroup = db.KpDatabase.RootGroup.FindGroup(new PwUuid(MemUtil.HexStringToByteArray(groupId)), true);
|
State.ParentGroup = db.KpDatabase.RootGroup.FindGroup(new PwUuid(MemUtil.HexStringToByteArray(groupId)), true);
|
||||||
|
@ -466,7 +466,7 @@ namespace keepass2android
|
|||||||
MoveElementTask moveElementTask = AppTask as MoveElementTask;
|
MoveElementTask moveElementTask = AppTask as MoveElementTask;
|
||||||
if (moveElementTask != null)
|
if (moveElementTask != null)
|
||||||
{
|
{
|
||||||
if (moveElementTask.Uuid.EqualsValue(uuid))
|
if (moveElementTask.Uuid.Equals(uuid))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -148,9 +148,10 @@ namespace keepass2android
|
|||||||
|
|
||||||
private static void ShowInternalLocalFileChooser(Activity act, int requestCodeBrowse, bool forSaving, string defaultPath)
|
private static void ShowInternalLocalFileChooser(Activity act, int requestCodeBrowse, bool forSaving, string defaultPath)
|
||||||
{
|
{
|
||||||
const string fileProviderAuthority = "keepass2android.keepass2android.android-filechooser.localfile";
|
|
||||||
|
|
||||||
#if !EXCLUDE_FILECHOOSER
|
#if !EXCLUDE_FILECHOOSER
|
||||||
|
const string fileProviderAuthority = "keepass2android.keepass2android.android-filechooser.localfile";
|
||||||
|
|
||||||
Intent i = Keepass2android.Kp2afilechooser.Kp2aFileChooserBridge.GetLaunchFileChooserIntent(act,
|
Intent i = Keepass2android.Kp2afilechooser.Kp2aFileChooserBridge.GetLaunchFileChooserIntent(act,
|
||||||
fileProviderAuthority,
|
fileProviderAuthority,
|
||||||
defaultPath);
|
defaultPath);
|
||||||
|
@ -53,7 +53,7 @@ namespace keepass2android
|
|||||||
|
|
||||||
public Drawable GetIconDrawable (Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId)
|
public Drawable GetIconDrawable (Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId)
|
||||||
{
|
{
|
||||||
if (!customIconId.EqualsValue(PwUuid.Zero)) {
|
if (!customIconId.Equals(PwUuid.Zero)) {
|
||||||
return GetIconDrawable (res, db, customIconId);
|
return GetIconDrawable (res, db, customIconId);
|
||||||
}
|
}
|
||||||
return GetIconDrawable (res, icon);
|
return GetIconDrawable (res, icon);
|
||||||
@ -85,7 +85,7 @@ namespace keepass2android
|
|||||||
public Drawable GetIconDrawable (Resources res, PwDatabase db, PwUuid icon)
|
public Drawable GetIconDrawable (Resources res, PwDatabase db, PwUuid icon)
|
||||||
{
|
{
|
||||||
InitBlank (res);
|
InitBlank (res);
|
||||||
if (icon.EqualsValue(PwUuid.Zero)) {
|
if (icon.Equals(PwUuid.Zero)) {
|
||||||
return _blank;
|
return _blank;
|
||||||
}
|
}
|
||||||
Drawable draw;
|
Drawable draw;
|
||||||
|
@ -34,8 +34,6 @@ namespace keepass2android.search
|
|||||||
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
|
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
|
||||||
public class SearchResults : GroupBaseActivity
|
public class SearchResults : GroupBaseActivity
|
||||||
{
|
{
|
||||||
private GroupView _groupView;
|
|
||||||
|
|
||||||
protected override void OnCreate (Bundle bundle)
|
protected override void OnCreate (Bundle bundle)
|
||||||
{
|
{
|
||||||
base.OnCreate (bundle);
|
base.OnCreate (bundle);
|
||||||
|
Loading…
Reference in New Issue
Block a user