diff options
author | tom79 <tschneider.ac@gmail.com> | 2020-04-12 15:45:17 +0200 |
---|---|---|
committer | tom79 <tschneider.ac@gmail.com> | 2020-04-12 15:45:17 +0200 |
commit | 7f3319f805b63f071ac74e99b7a5327fef74e387 (patch) | |
tree | 0c7c94ce6e1fe43f0e714119ffe9045b30b47125 /app/src/main | |
parent | 2cd77e3f6d5d7be4c40e69019d6db5dff3027665 (diff) |
avoid closing db for background threads.
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/app/fedilab/android/activities/BaseMainActivity.java | 3 | ||||
-rw-r--r-- | app/src/main/java/app/fedilab/android/fragments/DisplayStatusFragment.java | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/app/src/main/java/app/fedilab/android/activities/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/activities/BaseMainActivity.java index 8c18df9cf..cda080777 100644 --- a/app/src/main/java/app/fedilab/android/activities/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/BaseMainActivity.java @@ -1683,9 +1683,6 @@ public abstract class BaseMainActivity extends BaseActivity if (mPageReferenceMap != null) mPageReferenceMap = null; PreferenceManager.getDefaultSharedPreferences(this).edit().putBoolean("isMainActivityRunning", false).apply(); - if (Sqlite.db != null) { - Sqlite.db.close(); - } } @Override diff --git a/app/src/main/java/app/fedilab/android/fragments/DisplayStatusFragment.java b/app/src/main/java/app/fedilab/android/fragments/DisplayStatusFragment.java index e10b1e494..6d67373c7 100644 --- a/app/src/main/java/app/fedilab/android/fragments/DisplayStatusFragment.java +++ b/app/src/main/java/app/fedilab/android/fragments/DisplayStatusFragment.java @@ -183,6 +183,7 @@ public class DisplayStatusFragment extends Fragment implements OnPostActionInter type = RetrieveFeedsAsyncTask.Type.CHANNEL; + assert context != null; SQLiteDatabase db = Sqlite.getInstance(context.getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open(); //instanceType should not be null only for Peertube accounts |