mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
Android: Allow reporting start to analytics for non-main activity
a1691a4
made it so analytics start events can only be generated when starting the main activity. However, some users launch Dolphin's emulation activity from a separate frontend application, bypassing Dolphin's main activity. This change adjusts the logic so that start events can be generated if any activity is started after 6 hours of inactivity. This more closely matches the behavior we had beforea1691a4
, while still ensuring duplicate start events aren't generated. I've also fixed the inconsistent indentation in ActivityTracker.kt.
This commit is contained in:
parent
805307f432
commit
3ed3fb05af
1 changed files with 7 additions and 9 deletions
|
@ -21,11 +21,9 @@ class ActivityTracker : ActivityLifecycleCallbacks {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityStarted(activity: Activity) {
|
override fun onActivityStarted(activity: Activity) {
|
||||||
if (isMainActivity(activity)) {
|
|
||||||
StartupHandler.reportStartToAnalytics(activity.applicationContext, firstStart)
|
StartupHandler.reportStartToAnalytics(activity.applicationContext, firstStart)
|
||||||
firstStart = false
|
firstStart = false
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActivityResumed(activity: Activity) {
|
override fun onActivityResumed(activity: Activity) {
|
||||||
resumedActivities.add(activity)
|
resumedActivities.add(activity)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue