package E0;

import D0.b;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.WindowManager;

/* JADX INFO: loaded from: classes.dex */
public abstract class a extends Dialog {
    public a(Context context, int i2) {
        super(context, i2);
    }

    protected void a() {
    }

    @Override // android.app.Dialog, android.content.DialogInterface
    public void dismiss() {
        super.dismiss();
        a();
    }

    @Override // android.app.Dialog
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        WindowManager.LayoutParams attributes = getWindow().getAttributes();
        attributes.gravity = 17;
        attributes.width = getContext().getResources().getDimensionPixelOffset(b.f469b);
        attributes.height = -2;
        getWindow().setAttributes(attributes);
    }

    public a(Context context) {
        super(context);
    }
}
