matomo-org / matomo-sdk-android

SDK for Android to measure your apps with Matomo. Works on Android phones, tablets, Fire TV sticks, and more!
BSD 3-Clause "New" or "Revised" License
386 stars 163 forks source link

Hard strict mode #438

Open hannesa2 opened 9 months ago

hannesa2 commented 9 months ago

Hmm, same strict mode finds a lot locally but not on CI

image

StrictMode policy violation; ~duration=5 ms: android.os.strictmode.DiskReadViolation
   at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
   at libcore.io.BlockGuardOs.access(BlockGuardOs.java:71)
   at libcore.io.ForwardingOs.access(ForwardingOs.java:72)
   at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:7533)
   at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:281)
   at java.io.File.exists(File.java:815)
   at android.app.ContextImpl.getDataDir(ContextImpl.java:2539)
   at android.app.ContextImpl.getPreferencesDir(ContextImpl.java:626)
   at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:853)
   at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:475)
   at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:188)
   at org.matomo.sdk.Matomo.<init>(Matomo.kt:36)
   at org.matomo.sdk.Matomo.<init>(Unknown Source:0)
   at org.matomo.sdk.Matomo$Companion.getInstance(Matomo.kt:74)
   at org.matomo.sdk.Matomo.getInstance(Unknown Source:5)
   at org.matomo.sdk.extra.MatomoApplication.getMatomo(MatomoApplication.java:20)
   at org.matomo.sdk.extra.MatomoApplication.getTracker(MatomoApplication.java:29)
   at org.matomo.demo.DemoApp.onInitTracker(DemoApp.kt:54)
   at org.matomo.demo.DemoApp.onCreate(DemoApp.kt:37)
   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
   at android.app.ActivityThread.access$1300(ActivityThread.java:237)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
   at android.os.Handler.dispatchMessage(Handler.java:106)
codecov-commenter commented 9 months ago

Codecov Report

Merging #438 (5cc4fe5) into master (013e18e) will not change coverage. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff            @@
##             master     #438   +/-   ##
=========================================
  Coverage     87.12%   87.12%           
  Complexity      364      364           
=========================================
  Files            32       32           
  Lines          1429     1429           
  Branches        165      165           
=========================================
  Hits           1245     1245           
  Misses          115      115           
  Partials         69       69           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more