Show toast if connection is not found

This commit is contained in:
emanuele-f 2022-06-15 17:03:23 +02:00
parent a9c60b025d
commit 99e2593286
3 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public class ConnectionOverview extends Fragment implements ConnectionDetailsAct
mConn = reg.getConnById(args.getInt("conn_id"));
if(mConn == null) {
Log.e(TAG, "null connection");
Utils.showToast(requireContext(), R.string.connection_not_found);
mActivity.finish();
return;
}

View File

@ -21,7 +21,6 @@ package com.emanuelef.remote_capture.fragments;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@ -95,7 +94,7 @@ public class ConnectionPayload extends Fragment implements ConnectionDetailsActi
mConn = reg.getConnById(args.getInt("conn_id"));
if(mConn == null) {
Log.e(TAG, "null connection");
Utils.showToast(requireContext(), R.string.connection_not_found);
mActivity.finish();
return;
}

View File

@ -361,4 +361,5 @@
<string name="app_intro_traffic_dump">PCAPdroid provides <a href='%1$s'>multiple ways</a> to dump the traffic in the standard PCAP format for further analysis\n\nVia the <a href='%2$s'>trailer option</a>, you can add app names to the packets and display them in Wireshark</string>
<string name="permission_granted">%1$s permission was granted</string>
<string name="permission_grant_fail">%1$s permission could not be granted</string>
<string name="connection_not_found">Could not find the given connection</string>
</resources>