package com.google.android.play.core.b;

import X.0HH;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;
import com.bytedance.covode.number.Covode;
import java.util.IllegalFormatException;
import java.util.Locale;

public final class b {
    public final String LIZ;

    static {
        Covode.recordClassIndex(44250);
    }

    public b(String str) {
        int myUid = Process.myUid();
        int myPid = Process.myPid();
        StringBuilder sb = new StringBuilder(39);
        sb.append("UID: [");
        sb.append(myUid);
        sb.append("]  PID: [");
        sb.append(myPid);
        sb.append("] ");
        String valueOf = String.valueOf(sb.toString());
        String valueOf2 = String.valueOf(str);
        this.LIZ = valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf);
    }

    private final int LIZ(int i, String str, Object[] objArr) {
        if (Log.isLoggable("PlayCore", i)) {
            return Log.i("PlayCore", LIZ(this.LIZ, str, objArr));
        }
        return 0;
    }

    public static String LIZ(String str, String str2, Object... objArr) {
        if (objArr.length > 0) {
            try {
                str2 = 0HH.LIZ(Locale.US, str2, objArr);
            } catch (IllegalFormatException unused) {
                String valueOf = String.valueOf(str2);
                if (valueOf.length() != 0) {
                    "Unable to format ".concat(valueOf);
                } else {
                    new String("Unable to format ");
                }
                String join = TextUtils.join(", ", objArr);
                int length = String.valueOf(str2).length();
                StringBuilder sb = new StringBuilder(length + 3 + String.valueOf(join).length());
                sb.append(str2);
                sb.append(" [");
                sb.append(join);
                sb.append("]");
                str2 = sb.toString();
            }
        }
        int length2 = String.valueOf(str).length();
        StringBuilder sb2 = new StringBuilder(length2 + 3 + String.valueOf(str2).length());
        sb2.append(str);
        sb2.append(" : ");
        sb2.append(str2);
        return sb2.toString();
    }

    public final void LIZ() {
        boolean isLoggable = Log.isLoggable("PlayCore", 6);
    }

    public final void LIZ(String str, Object... objArr) {
        LIZ(3, str, objArr);
    }

    public final void LIZIZ(String str, Object... objArr) {
        LIZ(6, str, objArr);
    }

    public final void LIZJ(String str, Object... objArr) {
        LIZ(4, str, objArr);
    }

    public final void LIZLLL(String str, Object... objArr) {
        LIZ(5, str, objArr);
    }
}
