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

Commit 528a87e9 authored by Yi-an Chen's avatar Yi-an Chen
Browse files

Fix error handling for non-dynamic permissions

We only allow removing dynamic permissions. When removePermission() is
called for a non-dynamic permission, in addition to logging it, we
should also return early to avoid the removePermission() call.

Test: manual
Bug: 321555066
Fixes: 321711213
Change-Id: Ie2f43663bc71a06ffadb868d2d0eea5ee78f76e5
parent ebab9abb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -678,6 +678,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
                // TODO: switch this back to SecurityException
                Slog.wtf(TAG, "Not allowed to modify non-dynamic permission "
                        + permName);
                return;
            }
            mRegistry.removePermission(permName);
        }