Device Admin Settings changes for Device Owner

Disable the list entry for an active device owner, as it can't be deactivated.

Change-Id: I833561f91ae60dff8226f9118c9e3b012e5e194f
This commit is contained in:
Amith Yamasani
2013-03-25 15:38:48 -07:00
parent 8111e3d734
commit f3f7c1dfb7
2 changed files with 20 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ public class UserRestrictionsActivity extends Activity implements OnClickListene
if (userId == -1) {
mNewUser = true;
mUserInfo = um.createUser(name, UserInfo.FLAG_RESTRICTED);
um.setUserRestriction(UserManager.ALLOW_MODIFY_ACCOUNTS, false,
um.setUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, true,
new UserHandle(mUserInfo.id));
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),