Added logging

This commit is contained in:
M66B 2021-12-06 08:03:58 +01:00
parent e3c95fdb1e
commit 7919658da5
1 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
@ -100,12 +101,16 @@ public class FragmentDialogAsk extends FragmentDialogBase {
}
});
EntityLog.log(context, "Ask" + TextUtils.join(" ", Log.getExtras(args)));
return new AlertDialog.Builder(context)
.setView(dview)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (confirm == null || cbConfirm.isChecked()) {
boolean confirmed = (confirm == null || cbConfirm.isChecked());
EntityLog.log(context, "Ask confirmed=" + confirmed);
if (confirmed) {
if (notagain != null && accept != null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit().putBoolean(notagain, cbNotAgain.isChecked()).apply();
@ -118,6 +123,7 @@ public class FragmentDialogAsk extends FragmentDialogBase {
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
EntityLog.log(context, "Ask canceled");
sendResult(Activity.RESULT_CANCELED);
}
})