diff --git a/src/com/android/settings/network/apn/ApnEditPageProvider.kt b/src/com/android/settings/network/apn/ApnEditPageProvider.kt
index 52066a1..2600618 100644
--- a/src/com/android/settings/network/apn/ApnEditPageProvider.kt
+++ b/src/com/android/settings/network/apn/ApnEditPageProvider.kt
@@ -101,17 +101,19 @@
     RegularScaffold(
         title = if (apnDataInit.newApn) stringResource(id = R.string.apn_add) else stringResource(id = R.string.apn_edit),
         actions = {
-            IconButton(onClick = {
-                if (!apnData.validEnabled) apnData = apnData.copy(validEnabled = true)
-                val valid = validateAndSaveApnData(
-                    apnDataInit,
-                    apnData,
-                    context,
-                    uriInit,
-                    networkTypeSelectedOptionsState
-                )
-                if (valid) navController.navigateBack()
-            }) { Icon(imageVector = Icons.Outlined.Done, contentDescription = null) }
+            if (!apnData.customizedConfig.readOnlyApn) {
+                IconButton(onClick = {
+                    if (!apnData.validEnabled) apnData = apnData.copy(validEnabled = true)
+                    val valid = validateAndSaveApnData(
+                        apnDataInit,
+                        apnData,
+                        context,
+                        uriInit,
+                        networkTypeSelectedOptionsState
+                    )
+                    if (valid) navController.navigateBack()
+                }) { Icon(imageVector = Icons.Outlined.Done, contentDescription = null) }
+            }
         },
     ) {
         Column {
@@ -212,7 +214,9 @@
                 emptyVal = stringResource(R.string.network_type_unspecified),
                 enabled = apnData.networkTypeEnabled
             ) {}
-            if (!apnData.newApn) {
+            if (!apnData.newApn && !apnData.customizedConfig.readOnlyApn
+                && apnData.customizedConfig.isAddApnAllowed
+            ) {
                 Preference(
                     object : PreferenceModel {
                         override val title = stringResource(R.string.menu_delete)
