diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java index 42449c5694..823710881a 100644 --- a/app/src/main/java/eu/faircode/email/ActivityBase.java +++ b/app/src/main/java/eu/faircode/email/ActivityBase.java @@ -370,12 +370,12 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { - String action = (data == null ? null : data.getAction()); - Log.i("Result class=" + this.getClass().getSimpleName() + - " action=" + action + " request=" + requestCode + " result=" + resultCode); - Log.logExtras(data); - if (data != null) - Log.i("data=" + data.getData()); + EntityLog.log(this, "Result class=" + this.getClass().getSimpleName() + + " action=" + (data == null ? null : data.getAction()) + + " request=" + requestCode + + " result=" + resultCode + " ok=" + (resultCode == RESULT_OK) + + " data=" + (data == null ? null : data.getData()) + + (data == null ? "" : " " + TextUtils.join(" ", Log.getExtras(data.getExtras())))); super.onActivityResult(requestCode, resultCode, data); } diff --git a/app/src/main/java/eu/faircode/email/FragmentBase.java b/app/src/main/java/eu/faircode/email/FragmentBase.java index ebe8b609bd..b52d9e7b66 100644 --- a/app/src/main/java/eu/faircode/email/FragmentBase.java +++ b/app/src/main/java/eu/faircode/email/FragmentBase.java @@ -315,12 +315,12 @@ public class FragmentBase extends Fragment { @Override public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { - String action = (data == null ? null : data.getAction()); - Log.i("Result class=" + this.getClass().getSimpleName() + - " action=" + action + " request=" + requestCode + " result=" + resultCode); - Log.logExtras(data); - if (data != null) - Log.i("data=" + data.getData()); + EntityLog.log(getContext(), "Result class=" + this.getClass().getSimpleName() + + " action=" + (data == null ? null : data.getAction()) + + " request=" + requestCode + + " result=" + resultCode + " ok=" + (resultCode == RESULT_OK) + + " data=" + (data == null ? null : data.getData()) + + (data == null ? "" : " " + TextUtils.join(" ", Log.getExtras(data.getExtras())))); super.onActivityResult(requestCode, resultCode, data); try {