From 0fec3c6a6f304f0bf64992f6a72eeb505103f7a1 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Thu, 21 May 2020 22:07:25 +0100 Subject: [PATCH] remove closeDatabase calls causing crashes --- app/src/main/java/io/lbry/browser/MainActivity.java | 2 ++ .../main/java/io/lbry/browser/tasks/MergeSubscriptionsTask.java | 2 -- .../io/lbry/browser/tasks/lbryinc/ChannelSubscribeTask.java | 2 -- .../io/lbry/browser/tasks/lbryinc/FetchSubscriptionsTask.java | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 0c05f7c8..cc50c4a9 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -1022,6 +1022,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener public void clearWunderbarFocus(View view) { findViewById(R.id.wunderbar).clearFocus(); findViewById(R.id.app_bar_main_container).requestFocus(); + InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } public View getWunderbar() { return findViewById(R.id.wunderbar); diff --git a/app/src/main/java/io/lbry/browser/tasks/MergeSubscriptionsTask.java b/app/src/main/java/io/lbry/browser/tasks/MergeSubscriptionsTask.java index ae9af238..892ad6ba 100644 --- a/app/src/main/java/io/lbry/browser/tasks/MergeSubscriptionsTask.java +++ b/app/src/main/java/io/lbry/browser/tasks/MergeSubscriptionsTask.java @@ -112,8 +112,6 @@ public class MergeSubscriptionsTask extends AsyncTask { } catch (LbryioRequestException | LbryioResponseException | SQLiteException ex) { error = ex; return false; - } finally { - Helper.closeDatabase(db); } return true; diff --git a/app/src/main/java/io/lbry/browser/tasks/lbryinc/FetchSubscriptionsTask.java b/app/src/main/java/io/lbry/browser/tasks/lbryinc/FetchSubscriptionsTask.java index d70aece3..da886beb 100644 --- a/app/src/main/java/io/lbry/browser/tasks/lbryinc/FetchSubscriptionsTask.java +++ b/app/src/main/java/io/lbry/browser/tasks/lbryinc/FetchSubscriptionsTask.java @@ -64,8 +64,6 @@ public class FetchSubscriptionsTask extends AsyncTask