am 377b8df3: Merge "Checks if the right user has a restriction" into lmp-dev

* commit '377b8df3ed89f2e61b6755aee8136754a2edf9c5':
  Checks if the right user has a restriction
This commit is contained in:
Alexandra Gherghina
2014-07-24 12:27:14 +00:00
committed by Android Git Automerger

View File

@@ -239,7 +239,7 @@ public class AccountSyncSettings extends AccountPreferenceBase {
getString(R.string.sync_menu_sync_cancel))
.setIcon(com.android.internal.R.drawable.ic_menu_close_clear_cancel);
final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
if (!um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS)) {
if (!um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS, mUserHandle)) {
MenuItem removeAccount = menu.add(0, MENU_REMOVE_ACCOUNT_ID, 0,
getString(R.string.remove_account_label))
.setIcon(R.drawable.ic_menu_delete_holo_dark);