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

* commit '26e2f3acff6ffb814d0d839a96e0917f4ea5c8e1':
  Checks if the right user has a restriction
This commit is contained in:
Alexandra Gherghina
2014-07-24 23:41:23 +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);