Skip to content

Commit 517d38f

Browse files
author
维术
committed
[Exposed-UI] use lambda instead
1 parent 1fa8f5a commit 517d38f

File tree

1 file changed

+6
-10
lines changed
  • VirtualApp/app/src/main/java/io/virtualapp

1 file changed

+6
-10
lines changed

VirtualApp/app/src/main/java/io/virtualapp/VApp.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import android.util.Log;
88

99
import com.flurry.android.FlurryAgent;
10-
import com.lody.virtual.client.core.CrashHandler;
1110
import com.lody.virtual.client.core.InstallStrategy;
1211
import com.lody.virtual.client.core.VirtualCore;
1312
import com.lody.virtual.client.stub.VASettings;
@@ -127,15 +126,12 @@ public void onVirtualProcess() {
127126
virtualCore.setPhoneInfoDelegate(new MyPhoneInfoDelegate());
128127
//fake task description's icon and title
129128
virtualCore.setTaskDescriptionDelegate(new MyTaskDescriptionDelegate());
130-
virtualCore.setCrashHandler(new CrashHandler() {
131-
@Override
132-
public void handleUncaughtException(Thread t, Throwable e) {
133-
Log.i(TAG, "uncaught :" + t, e);
134-
if (t == Looper.getMainLooper().getThread()) {
135-
System.exit(0);
136-
} else {
137-
Log.e(TAG, "ignore uncaught exception of thread: " + t);
138-
}
129+
virtualCore.setCrashHandler((t, e) -> {
130+
Log.i(TAG, "uncaught :" + t, e);
131+
if (t == Looper.getMainLooper().getThread()) {
132+
System.exit(0);
133+
} else {
134+
Log.e(TAG, "ignore uncaught exception of thread: " + t);
139135
}
140136
});
141137
// ensure the logcat service alive when every virtual process start.

0 commit comments

Comments
 (0)