Improved logging

pull/194/merge
M66B 3 years ago
parent 7919658da5
commit 4c92f415cd

@ -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…
Cancel
Save