public static LauncherActivityMetadata parse(Activity activity) {
        Bundle metaData = null;
        try {
            metaData = activity.getPackageManager().getActivityInfo(
                    new ComponentName(activity, activity.getClass()),
                    PackageManager.GET_META_DATA).metaData;
        } catch (PackageManager.NameNotFoundException e) {
            // Will only happen if the package provided (the one we are running in) is not
            // installed - so should never happen.
        }
        return new LauncherActivityMetadata(metaData == null ? new Bundle() : metaData);
    }
Creates LauncherActivityMetadata instance based on metadata of the passed Activity.
customtabs/src/android/support/customtabs/trusted/LauncherActivityMetadata.java