diff --git a/src/com/android/settings/network/ApnEditor.java b/src/com/android/settings/network/ApnEditor.java
index 455a4da..fa0d6a4 100644
--- a/src/com/android/settings/network/ApnEditor.java
+++ b/src/com/android/settings/network/ApnEditor.java
@@ -27,7 +27,6 @@
 import android.os.PersistableBundle;
 import android.provider.Telephony;
 import android.telephony.CarrierConfigManager;
-import android.telephony.ServiceState;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
@@ -1025,7 +1024,7 @@
                 bearerBitmask = 0;
                 break;
             } else {
-                bearerBitmask |= ServiceState.getBitmaskForTech(Integer.parseInt(bearer));
+                bearerBitmask |= getBitmaskForTech(Integer.parseInt(bearer));
             }
         }
         callUpdate = setIntValueAndCheckIfDiff(values,
@@ -1037,7 +1036,7 @@
         int bearerVal;
         if (bearerBitmask == 0 || mBearerInitialVal == 0) {
             bearerVal = 0;
-        } else if (ServiceState.bitmaskHasTech(bearerBitmask, mBearerInitialVal)) {
+        } else if (bitmaskHasTech(bearerBitmask, mBearerInitialVal)) {
             bearerVal = mBearerInitialVal;
         } else {
             // bearer field was being used but bitmask has changed now and does not include the
@@ -1329,4 +1328,20 @@
             return (String) mData[index];
         }
     }
+
+    private static int getBitmaskForTech(int radioTech) {
+        if (radioTech >= 1) {
+            return (1 << (radioTech - 1));
+        }
+        return 0;
+    }
+
+    private static boolean bitmaskHasTech(int bearerBitmask, int radioTech) {
+        if (bearerBitmask == 0) {
+            return true;
+        } else if (radioTech >= 1) {
+            return ((bearerBitmask & (1 << (radioTech - 1))) != 0);
+        }
+        return false;
+    }
 }
