public static boolean transferSplashImage(Context context, File file,
            String fileProviderAuthority, String packageName, CustomTabsSession session) {
        Uri uri = FileProvider.getUriForFile(context, fileProviderAuthority, file);
        context.grantUriPermission(packageName, uri, FLAG_GRANT_READ_URI_PERMISSION);
        return session.receiveFile(uri, CustomTabsService.FILE_PURPOSE_TWA_SPLASH_IMAGE, null);
    }
Transfers the splash image to a Custom Tabs provider. The reading and decoding of the image
happens synchronously, so it's recommended to call this method on a worker thread.

This method should be called prior to launching the Activity.
Pass additional parameters, such as background color, using
{@link TrustedWebActivityIntentBuilder#setSplashScreenParams(Bundle)}.

@param context {@link Context} to use.
@param file {@link File} with the image.
@param fileProviderAuthority authority of {@link FileProvider} used to generate an URI for
                             the file.
@param packageName Package name of Custom Tabs provider.
@param session {@link CustomTabsSession} established with the Custom Tabs provider.
@return True if the image was received and processed successfully.
customtabs/src/android/support/customtabs/TrustedWebUtils.java