diff --git a/res/values/strings.xml b/res/values/strings.xml
index 16753148eb1..d6d780f71d0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -12163,4 +12163,25 @@
Don\u2019t allow
+
+
+ SIM card access request
+
+ A device wants to access your SIM card. Tap for details.
+
+ Allow access to SIM card?
+
+ A Bluetooth device, %1$s, wants to access data on your SIM card. This includes your contacts.\n\nWhile connected, %2$s will receive all calls made to %3$s.
+
+ Bluetooth device available
+
+ A device wants to connect. Tap for details.
+
+ Connect to Bluetooth device?
+
+ %1$s wants to connect to this phone.\n\nYou haven\u2019t connected to %2$s before.
+
+ Don\u2019t connect
+
+ Connect
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
index 8794b08129b..211bcc6f4b4 100644
--- a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
@@ -25,6 +25,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
+import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@@ -94,13 +95,13 @@ public class BluetoothPermissionActivity extends AlertActivity implements
if(DEBUG) Log.i(TAG, "onCreate() Request type: " + mRequestType);
if (mRequestType == BluetoothDevice.REQUEST_TYPE_PROFILE_CONNECTION) {
- showDialog(getString(R.string.bluetooth_connection_permission_request), mRequestType);
+ showDialog(getString(R.string.bluetooth_connect_access_dialog_title), mRequestType);
} else if (mRequestType == BluetoothDevice.REQUEST_TYPE_PHONEBOOK_ACCESS) {
showDialog(getString(R.string.bluetooth_phonebook_access_dialog_title), mRequestType);
} else if (mRequestType == BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS) {
showDialog(getString(R.string.bluetooth_message_access_dialog_title), mRequestType);
} else if (mRequestType == BluetoothDevice.REQUEST_TYPE_SIM_ACCESS) {
- showDialog(getString(R.string.bluetooth_sap_request), mRequestType);
+ showDialog(getString(R.string.bluetooth_sim_card_access_dialog_title), mRequestType);
}
else {
Log.e(TAG, "Error: bad request type: " + mRequestType);
@@ -133,9 +134,14 @@ public class BluetoothPermissionActivity extends AlertActivity implements
p.mView = createSapDialogView();
break;
}
- p.mPositiveButtonText = getString(R.string.allow);
+ p.mPositiveButtonText = getString(
+ requestType == BluetoothDevice.REQUEST_TYPE_PROFILE_CONNECTION
+ ? R.string.bluetooth_connect_access_dialog_positive : R.string.allow);
p.mPositiveButtonListener = this;
- p.mNegativeButtonText = getString(R.string.request_manage_bluetooth_permission_dont_allow);
+ p.mNegativeButtonText = getString(
+ requestType == BluetoothDevice.REQUEST_TYPE_PROFILE_CONNECTION
+ ? R.string.bluetooth_connect_access_dialog_negative
+ : R.string.request_manage_bluetooth_permission_dont_allow);
p.mNegativeButtonListener = this;
mOkButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE);
setupAlert();
@@ -156,8 +162,8 @@ public class BluetoothPermissionActivity extends AlertActivity implements
String mRemoteName = Utils.createRemoteName(this, mDevice);
mView = getLayoutInflater().inflate(R.layout.bluetooth_access, null);
messageView = (TextView)mView.findViewById(R.id.message);
- messageView.setText(getString(R.string.bluetooth_connection_dialog_text,
- mRemoteName));
+ messageView.setText(getString(R.string.bluetooth_connect_access_dialog_content,
+ mRemoteName, mRemoteName));
return mView;
}
@@ -181,10 +187,11 @@ public class BluetoothPermissionActivity extends AlertActivity implements
private View createSapDialogView() {
String mRemoteName = Utils.createRemoteName(this, mDevice);
+ TelephonyManager tm = getSystemService(TelephonyManager.class);
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));
+ messageView.setText(getString(R.string.bluetooth_sim_card_access_dialog_content,
+ mRemoteName, mRemoteName, tm.getLine1Number()));
return mView;
}
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
index de957a7eb91..791ade425be 100644
--- a/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
@@ -144,13 +144,17 @@ public final class BluetoothPermissionRequest extends BroadcastReceiver {
R.string.bluetooth_message_access_notification_content);
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,
+ title = context.getString(
+ R.string.bluetooth_sim_card_access_notification_title);
+ message = context.getString(
+ R.string.bluetooth_sim_card_access_notification_content,
deviceAlias, deviceAlias);
break;
default:
- title = context.getString(R.string.bluetooth_connection_permission_request);
- message = context.getString(R.string.bluetooth_connection_dialog_text,
+ title = context.getString(
+ R.string.bluetooth_connect_access_notification_title);
+ message = context.getString(
+ R.string.bluetooth_connect_access_notification_content,
deviceAlias, deviceAlias);
break;
}