code: public long getPackageRestoreToken(String packageName) {
      Long token = serviceState.restoredPackages.get(packageName);
      return token != null ? token : 0L;
    }
docs: Returns the restore token for the given package, or {@code 0} if the package was not restored.