package com.facebook.login;

import android.content.Context;
import android.os.Bundle;
import com.facebook.internal.WebDialog;
import com.facebook.internal.WebDialog.Builder;
import com.tencent.matrix.trace.core.AppMethodBeat;

class WebViewLoginMethodHandler$AuthDialogBuilder extends Builder {
    private static final String OAUTH_DIALOG = "oauth";
    private String authType;
    private String e2e;
    private String redirect_uri = "fbconnect://success";

    public WebViewLoginMethodHandler$AuthDialogBuilder(Context context, String str, Bundle bundle) {
        super(context, str, OAUTH_DIALOG, bundle);
    }

    public WebViewLoginMethodHandler$AuthDialogBuilder setE2E(String str) {
        this.e2e = str;
        return this;
    }

    public WebViewLoginMethodHandler$AuthDialogBuilder setIsRerequest(boolean z) {
        return this;
    }

    public WebViewLoginMethodHandler$AuthDialogBuilder setIsChromeOS(boolean z) {
        this.redirect_uri = z ? "fbconnect://chrome_os_success" : "fbconnect://success";
        return this;
    }

    public WebViewLoginMethodHandler$AuthDialogBuilder setAuthType(String str) {
        this.authType = str;
        return this;
    }

    public WebDialog build() {
        AppMethodBeat.i(96934);
        Bundle parameters = getParameters();
        parameters.putString("redirect_uri", this.redirect_uri);
        parameters.putString("client_id", getApplicationId());
        parameters.putString("e2e", this.e2e);
        parameters.putString("response_type", "token,signed_request");
        parameters.putString("return_scopes", "true");
        parameters.putString("auth_type", this.authType);
        WebDialog newInstance = WebDialog.newInstance(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
        AppMethodBeat.o(96934);
        return newInstance;
    }
}
