Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8117,6 +8117,7 @@ package android.app.admin { method public boolean isLogoutEnabled(); method public boolean isManagedProfile(@NonNull android.content.ComponentName); method public boolean isMasterVolumeMuted(@NonNull android.content.ComponentName); method @FlaggedApi("android.app.admin.flags.is_mte_policy_enforced") public static boolean isMtePolicyEnforced(); method public boolean isNetworkLoggingEnabled(@Nullable android.content.ComponentName); method public boolean isOrganizationOwnedDeviceWithManagedProfile(); method public boolean isOverrideApnEnabled(@NonNull android.content.ComponentName); core/java/android/app/admin/DevicePolicyManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import static android.Manifest.permission.SET_TIME_ZONE; import static android.app.admin.flags.Flags.FLAG_ESIM_MANAGEMENT_ENABLED; import static android.app.admin.flags.Flags.FLAG_DEVICE_POLICY_SIZE_TRACKING_ENABLED; import static android.app.admin.flags.Flags.onboardingBugreportV2Enabled; import static android.app.admin.flags.Flags.FLAG_IS_MTE_POLICY_ENFORCED; import static android.content.Intent.LOCAL_FLAG_FROM_SYSTEM; import static android.net.NetworkCapabilities.NET_ENTERPRISE_ID_1; import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE; Loading Loading @@ -153,6 +154,7 @@ import com.android.internal.os.BackgroundThread; import com.android.internal.util.ArrayUtils; import com.android.internal.util.Preconditions; import com.android.org.conscrypt.TrustedCertificateStore; import com.android.internal.os.Zygote; import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; Loading Loading @@ -4117,6 +4119,19 @@ public class DevicePolicyManager { return MTE_NOT_CONTROLLED_BY_POLICY; } /** * Get the current MTE state of the device. * * <a href="https://source.android.com/docs/security/test/memory-safety/arm-mte"> * Learn more about MTE</a> * * @return whether MTE is currently enabled on the device. */ @FlaggedApi(FLAG_IS_MTE_POLICY_ENFORCED) public static boolean isMtePolicyEnforced() { return Zygote.nativeSupportsMemoryTagging(); } /** Indicates that content protection is not controlled by policy, allowing user to choose. */ @FlaggedApi(android.view.contentprotection.flags.Flags.FLAG_MANAGE_DEVICE_POLICY_ENABLED) public static final int CONTENT_PROTECTION_NOT_CONTROLLED_BY_POLICY = 0; Loading core/java/android/app/admin/flags/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -139,3 +139,10 @@ flag { description: "Add Headless DO support." bug: "289515470" } flag { name: "is_mte_policy_enforced" namespace: "enterprise" description: "Allow to query whether MTE is enabled or not to check for compliance for enterprise policy" bug: "322777918" } Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8117,6 +8117,7 @@ package android.app.admin { method public boolean isLogoutEnabled(); method public boolean isManagedProfile(@NonNull android.content.ComponentName); method public boolean isMasterVolumeMuted(@NonNull android.content.ComponentName); method @FlaggedApi("android.app.admin.flags.is_mte_policy_enforced") public static boolean isMtePolicyEnforced(); method public boolean isNetworkLoggingEnabled(@Nullable android.content.ComponentName); method public boolean isOrganizationOwnedDeviceWithManagedProfile(); method public boolean isOverrideApnEnabled(@NonNull android.content.ComponentName);
core/java/android/app/admin/DevicePolicyManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import static android.Manifest.permission.SET_TIME_ZONE; import static android.app.admin.flags.Flags.FLAG_ESIM_MANAGEMENT_ENABLED; import static android.app.admin.flags.Flags.FLAG_DEVICE_POLICY_SIZE_TRACKING_ENABLED; import static android.app.admin.flags.Flags.onboardingBugreportV2Enabled; import static android.app.admin.flags.Flags.FLAG_IS_MTE_POLICY_ENFORCED; import static android.content.Intent.LOCAL_FLAG_FROM_SYSTEM; import static android.net.NetworkCapabilities.NET_ENTERPRISE_ID_1; import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE; Loading Loading @@ -153,6 +154,7 @@ import com.android.internal.os.BackgroundThread; import com.android.internal.util.ArrayUtils; import com.android.internal.util.Preconditions; import com.android.org.conscrypt.TrustedCertificateStore; import com.android.internal.os.Zygote; import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; Loading Loading @@ -4117,6 +4119,19 @@ public class DevicePolicyManager { return MTE_NOT_CONTROLLED_BY_POLICY; } /** * Get the current MTE state of the device. * * <a href="https://source.android.com/docs/security/test/memory-safety/arm-mte"> * Learn more about MTE</a> * * @return whether MTE is currently enabled on the device. */ @FlaggedApi(FLAG_IS_MTE_POLICY_ENFORCED) public static boolean isMtePolicyEnforced() { return Zygote.nativeSupportsMemoryTagging(); } /** Indicates that content protection is not controlled by policy, allowing user to choose. */ @FlaggedApi(android.view.contentprotection.flags.Flags.FLAG_MANAGE_DEVICE_POLICY_ENABLED) public static final int CONTENT_PROTECTION_NOT_CONTROLLED_BY_POLICY = 0; Loading
core/java/android/app/admin/flags/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -139,3 +139,10 @@ flag { description: "Add Headless DO support." bug: "289515470" } flag { name: "is_mte_policy_enforced" namespace: "enterprise" description: "Allow to query whether MTE is enabled or not to check for compliance for enterprise policy" bug: "322777918" }