Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Add debug logging for content providers
Browse files Browse the repository at this point in the history
Refs #1367
  • Loading branch information
M66B committed Feb 17, 2014
1 parent 5e8c13a commit aef2bef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/biz/bokhorst/xprivacy/XContentResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ private void handleUriBefore(MethodHookParam param) throws Throwable {
if (param.args.length > 1 && param.args[0] instanceof Uri) {
String uri = ((Uri) param.args[0]).toString().toLowerCase();
String[] projection = (param.args[1] instanceof String[] ? (String[]) param.args[1] : null);
Util.log(this, Log.INFO, "Before uri=" + uri);

if (uri.startsWith("content://com.android.contacts/contacts")
|| uri.startsWith("content://com.android.contacts/data")
Expand Down Expand Up @@ -147,6 +148,7 @@ private void handleUriAfter(MethodHookParam param) throws Throwable {
if (param.args.length > 1 && param.args[0] instanceof Uri && param.getResult() != null) {
String uri = ((Uri) param.args[0]).toString().toLowerCase();
Cursor cursor = (Cursor) param.getResult();
Util.log(this, Log.INFO, "After uri=" + uri);

if (uri.startsWith("content://applications")) {
// Applications provider: allow selected applications
Expand Down

0 comments on commit aef2bef

Please sign in to comment.