Skip to content

Commit

Permalink
ShortcutDbAdapter: add the isOpen method for the db
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed Feb 12, 2024
1 parent e4756fe commit bffdf7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/com/archos/mediacenter/utils/ShortcutDbAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum ShortcutDbAdapter {
VIDEO(ShortcutDbAdapter.DATABASE_VIDEO_TABLE, ShortcutDbAdapter.DATABASE_CREATE_VIDEO5);

private static final String TAG = "ShortcutDbAdapter";
protected final static boolean DBG = false;
private final static boolean DBG = false;

// To be incremented each time the architecture of the database is changed
private static final int DATABASE_VERSION = 5;
Expand Down Expand Up @@ -74,6 +74,10 @@ public enum ShortcutDbAdapter {
private SQLiteDatabase mDb;
private final String mDatabaseTable;

public boolean isDbOpen() {
return mDb != null && mDb.isOpen();
}

public boolean isHimselfOrAncestorShortcut(Context context, String path) {
open(context);
Uri uri = Uri.parse(path);
Expand Down

0 comments on commit bffdf7c

Please sign in to comment.