Skip to content

Commit

Permalink
Updated JavaDoc - checkout to @database branch to optimize and genera…
Browse files Browse the repository at this point in the history
…te database operations
  • Loading branch information
Javinator9889 committed Oct 29, 2018
1 parent 5d9a4b4 commit 0c0eaee
Show file tree
Hide file tree
Showing 11 changed files with 872 additions and 71 deletions.
Binary file modified APP/.idea/caches/build_file_checksums.ser
Binary file not shown.
6 changes: 6 additions & 0 deletions APP/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion APP/app/build.gradle
Expand Up @@ -91,7 +91,7 @@ dependencies {
// SQLCipher - https://guardianproject.info/code/sqlcipher/
implementation 'net.zetetic:android-database-sqlcipher:3.5.9@aar'
// AppIntro - https://github.com/apl-devs/AppIntro
implementation 'com.github.apl-devs:appintro:v5.0.0'
implementation 'com.github.paolorotolo:appintro:v5.1.0'
// Google Play Services - https://developers.google.com/android/guides/setup
implementation 'com.google.android.gms:play-services-drive:16.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
Expand Down
Expand Up @@ -6,14 +6,12 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.Arrays;
import java.util.Map;

import javinator9889.securepass.io.database.DatabaseManager;
import javinator9889.securepass.io.database.DatabaseOperations;
import javinator9889.securepass.io.database.operations.CommonOperations;

/**
* Created by Javinator9889 on 20/05/2018.
Expand All @@ -22,12 +20,12 @@
public class DatabaseTest {
private Context context = InstrumentationRegistry.getTargetContext();

private DatabaseOperations op;
private CommonOperations op;

@Before
public void initParams() {
DatabaseManager manager = DatabaseManager.newInstance(context, "1234");
this.op = DatabaseOperations.newInstance(manager);
this.op = CommonOperations.newInstance(manager);
}

// @Test
Expand Down Expand Up @@ -61,7 +59,7 @@ public void initParams() {
// newSecurityCodeId);
// printer();
// op.deleteCategory(newCategoryId);
// op.deleteAccount(newAccountId);
// op.deleteEntry(newAccountId);
// op.deleteQRCode(newQRCodeId);
// op.deleteSecurityCode(newSecurityCodeId);
// op.deleteField(newFieldForSecCodeId);
Expand Down
@@ -1,21 +1,15 @@
package javinator9889.securepass.data.container;

import android.content.Context;
import androidx.annotation.NonNull;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javinator9889.securepass.SecurePass;
import androidx.annotation.NonNull;
import javinator9889.securepass.data.entry.Category;
import javinator9889.securepass.data.entry.Entry;
import javinator9889.securepass.data.entry.QRCode;
import javinator9889.securepass.data.secret.Field;
import javinator9889.securepass.data.secret.SecurityCode;
import javinator9889.securepass.io.IOManager;
import javinator9889.securepass.io.database.DatabaseManager;
import javinator9889.securepass.io.database.DatabaseOperations;

/**
* Created by Javinator9889 on 06/04/2018.
Expand Down Expand Up @@ -73,7 +67,7 @@ public void setUserSharedPreferences(Map<String, Object> userSharedPreferences)
// Context appContext = SecurePass.getApplicationInstance().getApplicationContext();
// String password = IOManager.newInstance(appContext).readPassword();
// DatabaseManager manager = DatabaseManager.newInstance(appContext, password);
// DatabaseOperations operations = DatabaseOperations.newInstance(manager);
// CommonOperations operations = CommonOperations.newInstance(manager);
// for (Category actualCategory : categories)
// operations.registerNewCategory(actualCategory.getName());
// for (Entry entry : entries)
Expand Down
Expand Up @@ -11,6 +11,7 @@

import androidx.annotation.NonNull;
import javinator9889.securepass.io.IOManager;
import javinator9889.securepass.io.database.operations.CommonOperations;
import javinator9889.securepass.util.resources.ISharedPreferencesManager;
import javinator9889.securepass.util.resources.PreferencesManager;
import javinator9889.securepass.util.values.Constants;
Expand Down Expand Up @@ -139,7 +140,7 @@ public Thread getDatabaseInitializer() {
* Creates the default category necessary in order to allow the hole application work
*/
private void createDefaultCategory() {
DatabaseOperations operations = DatabaseOperations.newInstance(this);
CommonOperations operations = CommonOperations.newInstance(this);
operations.registerDefaultCategory();
operations.finishConnection();
}
Expand Down

0 comments on commit 0c0eaee

Please sign in to comment.