@Override
        protected void onPostExecute(Void result) {
            // If file is pending for access, notify to read the fileUri.
            synchronized (sLatchMapLock) {
                if (sUriLatchMap.containsKey(mFileUri)) {
                    CountDownLatch latch = sUriLatchMap.get(mFileUri);
                    latch.countDown();
                }
                sFilesInSerialization.remove(mFileUri);
                sUriLatchMap.remove(mFileUri);
            }
            new FileCleanupTask(mContextRef).executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
        }
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