避免热插卡时FC

This commit is contained in:
pppscn 2021-03-18 17:13:11 +08:00
parent 30a4f6edb6
commit 41f75bdc84

View File

@ -180,7 +180,12 @@ public class MainActivity extends AppCompatActivity implements ReFlashListView.I
Log.d(TAG, "onDestroy");
super.onDestroy();
//取消注册广播
unregisterReceiver(smsBroadcastReceiver);
try {
if (smsBroadcastReceiver != null)
unregisterReceiver(smsBroadcastReceiver);
} catch (Exception e) {
Log.e(TAG, "unregisterReceiver fail:" + e.getMessage());
}
}
public void logDetail(LogVo logVo) {