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

Commit 17974a78 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am ab4bb65e: am 3c44cc54: Display properly runtime permissions without a corresponding app op.

* commit 'ab4bb65e':
  Display properly runtime permissions without a corresponding app op.
parents 21e10e30 ab4bb65e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -275,8 +275,9 @@ public final class AppPermissionGroup implements Comparable<AppPermissionGroup>
                if (permission.isGranted()) {
                    return true;
                }
            } else if (permission.isGranted() && permission.getAppOp()
                    != AppOpsManager.OP_NONE && permission.isAppOpAllowed()) {
            } else if (permission.isGranted() && ((permission.getAppOp()
                    != AppOpsManager.OP_NONE && permission.isAppOpAllowed())
                    || permission.getAppOp() == AppOpsManager.OP_NONE)) {
                return true;
            }
        }
+0 −13
Original line number Diff line number Diff line
@@ -84,13 +84,6 @@ public class Utils {
            return false;
        }

        // Yes this is possible. We have leftover permissions that
        // are not in the final groups and we want to get rid of,
        // therefore we do not have app ops for legacy support.
        if (!group.hasRuntimePermission() && !group.hasAppOpPermission()) {
            return false;
        }

        final boolean isPlatformPermission = group.getDeclaringPackage().equals(OS_PKG);
        // Show legacy permissions only if the user chose that.
        if (isPlatformPermission
@@ -108,12 +101,6 @@ public class Utils {
            return false;
        }

        // Yes this is possible. We have leftover permissions that
        // are not in the final groups and we want to get rid of,
        // therefore we do not have app ops for legacy support.
        if (!app.hasRuntimePermissions() && !app.hasAppOpPermissions()) {
            return false;
        }
        return true;
    }