Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f030a28a authored by Alex Naidis's avatar Alex Naidis
Browse files

DefaultPermissionGrantPolicy: Pass correct arguments



After parsing the xml files in the "default-permissions"
system, we are passing the arguments in the wrong order.

The method we are targeting is:
private void grantRuntimePermissionsLPw(PackageParser.Package pkg, Set<String> permissions,
            boolean systemFixed, boolean isDefaultPhoneOrSms, int userId) {

However we are passing our argument for "systemFixed"
to "isDefaultPhoneOrSms" and the other way around too.

This patch fixes it by using the version of the method
which takes 4 arguments and sets "isDefaultPhoneOrSms"
as false.

Change-Id: I3604a5d6045aadcd91b6dd3f6f1b47b561403b23
Signed-off-by: default avatarAlex Naidis <alex.naidis@linux.com>
parent ddc7ac8b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,7 @@ final class DefaultPermissionGrantPolicy {
                        permissions.clear();
                    }
                    permissions.add(permissionGrant.name);
                    grantRuntimePermissionsLPw(pkg, permissions, false,
                    grantRuntimePermissionsLPw(pkg, permissions,
                            permissionGrant.fixed, userId);
                }
            }