Skip to content

Commit

Permalink
exclude body fields from the list cursor to mitigate crashes due to d…
Browse files Browse the repository at this point in the history
…ata size - refs #12
  • Loading branch information
jgilfelt committed Feb 13, 2017
1 parent e3866b3 commit 8ee9204
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ public enum Status {
Failed
}

public static final String[] PARTIAL_PROJECTION = new String[] {
"_id",
"requestDate",
"tookMs",
"method",
"host",
"path",
"scheme",
"requestContentLength",
"responseCode",
"error",
"responseContentLength"
};

private static final SimpleDateFormat TIME_ONLY_FMT = new SimpleDateFormat("HH:mm:ss", Locale.US);

private Long _id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public Loader<Cursor> onCreateLoader(int id, Bundle args) {
loader.setSelectionArgs(new String[]{ "%" + currentFilter + "%" });
}
}
loader.setProjection(HttpTransaction.PARTIAL_PROJECTION);
loader.setSortOrder("requestDate DESC");
return loader;
}
Expand Down

0 comments on commit 8ee9204

Please sign in to comment.