Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add analysis support for ContentProviders #7

Open
jeandersonbc opened this issue Mar 15, 2016 · 1 comment
Open

Add analysis support for ContentProviders #7

jeandersonbc opened this issue Mar 15, 2016 · 1 comment
Assignees

Comments

@jeandersonbc
Copy link
Collaborator

Inter-component communication analysis should support ContentProviders as well.

@jeandersonbc
Copy link
Collaborator Author

I'm currently having problems to resolve name expressions. Consider the following case

int a = 10;
compute(a);

On the example, I am able to find method call "compute" and its parameter "a". The problem is finding the actual value of "a".

What I am trying to do is to search method calls for "query" and get the actual value of the content URI, usually declared on the same method:

public static final String AUTHORITY = "org.thialfihar.android.apg.provider";

// (...other constants...)

public static final Uri CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS = Uri.parse("content://" + AUTHORITY + "/key_rings/public/emails/");

// (...in a given method...)
Uri contentUri = Uri.withAppendedPath(Apg.CONTENT_URI_PUBLIC_KEY_RING_BY_EMAILS, emails);
Cursor c = activity.getContentResolver().query(contentUri,
                       new String[] { "master_key_id" }, null, null, null);

jeandersonbc added a commit that referenced this issue Mar 21, 2016
Visitor is able to find the content uri declaration node.
Now, it is necessary to resolve references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant