Example usage for android.database.sqlite SQLiteDatabase isDatabaseIntegrityOk

List of usage examples for android.database.sqlite SQLiteDatabase isDatabaseIntegrityOk

Introduction

In this page you can find the example usage for android.database.sqlite SQLiteDatabase isDatabaseIntegrityOk.

Prototype

public boolean isDatabaseIntegrityOk() 

Source Link

Document

Runs 'pragma integrity_check' on the given database (and all the attached databases) and returns true if the given database (and all its attached databases) pass integrity_check, false otherwise.

Usage

From source file:me.piebridge.bible.Bible.java

@SuppressLint("NewApi")
private boolean isDatabaseIntegrityOk(SQLiteDatabase database) {
    // assume ok if the api is not available
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
        return true;
    } else {/*w ww.  j ava 2s . com*/
        return database.isDatabaseIntegrityOk();
    }
}