From 517d38ffea012516f6279d8bed1f79b6c21f0c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=B4=E6=9C=AF?= Date: Sat, 27 Jan 2018 00:34:05 +0800 Subject: [PATCH] [Exposed-UI] use lambda instead --- .../app/src/main/java/io/virtualapp/VApp.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/VirtualApp/app/src/main/java/io/virtualapp/VApp.java b/VirtualApp/app/src/main/java/io/virtualapp/VApp.java index 18a8800b9..66f19d882 100644 --- a/VirtualApp/app/src/main/java/io/virtualapp/VApp.java +++ b/VirtualApp/app/src/main/java/io/virtualapp/VApp.java @@ -7,7 +7,6 @@ import android.util.Log; import com.flurry.android.FlurryAgent; -import com.lody.virtual.client.core.CrashHandler; import com.lody.virtual.client.core.InstallStrategy; import com.lody.virtual.client.core.VirtualCore; import com.lody.virtual.client.stub.VASettings; @@ -127,15 +126,12 @@ public void onVirtualProcess() { virtualCore.setPhoneInfoDelegate(new MyPhoneInfoDelegate()); //fake task description's icon and title virtualCore.setTaskDescriptionDelegate(new MyTaskDescriptionDelegate()); - virtualCore.setCrashHandler(new CrashHandler() { - @Override - public void handleUncaughtException(Thread t, Throwable e) { - Log.i(TAG, "uncaught :" + t, e); - if (t == Looper.getMainLooper().getThread()) { - System.exit(0); - } else { - Log.e(TAG, "ignore uncaught exception of thread: " + t); - } + virtualCore.setCrashHandler((t, e) -> { + Log.i(TAG, "uncaught :" + t, e); + if (t == Looper.getMainLooper().getThread()) { + System.exit(0); + } else { + Log.e(TAG, "ignore uncaught exception of thread: " + t); } }); // ensure the logcat service alive when every virtual process start.