diff --git a/res/values/strings.xml b/res/values/strings.xml
index 13f28439a42..a2302d84f8b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2085,7 +2085,9 @@
When Bluetooth is turned on, your device can communicate with other nearby Bluetooth devices.
- When Bluetooth is turned on, your device can communicate with other nearby Bluetooth devices.\n\nTo improve device experience, apps and services can still scan for nearby devices at any time, even when Bluetooth is off. This can be used, for example, to improve location-based features and services. You can change this in Bluetooth scanning settings.
+ When Bluetooth is turned on, your device can communicate with other nearby Bluetooth devices.\n\nTo improve device experience, apps and services can still scan for nearby devices at any time, even when Bluetooth is off. This can be used, for example, to improve location-based features and services. You can change this in Bluetooth scanning settings.
+
+ Change
@@ -2096,6 +2098,7 @@
Couldn\'t connect. Try again.
+
Device details
diff --git a/src/com/android/settings/bluetooth/BluetoothSwitchPreferenceController.java b/src/com/android/settings/bluetooth/BluetoothSwitchPreferenceController.java
index ca27299279f..5c3af9b5cf5 100644
--- a/src/com/android/settings/bluetooth/BluetoothSwitchPreferenceController.java
+++ b/src/com/android/settings/bluetooth/BluetoothSwitchPreferenceController.java
@@ -25,7 +25,6 @@ import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.location.BluetoothScanningFragment;
import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.utils.AnnotationSpan;
import com.android.settings.widget.SwitchWidgetController;
import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnStart;
@@ -121,15 +120,14 @@ public class BluetoothSwitchPreferenceController
}
@VisibleForTesting void updateText(boolean isChecked) {
- if (!isChecked
- && Utils.isBluetoothScanningEnabled(mContext)) {
- AnnotationSpan.LinkInfo info = new AnnotationSpan.LinkInfo(
- AnnotationSpan.LinkInfo.DEFAULT_ANNOTATION, this);
- CharSequence text = AnnotationSpan.linkify(
- mContext.getText(R.string.bluetooth_scanning_on_info_message), info);
- mFooterPreference.setTitle(text);
+ if (!isChecked && Utils.isBluetoothScanningEnabled(mContext)) {
+ mFooterPreference.setTitle(R.string.bluetooth_scanning_on_info_message);
+ mFooterPreference.setLearnMoreText(mContext.getString(R.string.bluetooth_scan_change));
+ mFooterPreference.setLearnMoreAction(v -> onClick(v));
} else {
mFooterPreference.setTitle(R.string.bluetooth_empty_list_bluetooth_off);
+ mFooterPreference.setLearnMoreText("");
+ mFooterPreference.setLearnMoreAction(null);
}
}
}