Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed Hook BluetoothAdapter#getAddress failed >= JELLY_BEAN_MR1 #458

Merged
merged 1 commit into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.lang.reflect.Method;

import mirror.android.bluetooth.IBluetooth;
import mirror.android.bluetooth.IBluetoothManager;

/**
* @see android.bluetooth.BluetoothManager
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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<IInterface> asInterface;
}
}