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

Commit eba09588 authored by Svet Ganov's avatar Svet Ganov
Browse files

Properly show third-party defined permission in platform groups

Apps can define permissions in the platform groups. If a legacy app
deifines a permission in a platform group we were showing the permission
twice because we failed to group the custom permission in the platform
group when building the UI.

bug:26142772

Change-Id: I263bff8631e14395c9000e5e54b0e160969e1eb2
parent 3f07e658
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -136,9 +136,9 @@ public final class AppPermissionGroup implements Comparable<AppPermissionGroup>
                continue;
            }

            // Don't allow toggle of non platform defined permissions for legacy apps via app ops.
            // Don't allow toggling non-platform permission groups for legacy apps via app ops.
            if (packageInfo.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1
                    && !PLATFORM_PACKAGE_NAME.equals(requestedPermissionInfo.packageName)) {
                    && !PLATFORM_PACKAGE_NAME.equals(groupInfo.packageName)) {
                continue;
            }