Revert "Revert "[AAPM] Add advanced protection dialog according ..."

Revert submission 31078830-revert-30767017-aapm-dialog-api-feedback-TBLFTCNTUN

Reason for revert: Addressed failing test

Reverted changes: /q/submissionid:31078830-revert-30767017-aapm-dialog-api-feedback-TBLFTCNTUN

Change-Id: I3321b4f5baaca9dd270350b9201998ffe0d40473
This commit is contained in:
Hani Kazmi
2025-01-02 05:07:50 -08:00
committed by Android (Google) Code Review
parent 2574343b43
commit 8e28132ba2
7 changed files with 100 additions and 22 deletions

View File

@@ -109,12 +109,9 @@ public class ActionDisabledByAdminDialog extends Activity
}
if (enforcingAdmin.getAuthority() instanceof UnknownAuthority authority
&& ADVANCED_PROTECTION_SYSTEM_ENTITY.equals(authority.getName())) {
AdvancedProtectionManager apm = getSystemService(AdvancedProtectionManager.class);
if (apm == null) {
return;
}
Intent apmSupportIntent = apm.createSupportIntentForPolicyIdentifierOrRestriction(
restriction, /* type */ null);
Intent apmSupportIntent = AdvancedProtectionManager
.createSupportIntentForPolicyIdentifierOrRestriction(restriction,
AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_UNKNOWN);
startActivityAsUser(apmSupportIntent, UserHandle.of(userId));
finish();
} else {