indianpoptart / RadioControl

An app that auto toggles wifi and cell radio for maximum battery life
https://nikhilp.org/radiocontrol
GNU General Public License v3.0
16 stars 7 forks source link

ConnectivityManager$TooManyRequestsException #76

Open indianpoptart opened 2 years ago

indianpoptart commented 2 years ago

BackgroundJobService.kt

To Reproduce Steps to reproduce the behavior:

  1. Enable app with default settings + (Battery Optimization, Call Handling, Logging)
  2. Leave app in background for many hours
  3. Crash will occur in background
  4. See error

Unsure if application will still run background code when this error is thrown. More testing will be done

Expected behavior Connectivity manager should unregister callbacks

Phone (please complete the following information):

Additional context Line 73 of BackgroundJobService.kt

indianpoptart commented 2 years ago

Problem is being worked on, should be ready in v6.0-Alpha9

Issue was due to not calling an unregisterNetworkCallback at the end of the service