[AAPM] Add advanced protection dialog according to API feedback
This change also updates ActionDisabledByAdminDialog because the AdvancedProtectionManager#createSupportIntent method is now static. Bug: 378968840 Bug: 352420507 Test: ActionDisabledByAdminDialogTest Test: WepNetworksPreferenceControllerTest Test: manual Flag: android.security.aapm_api Change-Id: I8443742aadead45091fee757cbdf715d28eee495
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user