java.lang.SecurityException: Admin ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver} did not specify uses-policy for: disable-keyguard-features

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

,
via android.com by Unknown author

You need to request READ_PHONE_STATE permissions before using of this method.

Solutions on the web

via GitHub by reed-sap
, 1 year ago
Admin ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver} did not specify uses-policy for: disable-keyguard-features
via Stack Overflow by Virat Puar
, 2 years ago
Sending SMS message: uid 10058 does not have android.permission.SEND_SMS.
via xda-developers.com by Unknown author, 1 year ago
Caller uid=2000 is not privileged to communicate w th user=-2
via GitHub by inktomi
, 6 months ago
Permission Denial: opening provider com.nadmm.airports.providers.AirportsProvider from ProcessRecord{41a6f890 4710:com.google.android.googlequicksearchbox/u0a10059} (pid=4710, uid=10059) that is not exported from uid 10078
via Stack Overflow by Enovyne
, 2 years ago
Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.deosfriend.apptest/com.example.deosfriend.design.MainActivity } from null (pid=29451, uid=2000) not exported from uid 10111
java.lang.SecurityException: Admin ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver} did not specify uses-policy for: disable-keyguard-features
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)

Users with the same issue

23 times, 1 year ago
42 times, 1 year ago
2 times, 5 months ago
8 times, 1 year ago
2 times, 1 year ago
249 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.