public static boolean splashScreensAreSupported(Context context, String packageName,
            @SplashScreenVersion String version) {
        Intent serviceIntent = new Intent()
                .setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION)
                .setPackage(packageName);
        ResolveInfo resolveInfo =
               context.getPackageManager().resolveService(serviceIntent,
                       PackageManager.GET_RESOLVED_FILTER);
        if (resolveInfo == null || resolveInfo.filter == null) return false;
        return resolveInfo.filter.hasCategory(version);
    }
Returns whether the splash screens feature is supported by the given package.
Note: you can call this method prior to connecting to a {@link CustomTabsService}. This way,
if true is returned, the splash screen can be shown as soon as possible.

TODO(pshmakov): make TwaProviderPicker gather supported features, including splash screens,
to avoid extra PackageManager queries.
customtabs/src/android/support/customtabs/TrustedWebUtils.java