docs: @RequiresPermission(allOf =
              {Manifest.permission.ACCESS_NETWORK_STATE, Manifest.permission.WAKE_LOCK})
      @CallSuper
      @Override
      protected void onUpdate(@UpdateReason int reason) {
          PowerManager pwm = (PowerManager) getSystemService(POWER_SERVICE);
          PowerManager.WakeLock lock = pwm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mName);
          lock.acquire(FETCH_WAKELOCK_TIMEOUT_MILLIS);
  
          SharedPreferences sp = getSharedPreferences();
  
          try {
              NetworkInfo ni = ((ConnectivityManager) getSystemService(
                      Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
              if (ni == null || !ni.isConnected()) {
                  Log.d(TAG, "No network connection; not attempting to fetch update, id=" + mName);
                  throw new RetryException();
              }
  
              // Attempt an update
              onTryUpdate(reason);
  
              // No RetryException, so declare success and reset update attempt
              sp.edit().remove(PREF_RETRY_ATTEMPT).apply();
              setWantsNetworkAvailable(false);
  
          } catch (RetryException e) {
              Log.w(TAG, "Error fetching, scheduling retry, id=" + mName);
  
              // Schedule retry with exponential backoff, starting with INITIAL_RETRY... seconds later
              int retryAttempt = Math.min(sp.getInt(PREF_RETRY_ATTEMPT, 0), MAX_RETRY_ATTEMPTS);
              scheduleUpdate(
                      System.currentTimeMillis() + (INITIAL_RETRY_DELAY_MILLIS << retryAttempt));
              if (retryAttempt < MAX_RETRY_ATTEMPTS) {
                  sp.edit().putInt(PREF_RETRY_ATTEMPT, retryAttempt + 1).apply();
              }
              setWantsNetworkAvailable(true);
  
          } finally {
              if (lock.isHeld()) {
                  lock.release();
              }
          }
      }