Depending on the implementation of the permission blocking block (for example, via Xposed), either the application is supplied with fake data or the application process will be canceled.
You wonโt be able to determine if the application is receiving fake data or not, but in this case your application will at least not work.
If the permission is revoked at the process level, then ContextCompat.checkSelfPermission() can detect it even at pre-M and returns PERMISSION_DENIED . Note: if you use the ContextCompat method, you also need to use the ActivityCompat.shouldShowRequestPermissionRationale() and ActivityCompat.requestPermissions() methods or their version of FragmentCompat .
See here for more information. Support library methods for handling permissions .
source share