mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-06 00:32:32 -08:00
KeePass 2.11 compatibility fixes.
This commit is contained in:
1 parent
8081d88656
commit
7e9265f332
6 files changed
+35
-4
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.keepass"
|
||||
android:versionName="1.5.6" android:versionCode="47">
|
||||
android:versionCode="48" android:versionName="1.5.7">
|
||||
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
KeePassDroid (1.5.7)
|
||||
* KeePass 2.11 compatibility fixes
|
||||
|
||||
KeePassDroid (1.5.6)
|
||||
* Keyfile Fix
|
||||
|
||||
|
||||
@@ -56,7 +56,12 @@ public class PwDatabaseV4 extends PwDatabase {
|
||||
public Date descriptionChanged;
|
||||
public String defaultUserName;
|
||||
public Date defaultUserNameChanged;
|
||||
public long maintenanceHistoryDays;
|
||||
|
||||
public Date keyLastChanged = DEFAULT_NOW;
|
||||
public long keyChangeRecDays = -1;
|
||||
public long keyChangeForceDays = 1;
|
||||
|
||||
public long maintenanceHistoryDays = 365;
|
||||
public boolean recycleBinEnabled;
|
||||
public UUID recycleBinUUID;
|
||||
public Date recycleBinChanged;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PwDbHeaderV4 extends PwDbHeader {
|
||||
public static final int DBSIG_2 = 0xB54BFB67;
|
||||
|
||||
private static final int FILE_VERSION_CRITICAL_MASK = 0xFFFF0000;
|
||||
private static final int FILE_VERSION_32 = 0x00020000;
|
||||
private static final int FILE_VERSION_32 = 0x02010100;
|
||||
|
||||
private class PwDbHeaderV4Fields {
|
||||
public static final byte EndOfHeader = 0;
|
||||
|
||||
@@ -53,6 +53,7 @@ public class PwEntryV4 extends PwEntry implements ITimeLogger {
|
||||
private long usageCount = 0;
|
||||
public String url;
|
||||
public String additional;
|
||||
public String tags;
|
||||
|
||||
public class AutoType {
|
||||
public boolean enabled;
|
||||
|
||||
@@ -177,6 +177,9 @@ public class ImporterV4 extends Importer {
|
||||
private static final String ElemDbDefaultUser = "DefaultUserName";
|
||||
private static final String ElemDbDefaultUserChanged = "DefaultUserNameChanged";
|
||||
private static final String ElemDbMntncHistoryDays = "MaintenanceHistoryDays";
|
||||
private static final String ElemDbKeyChanged = "MasterKeyChanged";
|
||||
private static final String ElemDbKeyChangeRec = "MasterKeyChangeRec";
|
||||
private static final String ElemDbKeyChangeForce = "MasterKeyChangeForce";
|
||||
private static final String ElemRecycleBinEnabled = "RecycleBinEnabled";
|
||||
private static final String ElemRecycleBinUuid = "RecycleBinUUID";
|
||||
private static final String ElemRecycleBinChanged = "RecycleBinChanged";
|
||||
@@ -210,6 +213,7 @@ public class ImporterV4 extends Importer {
|
||||
private static final String ElemBgColor = "BackgroundColor";
|
||||
private static final String ElemOverrideUrl = "OverrideURL";
|
||||
private static final String ElemTimes = "Times";
|
||||
private static final String ElemTags = "Tags";
|
||||
|
||||
private static final String ElemCreationTime = "CreationTime";
|
||||
private static final String ElemLastModTime = "LastModificationTime";
|
||||
@@ -366,6 +370,12 @@ public class ImporterV4 extends Importer {
|
||||
db.defaultUserNameChanged = ReadTime(xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemDbMntncHistoryDays) ) {
|
||||
db.maintenanceHistoryDays = ReadUInt(xpp, DEFAULT_HISTORY_DAYS);
|
||||
} else if ( name.equalsIgnoreCase(ElemDbKeyChanged) ) {
|
||||
db.keyLastChanged = ReadTime(xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemDbKeyChangeRec) ) {
|
||||
db.keyChangeRecDays = ReadLong(xpp, -1);
|
||||
} else if ( name.equalsIgnoreCase(ElemDbKeyChangeForce) ) {
|
||||
db.keyChangeForceDays = ReadLong(xpp, -1);
|
||||
} else if ( name.equalsIgnoreCase(ElemMemoryProt) ) {
|
||||
return SwitchContext(ctx, KdbContext.MemoryProtection, xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemCustomIcons) ) {
|
||||
@@ -518,6 +528,8 @@ public class ImporterV4 extends Importer {
|
||||
ctxEntry.backgroupColor = ReadString(xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemOverrideUrl) ) {
|
||||
ctxEntry.overrideURL = ReadString(xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemTags) ) {
|
||||
ctxEntry.tags = ReadString(xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemTimes) ) {
|
||||
return SwitchContext(ctx, KdbContext.EntryTimes, xpp);
|
||||
} else if ( name.equalsIgnoreCase(ElemString) ) {
|
||||
@@ -822,13 +834,23 @@ public class ImporterV4 extends Importer {
|
||||
|
||||
}
|
||||
|
||||
private long ReadULong(XmlPullParser xpp, long uDefault) throws IOException, XmlPullParserException {
|
||||
private long ReadLong(XmlPullParser xpp, long def) throws IOException, XmlPullParserException {
|
||||
String str = ReadString(xpp);
|
||||
|
||||
long u;
|
||||
try {
|
||||
u = Long.parseLong(str);
|
||||
} catch( NumberFormatException e) {
|
||||
u = def;
|
||||
}
|
||||
|
||||
return u;
|
||||
}
|
||||
|
||||
private long ReadULong(XmlPullParser xpp, long uDefault) throws IOException, XmlPullParserException {
|
||||
long u = ReadLong(xpp, uDefault);
|
||||
|
||||
if ( u < 0 ) {
|
||||
u = uDefault;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user