如何在Android 5.0中使用托管配置文件设置设备密码

时间:2015-02-09 09:13:20

标签: android android-5.0-lollipop device-admin

我正在使用android 5.0中的托管配置文件应用程序,同时尝试使用下面给出的代码设置密码。

manager.resetPassword("123456",DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY);

但是它会抛出像这样的异常引起:java.lang.SecurityException:您无法重置托管配置文件的密码。 是否有任何解决方法使用托管配置文件所有者设置密码。 提前谢谢。

1 个答案:

答案 0 :(得分:1)

  1. java.lang.SecurityException是因为托管配置文件所有者无法重置主用户的密码。
  2. 托管个人资料所有者可以设置密码质量,但不允许重置密码。