Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. if (isCharging || isUnknown) {
  2. jobScheduler.schedule(jobInfo(context))
  3. } else if (hasBeenDisconnected) {
  4. jobScheduler.cancelAll()
  5.  
  6. // FIXME this is a pretty hacky way of getting the job done :(
  7. (context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager)
  8. .cancel(NOTIFICATION_ID)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement