Don't reset from dead just by looking at the screen.

This was making it hard to debug because I couldn't actually
look at the problem without it fixing itself.
This commit is contained in:
voussoir 2023-04-02 16:11:23 -07:00
parent 89035e0323
commit 9e75502477

View file

@ -451,7 +451,7 @@ class TrackerService: Service()
override fun onBind(p0: Intent?): IBinder override fun onBind(p0: Intent?): IBinder
{ {
Log.i("VOUSSOIR", "TrackerService.onBind") Log.i("VOUSSOIR", "TrackerService.onBind")
if (listeners_enabled_at == 0L) if (listeners_enabled_at == 0L && location_interval != Keys.LOCATION_INTERVAL_GIVE_UP)
{ {
reset_location_listeners(interval=Keys.LOCATION_INTERVAL_FULL_POWER) reset_location_listeners(interval=Keys.LOCATION_INTERVAL_FULL_POWER)
} }
@ -464,7 +464,7 @@ class TrackerService: Service()
override fun onRebind(intent: Intent?) override fun onRebind(intent: Intent?)
{ {
Log.i("VOUSSOIR", "TrackerService.onRebind") Log.i("VOUSSOIR", "TrackerService.onRebind")
if (listeners_enabled_at == 0L) if (listeners_enabled_at == 0L && location_interval != Keys.LOCATION_INTERVAL_GIVE_UP)
{ {
reset_location_listeners(interval=Keys.LOCATION_INTERVAL_FULL_POWER) reset_location_listeners(interval=Keys.LOCATION_INTERVAL_FULL_POWER)
} }