Opened on 02/23/2018 at 10:29:10 AM
Closed on 03/13/2018 at 02:22:31 PM
#6414 closed change (duplicate)
Refactor to start using JobScheduler instead of Service
Reported by: | jwangenheim | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Adblock-Plus-for-Samsung-Browser | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Android | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
Our EngineService is started in many different scenarios:
- When the user opens our app
- When Samsung Internet requests our filters file through our ContentBlockerContentProvider
- When ConnectivityChanged broadcast receiver is triggered
With that fix from #6389, the only change on behavior is that our app might stop checking for updates when the user intentionally kills the app. But once he goes through any of the scenarios above, the update check will resume.
For repetitive tasks in an Android app, we need to consider that activities and services can be terminated by the Android system to free up resources. Modern Android applications should use the JobScheduler API for those tasks. Apps can schedule jobs while letting the system optimize based on memory, power, and connectivity conditions.
What to change
Implement JobScheduler and use it for all tasks that are currently handles by the EngineService.
Attachments (0)
Change History (1)
comment:1 Changed on 03/13/2018 at 02:22:31 PM by jwangenheim
- Resolution set to duplicate
- Status changed from new to closed
Marked as duplicate. See #6454