void renameTempFile(String url, FileExtension extension) {
    String fileName = filenameForUrl(url, extension, true);
    File file = new File(parentDir(), fileName);
    String newFileName = file.getAbsolutePath().replace(".temp", "");
    File newFile = new File(newFileName);
    boolean renamed = file.renameTo(newFile);
    Logger.debug("Copying temp file to real file (" + newFile + ")");
    if (!renamed) {
      Logger.warning("Unable to rename cache file " + file.getAbsolutePath() + " to " + newFile.getAbsolutePath() + ".");
    }
  }
If the file created by {@link #writeTempCacheFile(String, InputStream, FileExtension)} was successfully parsed,
this should be called to remove the temporary part of its name which will allow it to be a cache hit in the future.
lottie/src/main/java/com/airbnb/lottie/network/NetworkCache.java