[Soot-list] Any way to get the body of callback methods (not android default handlers) ?
Xinxin Jin
xinxinjin89 at gmail.com
Wed Feb 18 16:43:53 EST 2015
Hi Eric,
Thanks for your reply. I checked all the reachable methods and found no
place invoking onResponse and onErrorResponse.
The statement that invokes StringRequest() method is :
*<com.android.volley.toolbox.StringRequest: void
<init>(int,java.lang.String,com.android.volley.Response$Listener,com.android.volley.Response$ErrorListener)>(
"http://www.google.com <http://www.google.com>", $r7, $r8)*
Here parameters $r7, $r8 correspond to Response.Listener() and
Response.ErrorListener(). Then I continued to track the definition of r7:
*$r7 = new edu.ucsd.mytest.VolleyActivity$1*
But there is no useful statement in edu.ucsd.mytest.VolleyActivity$1 ....
Any ideas ?
Thank you a lot !!
On Wed, Feb 18, 2015 at 11:47 AM, Bodden, Eric <
eric.bodden at sit.fraunhofer.de> wrote:
> Hi Xinxin.
>
> I think the problem is that the bytecode's structure differs from the
> source code's. Although in the source the two anonymous subclasses of
> Listener resp. ErrorListener are lexically contained in the constructor
> call, they are not in the bytecode. Please inspect the call to
> StringRequest.<init>. You should see references the second and third
> parameter both being initialized with instances of classes such as
> Response.Listener$1. You have to inspect the bodies of the onResponse
> methods in those classes.
>
> Hope that helps,
> Eric
>
> > On 18.02.2015, at 18:21, Xinxin Jin <xinxinjin89 at gmail.com> wrote:
> >
> > Hi all,
> >
> > I have an application which calls new StringRequest()of Volley library:
> >
> >
> > StringRequest request = new StringRequest(url,
> > new Response.Listener() {
> > @Override
> > public void onResponse(Object response) {
> > Log.d(TAG, "response " + ((String)
> response).substring(0,500));
> > }
> > }, new Response.ErrorListener() {
> > @Override
> > public void onErrorResponse(VolleyError error) {
> > Log.d(TAG, "error message");
> > }
> > });
> >
> >
> > It contains two callbacks as its parameters: Response.Listener() and
> Response.ErrorListener().
> >
> > When I parse reached methods of this application, it can only reach
> SootMethod StringRequest: <init>, but when I examine all the statements in
> this method, I cannot find bodies of the two registered listeners. Is there
> any way to get the method body of onResponse() ?
> >
> > Thank you for your help !
> >
> > --
> > Xinxin
> >
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at CS.McGill.CA
> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering at Fraunhofer SIT, TU Darmstadt and EC
> SPRIDE
> Tel: +49 6151 16-75422 Fax: +49 6151 869-127
> Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
>
>
--
Xinxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150218/fcce2409/attachment-0001.html
More information about the Soot-list
mailing list