mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-12 21:24:46 +08:00
Fix resolved AppDescriptor not cached with root
This commit is contained in:
parent
711d970279
commit
31488d55e1
@ -141,7 +141,7 @@ public class AppsResolver {
|
||||
|
||||
PackageInfo pinfo = (PackageInfo) getPackageInfoAsUser.invoke(mPm, packageName, pm_flags, Utils.getUserId(uid));
|
||||
if(pinfo != null)
|
||||
return new AppDescriptor(mPm, pinfo);
|
||||
app = new AppDescriptor(mPm, pinfo);
|
||||
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
|
||||
Log.w(TAG, "getPackageInfoAsUser call fails, falling back to standard resolution");
|
||||
e.printStackTrace();
|
||||
@ -149,7 +149,9 @@ public class AppsResolver {
|
||||
}
|
||||
}
|
||||
|
||||
app = resolve(mPm, packageName, pm_flags);
|
||||
if(app == null)
|
||||
app = resolve(mPm, packageName, pm_flags);
|
||||
|
||||
if(app != null)
|
||||
mApps.put(uid, app);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user