mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Fix possible NullPointerException in connections
This commit is contained in:
parent
c98740c830
commit
4f22276562
@ -505,10 +505,13 @@ public class ConnectionsFragment extends Fragment implements ConnectionsListener
|
||||
} else if(id == R.id.hide_country) {
|
||||
mAdapter.mMask.addCountry(conn.country);
|
||||
mask_changed = true;
|
||||
} else if(id == R.id.search_app)
|
||||
setQuery(Objects.requireNonNull(
|
||||
mApps.getAppByUid(conn.uid, 0)).getPackageName());
|
||||
else if(id == R.id.search_host)
|
||||
} else if(id == R.id.search_app) {
|
||||
AppDescriptor app = mApps.getAppByUid(conn.uid, 0);
|
||||
if(app != null)
|
||||
setQuery(app.getPackageName());
|
||||
else
|
||||
return super.onContextItemSelected(item);
|
||||
} else if(id == R.id.search_host)
|
||||
setQuery(conn.info);
|
||||
else if(id == R.id.search_ip)
|
||||
setQuery(conn.dst_ip);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user