android – SecurityException: not allowed to perform OP_READ_PHONE_STATE-ThrowExceptions

Exception or error:

User is reporting my app crashes with this error trace

java.lang.SecurityException: from uid 10134 not allowed to perform OP_READ_PHONE_STATE
at android.os.Parcel.readException(
at android.os.Parcel.readException(
at android.telephony.TelephonyManager.getVoiceMailNumber(
at android.telephony.TelephonyManager.getVoiceMailNumber(

So far only one user has reported this problem. Several thousand other users are running this version of the app with no apparent problems.

The exception is thrown when we call TelephonyManager.getVoiceMailNumber(). This operation is documented as required the READ_PHONE_STATE permission, which has absolutely, positively been granted.

I tracked down the OP_READ_PHONE_STATE permission to the android.apps.AppOpsManager class but can not figure out exactly what it is unhappy about.

Can anyone explain just what is happening and what needs to be done to fix things.


How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *