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 Jul 28, 2023
1 parent 30bf035 commit 1433e79
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 1433e79

Please sign in to comment.