|
@@ -69,12 +69,12 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
|
|
|
//如果用户没有处理则让系统默认的异常处理器来处理
|
|
|
mDefaultHandler.uncaughtException(thread, ex);
|
|
|
} else {
|
|
|
+ endCalling();
|
|
|
try {
|
|
|
Thread.sleep(2000);
|
|
|
} catch (InterruptedException e) {
|
|
|
Log.e(TAG, "error : ", e);
|
|
|
}
|
|
|
- endCalling();
|
|
|
Intent intent = new Intent(application.getApplicationContext(), Constants.ANR_FC);
|
|
|
@SuppressLint("WrongConstant") PendingIntent restartIntent = PendingIntent.getActivity(
|
|
|
application.getApplicationContext(), 0, intent,
|
|
@@ -180,7 +180,7 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
|
|
|
int mPendingIntentId = 123456;
|
|
|
PendingIntent mPendingIntent = PendingIntent.getActivity(application.getApplicationContext(), mPendingIntentId, mStartActivity, PendingIntent.FLAG_CANCEL_CURRENT);
|
|
|
AlarmManager mgr = (AlarmManager) application.getApplicationContext().getSystemService(Context.ALARM_SERVICE);
|
|
|
- mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 1500, mPendingIntent);
|
|
|
+ mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 3000, mPendingIntent);
|
|
|
android.os.Process.killProcess(android.os.Process.myPid());
|
|
|
}
|
|
|
}).start();
|
|
@@ -193,6 +193,9 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
|
|
|
private static void endCalling() {
|
|
|
UdpSendUtil.sendRingOff(null,null,"call_1_ringoff");
|
|
|
UdpSendUtil.sendRingOff(null,null,"call_6_ringoff");
|
|
|
- CallingBedFragment.getInstance().endCall();
|
|
|
+ //CallingBedFragment.getInstance().endCall();
|
|
|
+ if (!Constants.CALL_STATE.equals(Constants.STANDBY)) {
|
|
|
+ UdpSendUtil.sendExceptionNotification();
|
|
|
+ }
|
|
|
}
|
|
|
}
|