Android Open Source - movecerts Certificate






From Project

Back to project page movecerts.

License

The source code is released under:

GNU General Public License

If you think the Android project movecerts 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.nutomic.zertman;
/* w  ww . j  a v a 2  s  . com*/
import java.io.File;
import java.util.Arrays;

public class Certificate {

  private final String mFilename;

  private final boolean mIsSystemCertificate;

  public Certificate(String filename, boolean isSystemCertificate) {
    mFilename = filename;
    mIsSystemCertificate = isSystemCertificate;
  }

  @Override
  public boolean equals(Object o) {
    if (!(o instanceof Certificate))
      return false;

    return mFilename.equals(((Certificate) o).mFilename) &&
        mIsSystemCertificate == ((Certificate) o).mIsSystemCertificate;
  }

  @Override
  public int hashCode() {
    return Arrays.hashCode(new Object[]{mFilename, mIsSystemCertificate});
  }

  public File getFile() {
    return (mIsSystemCertificate)
        ? new File(CertificateManager.SYSTEM_CERTIFICATES_DIR, mFilename)
        : new File(CertificateManager.getUserCertificatesDir(), mFilename);
  }
  public boolean isSystemCertificate() {
    return mIsSystemCertificate;
  }

}




Java Source Code List

com.nutomic.zertman.CertificateAdapter.java
com.nutomic.zertman.CertificateManager.java
com.nutomic.zertman.Certificate.java
com.nutomic.zertman.MainActivity.java
com.nutomic.zertman.MovedCertificatesStorage.java
com.nutomic.zertman.test.CertificateManagerTest.java
com.nutomic.zertman.test.CertificateTest.java
com.nutomic.zertman.test.MainActivityTest.java
com.nutomic.zertman.test.MovedCertificatesStorageTest.java