mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-06-19 21:05:25 +08:00
Fix root permission request on read from pcap
INTERNET_ACROSS_USERS was requested when trying to read from a PCAP file, which triggered a failure toast in most cases
This commit is contained in:
parent
44f8dd8d29
commit
bf6e834f17
@ -1062,7 +1062,7 @@ public class CaptureService extends VpnService implements Runnable {
|
||||
// Inside the mCaptureThread
|
||||
@Override
|
||||
public void run() {
|
||||
if(mSettings.root_capture || mSettings.readFromPcap()) {
|
||||
if(mSettings.root_capture) {
|
||||
// Check for INTERACT_ACROSS_USERS, required to query apps of other users/work profiles
|
||||
if(checkCallingOrSelfPermission(Utils.INTERACT_ACROSS_USERS) != PackageManager.PERMISSION_GRANTED) {
|
||||
boolean success = Utils.rootGrantPermission(this, Utils.INTERACT_ACROSS_USERS);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user