Skip to content

Commit

Permalink
* [Issue #3] Bug in the implementation of Api.getPackagesForUser() le…
Browse files Browse the repository at this point in the history
…ading to empty package list.

Fixed the error in the syntax of the 'pm list packages' command executed in the Api.getPackagesForUser() leading to an execution error and consequently to an empty package list getting returned.
  • Loading branch information
amaa-99 committed Aug 9, 2023
1 parent e5a5202 commit 7fe9332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/dev/ukanth/ufirewall/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ private static boolean packagesExistForUserUid(HashMap<Integer,String> pkgs, int
public static HashMap<Integer, String> getPackagesForUser(List<Integer> userProfile) {
HashMap<Integer,String> listApps = new HashMap<>();
for(Integer integer: userProfile) {
Shell.Result result = Shell.cmd("pm list packages -U --user " + integer).exec();
Shell.Result result = Shell.cmd("pm list packages -u --user " + integer).exec();
List<String> out = result.getOut();
Matcher matcher;
for (String item : out) {
Expand Down

0 comments on commit 7fe9332

Please sign in to comment.