I'm coding myself a simple utility library for handling runtime permission requests and I want it to throw an error every time I request a permission that is not declared in my manifest.
Is there any convenient way of checking the manifest for uses-permission
entries without parsing it every time an activity starts?
I know there's something like Bundle.getHeaders()
but I can't find it's documentation anywhere so I don't know how to use it.