TeamAmaze / TeamAmaze/AmazeFileManager

Remove allowMainThreadQueries from database initialization

Open
#3,826 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Database
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
I suggest removing allowMainThreadQueries calls from databases in order to remove situations when database operations are performed on the main thread.

Describe the solution you'd like
Remove function call, but test and ensure that no query is called from the main thread, as this will throw exception and crash app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the database initialization code for allowMainThreadQueries calls, then inspect the database query paths they permit. Run the existing Android tests and add coverage where needed to verify queries are not executed on the main thread and that removing the calls does not break database initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
databases, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.