Fix `IContentProvider` for Android P and below (#2735)

Fix #2734
This commit is contained in:
Howard Wu 2023-09-01 21:54:50 +08:00 committed by GitHub
parent 3f99118d9c
commit 0d7cfd3797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -97,6 +97,8 @@ public class LSPModuleService extends IXposedService.Stub {
reply = provider.call("android", null, authority, SEND_BINDER, null, extra); reply = provider.call("android", null, authority, SEND_BINDER, null, extra);
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) { } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) {
reply = provider.call("android", authority, SEND_BINDER, null, extra); reply = provider.call("android", authority, SEND_BINDER, null, extra);
} else {
reply = provider.call("android", SEND_BINDER, null, extra);
} }
if (reply != null) { if (reply != null) {
Log.d(TAG, "sent module binder to " + name); Log.d(TAG, "sent module binder to " + name);

View File

@ -7,6 +7,9 @@ import android.os.RemoteException;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
public interface IContentProvider extends IInterface { public interface IContentProvider extends IInterface {
Bundle call(String callingPkg, String method,
String arg, Bundle extras) throws RemoteException;
@RequiresApi(29) @RequiresApi(29)
Bundle call(String callingPkg, String authority, String method, Bundle call(String callingPkg, String authority, String method,
String arg, Bundle extras) throws RemoteException; String arg, Bundle extras) throws RemoteException;