private void saveFileIfNeededBlocking() {
            if (mContextRef.get() == null) return;
            File path = new File(mContextRef.get().getFilesDir(), FILE_SUB_DIR);
            synchronized (sFileCleanupLock) {
                if (!path.exists() && !path.mkdir()) return;
                File img = new File(path, mFilename + FILE_EXTENSION);
                if (!img.exists()) saveFileBlocking(img);
                img.setLastModified(System.currentTimeMillis());
            }
        }
Map the uri with the {@link CountDownLatch} for waiting the image finish serialization.
    /* When the image finishes serialization, the latch is used to notify all await threads to
    /* access the image.
customtabs/src/android/support/customtabs/browseractions/BrowserServiceFileProvider.java