diff --git a/res/values/strings.xml b/res/values/strings.xml
index a4066c1..ebef5de 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -367,6 +367,12 @@
     <!-- Bluetooth message permission Alert Activity text [CHAR LIMIT=none] -->
     <string name="bluetooth_map_acceptance_dialog_text">%1$s wants to access your messages. Give access to %2$s?</string>
 
+    <!-- Activity label of BluetoothMessagePermissionActivity for SIM access profile. Also used as Strings in the permission dialog [CHAR LIMIT=none] -->
+    <string name="bluetooth_sap_request">"SIM access request"</string>
+
+    <!-- Bluetooth SIM access permission Alert Activity text [CHAR LIMIT=none] -->
+    <string name="bluetooth_sap_acceptance_dialog_text"><xliff:g id="device_name">%1$s</xliff:g> wants to access your SIM card. Granting access to the SIM card will disable data connectivity on your device for the duration of the connection. Give access to <xliff:g id="device_name">%2$s?</xliff:g></string>
+
     <!-- Date & time settings screen title -->
     <string name="date_and_time">Date &amp; time</string>
     <!-- The title of the activity to pick a time zone. -->
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
old mode 100755
new mode 100644
index 7a1e69d..2267555
--- a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
@@ -101,6 +101,8 @@
             showDialog(getString(R.string.bluetooth_phonebook_request), mRequestType);
         } else if (mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
             showDialog(getString(R.string.bluetooth_map_request), mRequestType);
+        } else if (mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
+            showDialog(getString(R.string.bluetooth_sap_request), mRequestType);
         }
         else {
             Log.e(TAG, "Error: bad request type: " + mRequestType);
@@ -129,6 +131,9 @@
         case BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS:
             p.mView = createMapDialogView();
             break;
+        case BluetoothDevice.REQUEST_TYPE_SIM_ACCESS:
+            p.mView = createSapDialogView();
+            break;
         }
         p.mPositiveButtonText = getString(R.string.yes);
         p.mPositiveButtonListener = this;
@@ -183,6 +188,15 @@
         return mView;
     }
 
+    private View createSapDialogView() {
+        String mRemoteName = createRemoteName();
+        mView = getLayoutInflater().inflate(R.layout.bluetooth_access, null);
+        messageView = (TextView)mView.findViewById(R.id.message);
+        messageView.setText(getString(R.string.bluetooth_sap_acceptance_dialog_text,
+                mRemoteName, mRemoteName));
+        return mView;
+    }
+
     private void onPositive() {
         if (DEBUG) Log.d(TAG, "onPositive");
         sendReplyIntentToReceiver(true, true);
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
index b3a9571..372f9a5 100644
--- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
@@ -44,7 +44,7 @@
 
     private static final String NOTIFICATION_TAG_PBAP = "Phonebook Access" ;
     private static final String NOTIFICATION_TAG_MAP = "Message Access";
-
+    private static final String NOTIFICATION_TAG_SAP = "SIM Access";
 
     Context mContext;
     int mRequestType;
@@ -139,6 +139,11 @@
                         message = context.getString(R.string.bluetooth_map_acceptance_dialog_text,
                                 deviceName, deviceName);
                         break;
+                    case BluetoothDevice.REQUEST_TYPE_SIM_ACCESS:
+                        title = context.getString(R.string.bluetooth_sap_request);
+                        message = context.getString(R.string.bluetooth_sap_acceptance_dialog_text,
+                                deviceName, deviceName);
+                        break;
                     default:
                         title = context.getString(R.string.bluetooth_connection_permission_request);
                         message = context.getString(R.string.bluetooth_connection_dialog_text,
@@ -184,6 +189,8 @@
             return NOTIFICATION_TAG_PBAP;
         } else if(mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
             return NOTIFICATION_TAG_MAP;
+        } else if(mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
+            return NOTIFICATION_TAG_SAP;
         }
         return null;
     }
@@ -198,7 +205,8 @@
 
         // ignore if it is something else than phonebook/message settings it wants us to remember
         if (mRequestType != BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS
-                && mRequestType != BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
+                && mRequestType != BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS
+                && mRequestType != BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
             if (DEBUG) Log.d(TAG, "checkUserChoice(): Unknown RequestType " + mRequestType);
             return processed;
         }
@@ -242,6 +250,20 @@
             } else {
                 Log.e(TAG, "Bad messagePermission: " + messagePermission);
             }
+        } else if(mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
+            int simPermission = cachedDevice.getSimPermissionChoice();
+
+            if (simPermission == CachedBluetoothDevice.ACCESS_UNKNOWN) {
+                // Leave 'processed' as false.
+            } else if (simPermission == CachedBluetoothDevice.ACCESS_ALLOWED) {
+                sendReplyIntentToReceiver(true);
+                processed = true;
+            } else if (simPermission == CachedBluetoothDevice.ACCESS_REJECTED) {
+                sendReplyIntentToReceiver(false);
+                processed = true;
+            } else {
+                Log.e(TAG, "Bad simPermission: " + simPermission);
+            }
         }
         if (DEBUG) Log.d(TAG,"checkUserChoice(): returning " + processed);
         return processed;
