);
final AtomicBoolean done = new AtomicBoolean();
final MaterialDialog dialog = new MaterialDialog.Builder(activity)
.content("Getting share URL…")
.progress(true, 0)
<BUG>.negativeText(R.string.cancel)
.callback(new MaterialDialog.ButtonCallback() {
@Override
public void onNegative(final MaterialDialog dialog) {</BUG>
if (!done.getAndSet(true)) {

);
final AtomicBoolean done = new AtomicBoolean();
final MaterialDialog dialog = new MaterialDialog.Builder(activity)
.content("Getting share URL…")
.progress(true, 0)
.negativeText(R.string.cancel)
.onNegative((dialog1, which) -> {
if (!done.getAndSet(true)) {
