DRM license renewals while screensaver on

I am working on a Roku app where, when the video paused for a long time, Roku screensaver kicks in. All other app operations suppressed. However DRM license renewal still continues to happen in the background and it keeps failing as the token has expired and not renewing while screensaver is on. I want to know:

  1. Is there a way app can know that the app lost focus and screensaver has kicked in.
  2. if there is a way to pause DRM license renewal when app lost focus and screensaver has kicked in.