mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Improved logging
This commit is contained in:
parent
7919658da5
commit
4c92f415cd
2 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue