mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Catch correct exception from Context.startService
Issue: #7306 PiperOrigin-RevId: 309392633
This commit is contained in:
parent
e11ae734ed
commit
36b43780d3
1 changed files with 1 additions and 1 deletions
|
|
@ -1022,7 +1022,7 @@ public abstract class DownloadService extends Service {
|
|||
try {
|
||||
Intent intent = getIntent(context, serviceClass, DownloadService.ACTION_INIT);
|
||||
context.startService(intent);
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (IllegalStateException e) {
|
||||
// The process is classed as idle by the platform. Starting a background service is not
|
||||
// allowed in this state.
|
||||
Log.w(TAG, "Failed to restart DownloadService (process is idle).");
|
||||
|
|
|
|||
Loading…
Reference in a new issue