mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove unused methods
This commit is contained in:
@@ -42,28 +42,6 @@ public abstract class DatabaseUtils
|
||||
@Nullable
|
||||
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
|
||||
public static File getDatabaseFile(Context context)
|
||||
{
|
||||
@@ -114,14 +92,4 @@ public abstract class DatabaseUtils
|
||||
if (opener == null) throw new IllegalStateException();
|
||||
return opener.getWritableDatabase();
|
||||
}
|
||||
|
||||
public static void dispose()
|
||||
{
|
||||
opener = null;
|
||||
}
|
||||
|
||||
public interface Callback
|
||||
{
|
||||
void execute() throws Exception;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user