diff --git a/res/layout/bluetooth_discoverable.xml b/res/layout/bluetooth_discoverable.xml
deleted file mode 100644
index b3ddbb9f570..00000000000
--- a/res/layout/bluetooth_discoverable.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 42ae4f076aa..e39b9eb028c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -23,6 +23,12 @@
Create
+
+ Allow
+
+
+ Deny
+
Unknown
@@ -216,8 +222,6 @@
Bluetooth
-
- DiscoverableVisible to all nearby Bluetooth devices (%1$s)
@@ -226,12 +230,8 @@
Not visible to other Bluetooth devicesOnly visible to paired devices
-
- Make device discoverableVisibility timeout
-
- Set how long device will be discoverableLock voice dialing
@@ -303,29 +303,26 @@
Bluetooth device chooser
-
- "Bluetooth permission request"
-
- "An app wants to turn on Bluetooth. Allow?"
+ An app wants to turn on Bluetooth.
- "An app on your tablet wants to make your tablet discoverable by other Bluetooth devices for %1$d seconds. Allow?"
+ An app wants to make your tablet visible to other Bluetooth devices for %1$d seconds.
- "An app on your phone wants to make your phone discoverable by other Bluetooth devices for %1$d seconds. Allow?"
+ An app wants to make your phone visible to other Bluetooth devices for %1$d seconds.
- "An app on your tablet wants to make your tablet \u201calways discoverable\u201d by other Bluetooth devices. Allow?"
- "An app on your phone wants to make your phone \u201calways discoverable\u201d by other Bluetooth devices. Allow?"
+ An app wants to make your tablet visible to other Bluetooth devices. You can change this later in Bluetooth settings.
+ An app wants to make your phone visible to other Bluetooth devices. You can change this later in Bluetooth settings.
- "An app on your tablet wants to turn on Bluetooth and make your tablet discoverable by other devices for %1$d seconds. Allow?"
+ An app wants to turn on Bluetooth and make your tablet visible to other devices for %1$d seconds.
- "An app on your phone wants to turn on Bluetooth and make your phone discoverable by other devices for %1$d seconds. Allow?"
+ An app wants to turn on Bluetooth and make your phone visible to other devices for %1$d seconds.
- "An app on your tablet wants to turn on Bluetooth and make your tablet discoverable by other devices. Allow?"
- "An app on your phone wants to turn on Bluetooth and make your phone discoverable by other devices. Allow?"
+ An app wants to turn on Bluetooth and make your tablet visible to other devices. You can change this later in Bluetooth settings.
+ An app wants to turn on Bluetooth and make your phone visible to other devices. You can change this later in Bluetooth settings."Turning Bluetooth on\u2026"
diff --git a/src/com/android/settings/bluetooth/RequestPermissionActivity.java b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
index 08c10fba810..9f266a55c88 100644
--- a/src/com/android/settings/bluetooth/RequestPermissionActivity.java
+++ b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
@@ -149,8 +149,6 @@ public class RequestPermissionActivity extends Activity implements
private void createDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setIcon(android.R.drawable.ic_dialog_info);
- builder.setTitle(getString(R.string.bluetooth_permission_request));
if (mNeededToEnableBluetooth) {
// RequestPermissionHelperActivity has gotten confirmation from user
@@ -167,8 +165,8 @@ public class RequestPermissionActivity extends Activity implements
builder.setMessage(
getString(R.string.bluetooth_ask_discovery, mTimeout));
}
- builder.setPositiveButton(getString(R.string.yes), this);
- builder.setNegativeButton(getString(R.string.no), this);
+ builder.setPositiveButton(getString(R.string.allow), this);
+ builder.setNegativeButton(getString(R.string.deny), this);
}
mDialog = builder.create();
diff --git a/src/com/android/settings/bluetooth/RequestPermissionHelperActivity.java b/src/com/android/settings/bluetooth/RequestPermissionHelperActivity.java
index 5c4b828c11b..f108513595e 100644
--- a/src/com/android/settings/bluetooth/RequestPermissionHelperActivity.java
+++ b/src/com/android/settings/bluetooth/RequestPermissionHelperActivity.java
@@ -72,26 +72,20 @@ public class RequestPermissionHelperActivity extends AlertActivity implements
void createDialog() {
final AlertController.AlertParams p = mAlertParams;
- p.mIconId = android.R.drawable.ic_dialog_info;
- p.mTitle = getString(R.string.bluetooth_permission_request);
-
- View view = getLayoutInflater().inflate(R.layout.bluetooth_discoverable, null);
- p.mView = view;
- TextView tv = (TextView) view.findViewById(R.id.message);
if (mEnableOnly) {
- tv.setText(getString(R.string.bluetooth_ask_enablement));
+ p.mMessage = getString(R.string.bluetooth_ask_enablement);
} else {
if (mTimeout == BluetoothDiscoverableEnabler.DISCOVERABLE_TIMEOUT_NEVER) {
- tv.setText(getString(R.string.bluetooth_ask_enablement_and_lasting_discovery));
+ p.mMessage = getString(R.string.bluetooth_ask_enablement_and_lasting_discovery);
} else {
- tv.setText(getString(R.string.bluetooth_ask_enablement_and_discovery, mTimeout));
+ p.mMessage = getString(R.string.bluetooth_ask_enablement_and_discovery, mTimeout);
}
}
- p.mPositiveButtonText = getString(R.string.yes);
+ p.mPositiveButtonText = getString(R.string.allow);
p.mPositiveButtonListener = this;
- p.mNegativeButtonText = getString(R.string.no);
+ p.mNegativeButtonText = getString(R.string.deny);
p.mNegativeButtonListener = this;
setupAlert();
diff --git a/tests/res/layout/bluetooth_request_permission_test.xml b/tests/res/layout/bluetooth_request_permission_test.xml
index 0a5aec0dc7f..b62db197ce6 100644
--- a/tests/res/layout/bluetooth_request_permission_test.xml
+++ b/tests/res/layout/bluetooth_request_permission_test.xml
@@ -32,19 +32,19 @@
style="@android:style/ButtonBar">
diff --git a/tests/src/com/android/settings/tests/BluetoothRequestPermissionTest.java b/tests/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
index 8064e3a4989..a2cdafe8aa4 100644
--- a/tests/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
+++ b/tests/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
@@ -36,6 +36,9 @@ public class BluetoothRequestPermissionTest extends Activity {
BluetoothAdapter mAdapter;
private ArrayAdapter mMsgAdapter;
+ // Discoverable button alternates between 20 second timeout and no timeout.
+ private boolean mDiscoveryWithTimeout = true;
+
private class BtOnClickListener implements OnClickListener {
final boolean mEnableOnly; // enable or enable + discoverable
@@ -103,7 +106,10 @@ public class BluetoothRequestPermissionTest extends Activity {
} else {
addMsg("Starting activity to enable bt + discovery");
i.setAction(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
- i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 20);
+ // Discoverability duration toggles between 20 seconds and no timeout.
+ int timeout = (mDiscoveryWithTimeout ? 20 : 0);
+ i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, timeout);
+ mDiscoveryWithTimeout = !mDiscoveryWithTimeout;
}
startActivityForResult(i, 1);
}