]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/App.java
whitespace
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / App.java
index bd9b303a2f8234f9497241a1e4e72931a63ead42..b6ae697f355409d9b1256b05b57174427d4b598b 100644 (file)
@@ -34,6 +34,11 @@ import static net.ktnx.mobileledger.ui.activity.SettingsActivity.PREF_KEY_SHOW_O
 public class App extends Application {
     public static App instance;
     private MobileLedgerDatabase dbHelper;
+    public static SQLiteDatabase getDatabase() {
+        if (instance == null) throw new RuntimeException("Application not created yet");
+
+        return instance.getDB();
+    }
     @Override
     public void onCreate() {
         Logger.debug("flow", "App onCreate()");
@@ -62,11 +67,6 @@ public class App extends Application {
         super.onConfigurationChanged(newConfig);
         updateMonthNames();
     }
-    public static SQLiteDatabase getDatabase() {
-        if (instance == null) throw new RuntimeException("Application not created yet");
-
-        return instance.getDB();
-    }
     public SQLiteDatabase getDB() {
         if (dbHelper == null) initDb();