private static void showToastIfResourceExists(Context context, String resource) {
        int stringId = context.getResources().getIdentifier(resource, null,
                context.getPackageName());
        if (stringId == 0) return;

        Toast.makeText(context, stringId, Toast.LENGTH_LONG).show();
    }
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