Android Open Source - KnowledgeBase Plain Storage






From Project

Back to project page KnowledgeBase.

License

The source code is released under:

MIT License

If you think the Android project KnowledgeBase listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.martin.knowledgebase;
//from  w  ww . j  a  v  a 2  s.c  o m
import java.util.ArrayList;

public class PlainStorage {
    private static PlainStorage instance;

    private boolean mNewInstance;
    private ArrayList<Entry> mEntries;

    // Restrict the constructor from being instantiated
    private PlainStorage() {
    }

    public static synchronized PlainStorage getInstance() {
        if (instance == null) {
            instance = new PlainStorage();
            instance.mNewInstance = true;
            instance.mEntries = new ArrayList<Entry>();
        } else {
            instance.mNewInstance = false;
        }
        return instance;
    }

    public boolean isNew() {
        boolean before = mNewInstance;
        mNewInstance = false;
        return before;
    }

    public ArrayList<Entry> getmEntries() {
        return mEntries;
    }

    public void setmEntries(ArrayList<Entry> mEntries) {
        this.mEntries = mEntries;
    }
}




Java Source Code List

com.martin.knowledgebase.ConversionTest.java
com.martin.knowledgebase.EditActivity.java
com.martin.knowledgebase.EncryptionTest.java
com.martin.knowledgebase.EntryTest.java
com.martin.knowledgebase.Entry.java
com.martin.knowledgebase.LoginActivity.java
com.martin.knowledgebase.MainActivity.java
com.martin.knowledgebase.PlainStorage.java
com.martin.knowledgebase.Snackbar.java
com.martin.knowledgebase.Util.java
com.tozny.crypto.android.AesCbcWithIntegrity.java