Skip to content

Commit fb0a654

Browse files

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/providers/ProviderHook.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ public Object invoke(Object proxy, Method method, Object... args) throws Throwab
158158
try {
159159
String name = method.getName();
160160
if ("call".equals(name)) {
161-
if (BuildCompat.isR()) {
161+
if (BuildCompat.isS()) {
162+
// What's the fuck with Google???
163+
// https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/core/java/android/content/IContentProvider.java;l=123
164+
start = 2;
165+
} else if (BuildCompat.isR()) {
162166
start = 3;
163167
} else if (BuildCompat.isQ()) {
164168
start = 2;

VirtualApp/lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public static boolean isR() {
3535
return isAndroidLevel(30);
3636
}
3737

38+
public static boolean isS() {
39+
return isAndroidLevel(31);
40+
}
41+
3842
private static boolean isAndroidLevelPreview(int level) {
3943
return (Build.VERSION.SDK_INT == level && getPreviewSDKInt() > 0)
4044
|| Build.VERSION.SDK_INT > level;

0 commit comments

Comments
 (0)