Undo making Image icon's visibility to GONE in Action Not Allowed Dialog for a financed device

Bug: 182839352
Test: Used a test device that is registered via ZT
Test: m RunSettingsRoboTests ROBOTEST_FILTER=ActionDisabledByAdminDialogHelperTest

Change-Id: I42bb9ce9a624fa20cd755af2d323b4c4f94048f7
This commit is contained in:
Salud Lemus
2021-03-15 23:06:52 +00:00
parent 50527b1f63
commit 0e0247e5e4
2 changed files with 3 additions and 30 deletions

View File

@@ -141,17 +141,14 @@ public class ActionDisabledByAdminDialogHelper {
}
private boolean isNotCurrentUserOrProfile(ComponentName admin, int userId) {
return !isFinancedDevice()
&& (!RestrictedLockUtilsInternal.isAdminInCurrentUserOrProfile(mActivity, admin)
|| !RestrictedLockUtils.isCurrentUserOrProfile(mActivity, userId));
return !RestrictedLockUtilsInternal.isAdminInCurrentUserOrProfile(mActivity, admin)
|| !RestrictedLockUtils.isCurrentUserOrProfile(mActivity, userId);
}
@VisibleForTesting
void setAdminSupportIcon(View root, ComponentName admin, int userId) {
ImageView supportIconView = root.requireViewById(R.id.admin_support_icon);
if (isFinancedDevice()) {
supportIconView.setVisibility(View.GONE);
} else if (isNotCurrentUserOrProfile(admin, userId)) {
if (isNotCurrentUserOrProfile(admin, userId)) {
supportIconView.setImageDrawable(
mActivity.getDrawable(com.android.internal.R.drawable.ic_info));