Framework patches for OpenPDroid permission management