Skip to content

Commit

Permalink
rename callback
Browse files Browse the repository at this point in the history
  • Loading branch information
lahm committed Jul 25, 2018
1 parent 1f68b7d commit bbaa94a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/lahm/easyprotector/TestApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.Application;

import com.lahm.library.CheckCallback;
import com.lahm.library.VirtualCheckCallback;
import com.lahm.library.EasyProtectorLib;
import com.lahm.library.VirtualApkCheckUtil;

Expand All @@ -17,7 +17,7 @@ public void onCreate() {
super.onCreate();
//AS模拟器的端口检测法会有问题,会抢localhost,所以这里加了个判断,平时真机可以直接调用端口检测
if (!EasyProtectorLib.checkIsRunningInEmulator())
VirtualApkCheckUtil.getSingleInstance().checkByPortListening(getPackageName(), new CheckCallback() {
VirtualApkCheckUtil.getSingleInstance().checkByPortListening(getPackageName(), new VirtualCheckCallback() {
@Override
public void findSuspect() {
System.out.println("ceshi----");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private boolean isNumber(String str) {
return true;
}

public void checkByPortListening(String secret, CheckCallback callback) {
public void checkByPortListening(String secret, VirtualCheckCallback callback) {
if (callback == null)
throw new IllegalArgumentException("you have to set a callback to deal with suspect");
this.checkCallback = callback;
Expand Down Expand Up @@ -224,7 +224,7 @@ private void startServer(String secret) {
}
}

private CheckCallback checkCallback;
private VirtualCheckCallback checkCallback;

private class ReadThread extends Thread {
private ReadThread(String secret, Socket socket) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
* Package Name:com.lahm.library
* Created by lahm on 2018/7/25 14:22 .
*/
public interface CheckCallback {
public interface VirtualCheckCallback {
void findSuspect();
}

0 comments on commit bbaa94a

Please sign in to comment.