package p138.p176.p177.p190.p239;

import android.text.TextUtils;
import android.util.Log;
import java.net.UnknownHostException;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ဢ.ފ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4131 {
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6644(String str, Throwable th) {
        boolean z;
        String strReplace;
        if (th == null) {
            strReplace = null;
        } else {
            Throwable cause = th;
            while (true) {
                if (cause == null) {
                    z = false;
                    break;
                }
                if (cause instanceof UnknownHostException) {
                    z = true;
                    break;
                }
                cause = cause.getCause();
            }
            strReplace = z ? "UnknownHostException (no network)" : Log.getStackTraceString(th).trim().replace("\t", "    ");
        }
        if (TextUtils.isEmpty(strReplace)) {
            return str;
        }
        StringBuilder sbM4897 = C2803.m4897(str, "\n  ");
        sbM4897.append(strReplace.replace("\n", "\n  "));
        sbM4897.append('\n');
        return sbM4897.toString();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m6645(String str, String str2, Throwable th) {
        Log.e(str, m6644(str2, th));
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static void m6646(String str, String str2, Throwable th) {
        Log.w(str, m6644(str2, th));
    }
}
