mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 17:18:52 -06:00
Remove unused methods
This commit is contained in:
@@ -42,28 +42,6 @@ public abstract class DatabaseUtils
|
|||||||
@Nullable
|
@Nullable
|
||||||
private static HabitsDatabaseOpener opener = null;
|
private static HabitsDatabaseOpener opener = null;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static void executeAsTransaction(Callback callback)
|
|
||||||
{
|
|
||||||
try (SQLiteDatabase db = openDatabase())
|
|
||||||
{
|
|
||||||
db.beginTransaction();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
callback.execute();
|
|
||||||
db.setTransactionSuccessful();
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
db.endTransaction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static File getDatabaseFile(Context context)
|
public static File getDatabaseFile(Context context)
|
||||||
{
|
{
|
||||||
@@ -114,14 +92,4 @@ public abstract class DatabaseUtils
|
|||||||
if (opener == null) throw new IllegalStateException();
|
if (opener == null) throw new IllegalStateException();
|
||||||
return opener.getWritableDatabase();
|
return opener.getWritableDatabase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dispose()
|
|
||||||
{
|
|
||||||
opener = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface Callback
|
|
||||||
{
|
|
||||||
void execute() throws Exception;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user