Skip to content

Commit

Permalink
[Exposed-UI] use lambda instead
Browse files Browse the repository at this point in the history
  • Loading branch information
维术 committed Jan 26, 2018
1 parent 1fa8f5a commit 517d38f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions VirtualApp/app/src/main/java/io/virtualapp/VApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 517d38f

Please sign in to comment.