Skip to content

Commit

Permalink
Merge branch 'release/2.5.0.0beta7'
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Mar 25, 2018
2 parents 943d7ca + 8da6b88 commit 38c264e
Show file tree
Hide file tree
Showing 149 changed files with 3,716 additions and 3,859 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
KeepassDX (2.5.0.0beta7)
* Rebuild Notifications
* Change links to https
* Add extended Ascii (ñæËÌÂÝÜ...)
* Upgrade custom visibility font
* Best fingerprint error management
* Add setting to prevent the password copy
* Fix bugs

KeepassDX (2.5.0.0beta6)
* Fix crash

KeepassDX (2.5.0.0beta5)
* Autofill (Android O)
* Deletion for group
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.kunzisoft.keepass"
minSdkVersion 14
targetSdkVersion 27
versionCode = 6
versionName = "2.5.0.0beta6"
versionCode = 7
versionName = "2.5.0.0beta7"
multiDexEnabled true

testApplicationId = "com.keepassdroid.tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected void setUp() throws Exception {
}

public void testName() {
assertTrue("Name was " + mPE.title, mPE.title.equals("Amazon"));
assertTrue("Name was " + mPE.getTitle(), mPE.getTitle().equals("Amazon"));
}

public void testPassword() throws UnsupportedEncodingException {
Expand All @@ -54,7 +54,7 @@ public void testPassword() throws UnsupportedEncodingException {

public void testCreation() {
Calendar cal = Calendar.getInstance();
cal.setTime(mPE.tCreation.getJDate());
cal.setTime(mPE.getCreationTime().getDate());

assertEquals("Incorrect year.", cal.get(Calendar.YEAR), 2009);
assertEquals("Incorrect month.", cal.get(Calendar.MONTH), 3);
Expand Down
41 changes: 21 additions & 20 deletions app/src/androidTest/java/com/keepassdroid/tests/PwEntryTestV4.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,41 @@
*/
package com.keepassdroid.tests;

import java.util.UUID;

import junit.framework.TestCase;

import com.keepassdroid.database.AutoType;
import com.keepassdroid.database.PwEntryV4;
import com.keepassdroid.database.PwGroupV4;
import com.keepassdroid.database.PwIconCustom;
import com.keepassdroid.database.PwIconStandard;
import com.keepassdroid.database.security.ProtectedBinary;
import com.keepassdroid.database.security.ProtectedString;

import junit.framework.TestCase;

import java.util.UUID;

public class PwEntryTestV4 extends TestCase {
public void testAssign() {
PwEntryV4 entry = new PwEntryV4();

entry.additional = "test223";
entry.setAdditional("test223");

entry.autoType = entry.new AutoType();
entry.autoType.defaultSequence = "1324";
entry.autoType.enabled = true;
entry.autoType.obfuscationOptions = 123412432109L;
entry.autoType.put("key", "value");
entry.setAutoType(new AutoType());
entry.getAutoType().defaultSequence = "1324";
entry.getAutoType().enabled = true;
entry.getAutoType().obfuscationOptions = 123412432109L;
entry.getAutoType().put("key", "value");

entry.backgroupColor = "blue";
entry.binaries.put("key1", new ProtectedBinary(false, new byte[] {0,1}));
entry.customIcon = new PwIconCustom(UUID.randomUUID(), new byte[0]);
entry.foregroundColor = "red";
entry.history.add(new PwEntryV4());
entry.icon = new PwIconStandard(5);
entry.overrideURL = "override";
entry.parent = new PwGroupV4();
entry.setBackgroupColor("blue");
entry.putProtectedBinary("key1", new ProtectedBinary(false, new byte[] {0,1}));
entry.setCustomIcon(new PwIconCustom(UUID.randomUUID(), new byte[0]));
entry.setForegroundColor("red");
entry.addToHistory(new PwEntryV4());
entry.setIcon(new PwIconStandard(5));
entry.setOverrideURL("override");
entry.setParent(new PwGroupV4());
entry.addField("key2", new ProtectedString(false, "value2"));
entry.url = "http://localhost";
entry.uuid = UUID.randomUUID();
entry.setUrl("http://localhost");
entry.setUUID(UUID.randomUUID());

PwEntryV4 target = new PwEntryV4();
target.assign(entry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void setUp() throws Exception {
}

public void testGroupName() {
assertTrue("Name was " + mPG.name, mPG.name.equals("Internet"));
assertTrue("Name was " + mPG.getName(), mPG.getName().equals("Internet"));
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@ public void testBackup() {
db.historyMaxItems = 2;

PwEntryV4 entry = new PwEntryV4();
entry.setTitle("Title1", db);
entry.setUsername("User1", db);
entry.startToDecodeReference(db);
entry.setTitle("Title1");
entry.setUsername("User1");
entry.createBackup(db);

entry.setTitle("Title2", db);
entry.setUsername("User2", db);
entry.setTitle("Title2");
entry.setUsername("User2");
entry.createBackup(db);

entry.setTitle("Title3", db);
entry.setUsername("User3", db);
entry.setTitle("Title3");
entry.setUsername("User3");
entry.createBackup(db);

PwEntryV4 backup = entry.history.get(0);
PwEntryV4 backup = entry.getHistory().get(0);
entry.endToDecodeReference(db);
assertEquals("Title2", backup.getTitle());
assertEquals("User2", backup.getUsername());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
import android.test.AndroidTestCase;
import biz.source_code.base64Coder.Base64Coder;

import com.keepassdroid.database.PwDatabase;
import com.keepassdroid.database.PwDatabaseV4;
import com.keepassdroid.database.PwEntryV4;
import com.keepassdroid.database.load.ImporterV4;
import com.keepassdroid.utils.SprEngine;
import com.keepassdroid.utils.SprEngineV4;
import com.keepassdroid.utils.Types;

public class SprEngineTest extends AndroidTestCase {
private PwDatabaseV4 db;
private SprEngine spr;
private SprEngineV4 spr;

@Override
protected void setUp() throws Exception {
Expand All @@ -51,7 +52,7 @@ protected void setUp() throws Exception {

is.close();

spr = SprEngine.getInstance(db);
spr = new SprEngineV4();
}

private final String REF = "{REF:P@I:2B1D56590D961F48A8CE8C392CE6CD35}";
Expand All @@ -69,7 +70,7 @@ public void testRefReplace() {

private UUID decodeUUID(String encoded) {
if (encoded == null || encoded.length() == 0 ) {
return PwDatabaseV4.UUID_ZERO;
return PwDatabase.UUID_ZERO;
}

byte[] buf = Base64Coder.decode(encoded);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import android.preference.PreferenceManager;
import android.test.AndroidTestCase;

import com.kunzisoft.keepass.R;
import com.keepassdroid.database.Database;
import com.keepassdroid.database.PwGroup;
import com.keepassdroid.tests.database.TestData;
Expand Down Expand Up @@ -66,7 +65,7 @@ private void updateOmitSetting(boolean setting) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
SharedPreferences.Editor editor = prefs.edit();

editor.putBoolean(ctx.getString(R.string.settings_omitbackup_key), setting);
editor.putBoolean("settings_omitbackup_key", setting);
editor.commit();

}
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@
<activity android:name="com.keepassdroid.settings.SettingsActivity" />
<activity android:name="com.keepassdroid.autofill.AutoFillAuthActivity"
android:configChanges="orientation|keyboardHidden" />
<activity android:name="com.keepassdroid.settings.SettingsAutofillActivity" />

<service android:name="com.keepassdroid.services.TimeoutService" />
<service android:name="com.keepassdroid.timeout.TimeoutService" />
<service
android:name="com.keepassdroid.notifications.NotificationCopyingService"
android:enabled="true"
android:exported="false" />
<service
android:name="com.keepassdroid.autofill.KeeAutofillService"
android:label="@string/autofill_service_name"
Expand Down
Loading

0 comments on commit 38c264e

Please sign in to comment.