remove closeDatabase calls causing crashes

This commit is contained in:
Akinwale Ariwodola 2020-05-21 22:07:25 +01:00
parent c11e2fcd7a
commit 0fec3c6a6f
4 changed files with 2 additions and 6 deletions

View file

@ -1022,6 +1022,8 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
public void clearWunderbarFocus(View view) { public void clearWunderbarFocus(View view) {
findViewById(R.id.wunderbar).clearFocus(); findViewById(R.id.wunderbar).clearFocus();
findViewById(R.id.app_bar_main_container).requestFocus(); findViewById(R.id.app_bar_main_container).requestFocus();
InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
} }
public View getWunderbar() { public View getWunderbar() {
return findViewById(R.id.wunderbar); return findViewById(R.id.wunderbar);

View file

@ -112,8 +112,6 @@ public class MergeSubscriptionsTask extends AsyncTask<Void, Void, List<Subscript
} catch (ClassCastException | LbryioRequestException | LbryioResponseException | JSONException | IllegalStateException | SQLiteException ex) { } catch (ClassCastException | LbryioRequestException | LbryioResponseException | JSONException | IllegalStateException | SQLiteException ex) {
error = ex; error = ex;
return null; return null;
} finally {
Helper.closeDatabase(db);
} }
return combined; return combined;

View file

@ -64,8 +64,6 @@ public class ChannelSubscribeTask extends AsyncTask<Void, Void, Boolean> {
} catch (LbryioRequestException | LbryioResponseException | SQLiteException ex) { } catch (LbryioRequestException | LbryioResponseException | SQLiteException ex) {
error = ex; error = ex;
return false; return false;
} finally {
Helper.closeDatabase(db);
} }
return true; return true;

View file

@ -64,8 +64,6 @@ public class FetchSubscriptionsTask extends AsyncTask<Void, Void, List<Subscript
} catch (ClassCastException | LbryioRequestException | LbryioResponseException | JSONException | IllegalStateException ex) { } catch (ClassCastException | LbryioRequestException | LbryioResponseException | JSONException | IllegalStateException ex) {
error = ex; error = ex;
return null; return null;
} finally {
Helper.closeDatabase(db);
} }
return subscriptions; return subscriptions;