package com.tencent.mm.plugin.offline.ui;

import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.text.TextUtils;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.h;

public final class b {
    public static void b(Activity activity, String str) {
        AppMethodBeat.i(43469);
        if (TextUtils.isEmpty(str)) {
            str = activity.getString(2131305389);
        }
        h.a(activity, str, null, false, new OnClickListener() {
            public final void onClick(DialogInterface dialogInterface, int i) {
                AppMethodBeat.i(43465);
                dialogInterface.dismiss();
                AppMethodBeat.o(43465);
            }
        });
        AppMethodBeat.o(43469);
    }

    public static void c(Activity activity, String str, String str2) {
        String string;
        AppMethodBeat.i(43470);
        if (TextUtils.isEmpty(str)) {
            string = activity.getString(2131305389);
        } else {
            string = str;
        }
        if (bo.isNullOrNil(str2)) {
            b(activity, string);
            AppMethodBeat.o(43470);
            return;
        }
        ab.i("MicroMsg.OfflineErrorHelper", "error_detail_url is not null ");
        h.a(activity, string, null, activity.getResources().getString(2131304787), activity.getResources().getString(2131296994), true, new 2(str2, activity), new OnClickListener() {
            public final void onClick(DialogInterface dialogInterface, int i) {
                AppMethodBeat.i(43467);
                dialogInterface.dismiss();
                AppMethodBeat.o(43467);
            }
        });
        AppMethodBeat.o(43470);
    }

    public static void T(Activity activity) {
        AppMethodBeat.i(43471);
        ab.e("MicroMsg.OfflineErrorHelper", "offline code size is 0, show check network error dialog");
        h.a(activity, activity.getString(2131305437), null, false, new 4(activity));
        AppMethodBeat.o(43471);
    }
}
