From ebbfce0bf1cebf74525c9cceeeedcd1fe6012b60 Mon Sep 17 00:00:00 2001 From: Jack He Date: Mon, 3 Apr 2017 18:06:06 -0700 Subject: [PATCH] Fix a crash when an app requests Bluetooth to be discoverable * When an app requests Bluetooth to be discoverable with a timeout and a non null EXTRA_PACKAGE_NAME, Settings app should put in the correct timeout values in the dialog string Bug: 36870303 Test: make, try making Bluetooth discoverable via ACTION_REQUEST_DISCOVERABLE intent Change-Id: I0cebc2f20371c9de5f28feb26425422c0777aa45 --- .../android/settings/bluetooth/RequestPermissionActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/bluetooth/RequestPermissionActivity.java b/src/com/android/settings/bluetooth/RequestPermissionActivity.java index 20788c955e2..d2e2060291f 100644 --- a/src/com/android/settings/bluetooth/RequestPermissionActivity.java +++ b/src/com/android/settings/bluetooth/RequestPermissionActivity.java @@ -180,8 +180,8 @@ public class RequestPermissionActivity extends Activity implements builder.setMessage(message); } else { CharSequence message = mAppLabel != null - ? getString(R.string.bluetooth_ask_discovery, mAppLabel) - : getString(R.string.bluetooth_ask_discovery_no_name); + ? getString(R.string.bluetooth_ask_discovery, mAppLabel, mTimeout) + : getString(R.string.bluetooth_ask_discovery_no_name, mTimeout); builder.setMessage(message); } builder.setPositiveButton(getString(R.string.allow), this);