Skip to content

Commit a709d25

Browse files
committedFeb 1, 2025
Use existing methods to clean up service resources
1 parent b55eed1 commit a709d25

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

‎app-timer-run/src/main/java/xyz/aprildown/timer/app/timer/run/MachineService.kt

+2-6
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,10 @@ class MachineService :
168168
* Just release all resources
169169
*/
170170
override fun onDestroy() {
171+
super.onDestroy()
171172
binder = null
173+
cancelForegroundNotif()
172174
presenter.dropView()
173-
phoneCallReceiver?.unregister()
174-
phoneCallReceiver = null
175-
toForegroundHandler.removeCallbacksAndMessages(null)
176-
foregroundNotifHandler?.removeCallbacksAndMessages(null)
177-
foregroundNotifHandler = null
178-
super.onDestroy()
179175
}
180176

181177
//

0 commit comments

Comments
 (0)
Please sign in to comment.