Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Stats db operations in UI thread #11229

Closed
SergeyZhukovsky opened this issue Aug 13, 2020 · 0 comments · Fixed by brave/brave-core#6539
Closed

[Android] Stats db operations in UI thread #11229

SergeyZhukovsky opened this issue Aug 13, 2020 · 0 comments · Fixed by brave/brave-core#6539
Assignees
Labels
enhancement OS/Android Fixes related to Android browser functionality QA/No release-notes/exclude

Comments

@SergeyZhukovsky
Copy link
Member

Description

We have warnings that do db operations in UI thread. We should move it out from there.
2020-08-13 12:06:17.883 29731-29731/com.brave.browser_default D/StrictMode: StrictMode policy violation; ~duration=169 ms: android.os.strictmode.DiskReadViolation
` at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:341)
at org.chromium.chrome.browser.local_database.DatabaseHelper.getTotalSavedBandwidthWithDate(DatabaseHelper.java:301)
at org.chromium.chrome.browser.brave_stats.BraveStatsBottomSheetDialogFragment.updateBraveStatsLayout(BraveStatsBottomSheetDialogFragment.java:155)
at org.chromium.chrome.browser.brave_stats.BraveStatsBottomSheetDialogFragment.onViewCreated(BraveStatsBottomSheetDialogFragment.java:151)

12:08
we read from stats sqlite db in`

Steps to reproduce

Actual result

Expected result

Issue reproduces how often

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version?
  • Can you reproduce this issue with the current Play Store Beta version?
  • Can you reproduce this issue with the current Play Store Nightly version?

Device details

  • Install type (ARM, x86):
  • Device type (Phone, Tablet, Phablet):
  • Android version:

Brave version

Website problems only

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement OS/Android Fixes related to Android browser functionality QA/No release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants