Device management info: Refer to current user, not primary user
The device management info page should show information about the current user's policies, not the primary user's. Bug: 32692748 Test: m RunSettingsRoboTests Change-Id: I5d8afa7fae1c0f3a4da78b085365882827e6721b
This commit is contained in:
@@ -142,7 +142,7 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlwaysOnVpnSetInPrimaryUser() {
|
||||
public boolean isAlwaysOnVpnSetInCurrentUser() {
|
||||
return VpnUtils.isAlwaysOnVpnSet(mCm, MY_USER_ID);
|
||||
}
|
||||
|
||||
@@ -159,12 +159,12 @@ public class EnterprisePrivacyFeatureProviderImpl implements EnterprisePrivacyFe
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumFailedPasswordsBeforeWipeInPrimaryUser() {
|
||||
final ComponentName deviceOwner = mDpm.getDeviceOwnerComponentOnAnyUser();
|
||||
if (deviceOwner == null) {
|
||||
public int getMaximumFailedPasswordsBeforeWipeInCurrentUser() {
|
||||
final ComponentName profileOwner = mDpm.getProfileOwnerAsUser(MY_USER_ID);
|
||||
if (profileOwner == null) {
|
||||
return 0;
|
||||
}
|
||||
return mDpm.getMaximumFailedPasswordsForWipe(deviceOwner, mDpm.getDeviceOwnerUserId());
|
||||
return mDpm.getMaximumFailedPasswordsForWipe(profileOwner, MY_USER_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user