mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Fix possible IllegalStateException in mitmwizard
This commit is contained in:
parent
04fe20ca95
commit
4720555d26
@ -223,17 +223,25 @@ public class InstallCertificate extends StepFragment implements MitmListener {
|
||||
|
||||
@Override
|
||||
public void onMitmServiceConnect() {
|
||||
context ctx = getcontext();
|
||||
if(ctx == null)
|
||||
return;
|
||||
|
||||
if(!mAddon.requestCaCertificate()) {
|
||||
Toast.makeText(requireContext(), "requestCaCertificate failed", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ctx, "requestCaCertificate failed", Toast.LENGTH_LONG).show();
|
||||
certFail();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMitmServiceDisconnect() {
|
||||
context ctx = getcontext();
|
||||
if(ctx == null)
|
||||
return;
|
||||
|
||||
if(mCaPem == null) {
|
||||
Toast.makeText(requireContext(), "addon disconnected", Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(ctx, "addon disconnected", Toast.LENGTH_LONG).show();
|
||||
certFail();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user