diff --git a/VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/bluetooth/BluetoothStub.java b/VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/bluetooth/BluetoothStub.java index 9590cab43..1eb15b4ff 100644 --- a/VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/bluetooth/BluetoothStub.java +++ b/VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/bluetooth/BluetoothStub.java @@ -9,6 +9,7 @@ import java.lang.reflect.Method; import mirror.android.bluetooth.IBluetooth; +import mirror.android.bluetooth.IBluetoothManager; /** * @see android.bluetooth.BluetoothManager @@ -19,7 +20,8 @@ public class BluetoothStub extends BinderInvocationProxy { "bluetooth"; public BluetoothStub() { - super(IBluetooth.Stub.asInterface, SERVICE_NAME); + super(Build.VERSION.SDK_INT >= 17 ? IBluetoothManager.Stub.asInterface : IBluetooth.Stub.asInterface, + SERVICE_NAME); } @Override diff --git a/VirtualApp/lib/src/main/java/mirror/android/bluetooth/IBluetoothManager.java b/VirtualApp/lib/src/main/java/mirror/android/bluetooth/IBluetoothManager.java new file mode 100644 index 000000000..ad06679ca --- /dev/null +++ b/VirtualApp/lib/src/main/java/mirror/android/bluetooth/IBluetoothManager.java @@ -0,0 +1,23 @@ +package mirror.android.bluetooth; + +import android.os.IBinder; +import android.os.IInterface; + +import mirror.MethodParams; +import mirror.RefClass; +import mirror.RefStaticMethod; + +public class IBluetoothManager { + /** + * @see android.bluetooth.IBluetoothManager + * */ + public static Class TYPE = RefClass.load(IBluetoothManager.class, "android.bluetooth.IBluetoothManager"); + /** + * @see android.bluetooth.IBluetoothManager.Stub + * */ + public static class Stub { + public static Class TYPE = RefClass.load(Stub.class, "android.bluetooth.IBluetoothManager$Stub"); + @MethodParams({IBinder.class}) + public static RefStaticMethod asInterface; + } +}