docs: long getBackoffOffset(boolean endTime) {
          if (isPeriodic()) {
              return 0L;
          }
  
          long offset;
          switch (getBackoffPolicy()) {
              case LINEAR:
                  offset = mFailureCount * getBackoffMs();
                  break;
  
              case EXPONENTIAL:
                  if (mFailureCount == 0) {
                      offset = 0L;
                  } else {
                      offset = (long) (getBackoffMs() * Math.pow(2, mFailureCount - 1));
                  }
                  break;
  
              default:
                  throw new IllegalStateException("not implemented");
          }
  
          if (endTime && !isExact()) {
              offset *= 1.2f;
          }
  
          return Math.min(offset, TimeUnit.HOURS.toMillis(5)); // use max of 5 hours like JobScheduler
      }