|
8 | 8 | import android.os.Bundle; |
9 | 9 | import android.os.IInterface; |
10 | 10 | import android.os.ParcelFileDescriptor; |
| 11 | +import android.util.Log; |
11 | 12 |
|
12 | 13 | import com.lody.virtual.client.hook.base.MethodBox; |
13 | 14 | import com.lody.virtual.helper.compat.BuildCompat; |
@@ -152,11 +153,14 @@ public Object invoke(Object proxy, Method method, Object... args) throws Throwab |
152 | 153 | e.printStackTrace(); |
153 | 154 | } |
154 | 155 | MethodBox methodBox = new MethodBox(method, mBase, args); |
155 | | - int start = BuildCompat.isQ() ? 2 : (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 ? 1 : 0); |
| 156 | + int start = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 ? 1 : 0; |
156 | 157 |
|
157 | 158 | try { |
158 | 159 | String name = method.getName(); |
159 | 160 | if ("call".equals(name)) { |
| 161 | + if (BuildCompat.isQ()) { |
| 162 | + start = 2; |
| 163 | + } |
160 | 164 | String methodName = (String) args[start]; |
161 | 165 | String arg = (String) args[start + 1]; |
162 | 166 | Bundle extras = (Bundle) args[start + 2]; |
@@ -191,6 +195,7 @@ public Object invoke(Object proxy, Method method, Object... args) throws Throwab |
191 | 195 | String mode = (String) args[start + 1]; |
192 | 196 | return openAssetFile(methodBox, url, mode); |
193 | 197 | } else if ("query".equals(name)) { |
| 198 | + Log.i("mylog", "args: " + Arrays.toString(args)); |
194 | 199 | Uri url = (Uri) args[start]; |
195 | 200 | String[] projection = (String[]) args[start + 1]; |
196 | 201 | String selection = null; |
|
0 commit comments