Skip to content

Commit 3fb999c

Browse files
committed
[Android 11]: Fix Android 11 window session
Signed-off-by: tiann <[email protected]>
1 parent 067f21e commit 3fb999c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/window/session/WindowSessionPatch.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.lody.virtual.client.hook.proxies.window.session;
22

3+
import android.os.Build;
34
import android.os.IInterface;
45

56
import com.lody.virtual.client.hook.base.MethodInvocationProxy;
67
import com.lody.virtual.client.hook.base.MethodInvocationStub;
7-
import com.lody.virtual.client.hook.base.ReplaceCallingPkgMethodProxy;
88

99
/**
1010
* @author Lody
@@ -22,6 +22,12 @@ public void onBindMethods() {
2222
addMethodProxy(new BaseMethodProxy("addToDisplayWithoutInputChannel"));
2323
addMethodProxy(new BaseMethodProxy("addWithoutInputChannel"));
2424
addMethodProxy(new BaseMethodProxy("relayout"));
25+
26+
// http://aospxref.com/android-11.0.0_r21/xref/frameworks/base/core/java/android/view/IWindowSession.aidl#51
27+
if (Build.VERSION.SDK_INT >= 30) {
28+
addMethodProxy(new BaseMethodProxy("addToDisplayAsUser"));
29+
addMethodProxy(new BaseMethodProxy("grantInputChannel"));
30+
}
2531
}
2632

2733

0 commit comments

Comments
 (0)