@@ -151,24 +151,24 @@ class BackgroundManager internal constructor(
151151 // performing it's normal lifecycle after user swipes it away such that it's not going
152152 // through Application.onCreate, but is holding onto references. (same problem when
153153 // starting the service using Context.startForegroundService), which is bullshit.
154- /* *
155- * While your application is in the background (the Recent App's tray or lock screen),
156- * this [Policy] periodically switches [TorService] to the foreground then immediately
157- * back the background. Doing do prevents your application from going idle and being
158- * killed by the OS. It is much more resource intensive than choosing
159- * [respectResourcesWhileInBackground].
160- *
161- * @param [secondsFrom20To40]? Seconds between the events of cycling from background to
162- * foreground to background. Sending null will use the default (30s)
163- * @return [BackgroundManager.Builder.Policy] To use when initializing
164- * [io.matthewnelson.topl_service.TorServiceController.Builder]
165- * */
166- fun keepAliveWhileInBackground (secondsFrom20To40 : Int? = null): Policy {
167- chosenPolicy = BackgroundPolicy .KEEP_ALIVE
168- if (secondsFrom20To40 != null && secondsFrom20To40 in 20 .. 40 )
169- executionDelay = (secondsFrom20To40 * 1000 ).toLong()
170- return Policy (this )
171- }
154+ // /**
155+ // * While your application is in the background (the Recent App's tray or lock screen),
156+ // * this [Policy] periodically switches [TorService] to the foreground then immediately
157+ // * back the background. Doing do prevents your application from going idle and being
158+ // * killed by the OS. It is much more resource intensive than choosing
159+ // * [respectResourcesWhileInBackground].
160+ // *
161+ // * @param [secondsFrom20To40]? Seconds between the events of cycling from background to
162+ // * foreground to background. Sending null will use the default (30s)
163+ // * @return [BackgroundManager.Builder.Policy] To use when initializing
164+ // * [io.matthewnelson.topl_service.TorServiceController.Builder]
165+ // * */
166+ // fun keepAliveWhileInBackground(secondsFrom20To40: Int? = null): Policy {
167+ // chosenPolicy = BackgroundPolicy.KEEP_ALIVE
168+ // if (secondsFrom20To40 != null && secondsFrom20To40 in 20..40)
169+ // executionDelay = (secondsFrom20To40 * 1000).toLong()
170+ // return Policy(this)
171+ // }
172172
173173 /* *
174174 * Stops [TorService] after being in the background for the declared [secondsFrom5To45].
0 commit comments