Use current user for lockdown setting

Test: Manually verified lockdown works in secondary users
Change-Id: Id77d0680d8e387553ebebc1c6c770c51770afa2e
Fixes: 77476108
This commit is contained in:
Chad Brubaker
2018-05-01 14:59:33 -07:00
parent 7f556daa41
commit 02cd6cfdec

View File

@@ -344,8 +344,8 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
} else if (GLOBAL_ACTION_KEY_SETTINGS.equals(actionKey)) {
mItems.add(getSettingsAction());
} else if (GLOBAL_ACTION_KEY_LOCKDOWN.equals(actionKey)) {
if (Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.LOCKDOWN_IN_POWER_MENU, 0) != 0
if (Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.LOCKDOWN_IN_POWER_MENU, 0, getCurrentUser().id) != 0
&& shouldDisplayLockdown()) {
mItems.add(getLockdownAction());
mHasLockdownButton = true;