Skip to content

Instantly share code, notes, and snippets.

@mzelzoghbi
Last active December 23, 2018 15:49
Show Gist options
  • Save mzelzoghbi/961177906f4e7cc7efa1b28255b053aa to your computer and use it in GitHub Desktop.
Save mzelzoghbi/961177906f4e7cc7efa1b28255b053aa to your computer and use it in GitHub Desktop.
JobIntentService SecurityException
public abstract class MyServiceImpl extends JobIntentService {
// This method is the main reason for the bug and crash
@Override
GenericWorkItem dequeueWork() {
try {
return super.dequeueWork();
} catch (SecurityException exception) {
// the exception will be ignored here.
}
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment