处理 unregister 可能的问题

This commit is contained in:
巫翔 2021-09-26 15:24:35 +08:00
parent b0a1591b0f
commit ef91313681

View File

@ -91,8 +91,10 @@ public class RedLightScan extends CordovaPlugin {
} }
private void unregisterReceiver() { private void unregisterReceiver() {
if (receiver != null) {
webView.getContext().unregisterReceiver(receiver); webView.getContext().unregisterReceiver(receiver);
} }
}
@Override @Override
public void onResume(boolean multitasking) { public void onResume(boolean multitasking) {