package com.bytedance.sdk.openadsdk.utils;

import android.net.Uri;
import android.text.TextUtils;
import android.webkit.WebView;

/* JADX INFO: loaded from: classes2.dex */
public class wey {
    public static void fm(Uri uri, com.bytedance.sdk.openadsdk.core.hxv hxvVar) {
        if (hxvVar == null || !hxvVar.fm(uri)) {
            return;
        }
        try {
            hxvVar.ro(uri);
        } catch (Exception e10) {
            e10.toString();
        }
    }

    public static String fm(WebView webView, int i10) {
        if (webView == null) {
            return "";
        }
        String userAgentString = webView.getSettings().getUserAgentString();
        if (TextUtils.isEmpty(userAgentString)) {
            return "";
        }
        return userAgentString + " open_news open_news_u_s/" + i10;
    }
}
