diff --git a/app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt b/app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt index 07b90211..49fcce61 100644 --- a/app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt +++ b/app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt @@ -753,7 +753,7 @@ class MainApplication : Application(), Configuration.Provider, ActivityLifecycle } override fun onActivityStarted(activity: Activity) { - Countly.sharedInstance().onStart(activity) + if (analyticsAllowed) Countly.sharedInstance().onStart(activity) } override fun onActivityResumed(activity: Activity) { @@ -765,7 +765,7 @@ class MainApplication : Application(), Configuration.Provider, ActivityLifecycle } override fun onActivityStopped(activity: Activity) { - Countly.sharedInstance().onStop() + if (analyticsAllowed) Countly.sharedInstance().onStop() } override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) { diff --git a/st.txt b/st.txt deleted file mode 100644 index 7dea03a5..00000000 --- a/st.txt +++ /dev/null @@ -1,23 +0,0 @@ -FATAL EXCEPTION: main -Process: com.fox2code.mmm, PID: 13896 -java.lang.ExceptionInInitializerError - at java.lang.Class.newInstance(Native Method) - at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76) - at androidx.core.app.CoreComponentFactory.instantiateApplication(Unknown Source:0) - at android.app.Instrumentation.newApplication(Instrumentation.java:1244) - at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1458) - at android.app.LoadedApk.makeApplicationInner(LoadedApk.java:1395) - at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6780) - at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) - at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2137) - at android.os.Handler.dispatchMessage(Handler.java:106) - at android.os.Looper.loopOnce(Looper.java:201) - at android.os.Looper.loop(Looper.java:288) - at android.app.ActivityThread.main(ActivityThread.java:7933) - at java.lang.reflect.Method.invoke(Native Method) - at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) - at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:843) -Caused by: java.lang.NullPointerException - at bm0.f(Unknown Source:4) - at com.fox2code.mmm.MainApplication.(Unknown Source:2) - ... 16 more