[android-developers] DevicePolicyMgr resetPassword requires android.permission.WRITE_SECURE_SETTINGS on 3.0?
When calling the DevicePolicyManager.resetPassword(newPassword, 0), on
the 3.0 emulator I get a security exception thrown...
04-14 14:02:46.580 E/AndroidRuntime( 6223):
java.lang.SecurityException: Permission Denial: writing
com.android.providers.settings.SettingsProvider uri content://settings/secure
from pid=6223, uid=10054 requires android.permission.WRITE_SETTINGS
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
android.os.Parcel.readException(Parcel.java:1322)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
android.os.Parcel.readException(Parcel.java:1276)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
android.app.admin.IDevicePolicyManager$Stub
$Proxy.resetPassword(IDevicePolicyManager.java:1289)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
android.app.admin.DevicePolicyManager.resetPassword(DevicePolicyManager.java:
917)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
com.example.android.apis.app.DeviceAdminSample$Controller
$4.onClick(DeviceAdminSample.java:693)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at
android.view.View.performClick(View.java:3100)
04-14 14:02:46.580 E/AndroidRuntime( 6223): at android.view.View
$PerformClick.run(View.java:11644)
The Device Admin is active for the calling app and its has resuested
the <reset-password /> permission.
This example works fine on 2.2 devices and emulators.
What changed?
Why does the calling app need an extra permission when its already for
an active device administrator which has been granted the appropriate
permission.
Is the resetPassword supposed to be done differently on 3.0?
Thanks for your help
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home