Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added static exists() to see if database exists

  • Loading branch information...
commit aee2db601b47a70c7c27ecfe61c4bdbfbe1297b7 1 parent 995f2d8
@commonsguy authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/com/commonsware/cwac/prefs/SQLCipherStrategy.java
View
7 src/com/commonsware/cwac/prefs/SQLCipherStrategy.java
@@ -15,6 +15,7 @@
package com.commonsware.cwac.prefs;
import android.content.Context;
+import java.io.File;
import java.util.Collection;
import java.util.Map;
import com.commonsware.cwac.prefs.CWSharedPreferences.LoadPolicy;
@@ -25,6 +26,12 @@
CWSharedPreferences.StorageStrategy {
private SQLiteDatabase db=null;
+ public static boolean exists(Context ctxt, String key) {
+ File path=ctxt.getDatabasePath(key);
+
+ return(path.exists());
+ }
+
public SQLCipherStrategy(Context ctxt, String key, String password,
LoadPolicy loadPolicy) {
super(loadPolicy);
Please sign in to comment.
Something went wrong with that request. Please try again.