Categories
Android

Android代码真是精益求精

看了一个ChangeLog,

     private OnItemClickListener mMessageClickedHandler = new OnItemClickListener() {
         public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
             Intent intent;
-            int i = position - 1;
+            position = position - 1;
             
-            switch (i) {
+            switch (position) {

一个变量都不想加,对应的ddx格式为:

 67     sub-int v0, p3, v2
 68 
 69     .line 339
 70     .local v0, i:I
 71     packed-switch v0, :pswitch_data_0


 67     sub-int/2addr p3, v1
 68 
 69     .line 339
 70     packed-switch p3, :pswitch_data_0
If you enjoyed this post, make sure you subscribe to my RSS feed!

2 replies on “Android代码真是精益求精”

想请教下你对解读ddx的心得,如何快速从代码定位到ddx里面的位置呢?谢谢

Leave a Reply

Your email address will not be published. Required fields are marked *