From 3c33b6ea41e3f49b21cbee44738c244b160712ee Mon Sep 17 00:00:00 2001 From: Hugh Chen Date: Mon, 12 Oct 2020 16:42:01 +0800 Subject: [PATCH] Add string for text of bluetooth switch Bug: 153888620 Test: manually test Change-Id: I60a791190abf535162f7ed1b80fe265482515137 --- res/values/strings.xml | 5 +++++ .../settings/connecteddevice/BluetoothDashboardFragment.java | 1 + 2 files changed, 6 insertions(+) diff --git a/res/values/strings.xml b/res/values/strings.xml index f958e06cb13..dfaea8ede1e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -12266,4 +12266,9 @@ Bluetooth will turn on + + + On + + Off diff --git a/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java b/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java index 3e64de5a473..2f614522360 100644 --- a/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java +++ b/src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java @@ -83,6 +83,7 @@ public class BluetoothDashboardFragment extends DashboardFragment { SettingsActivity activity = (SettingsActivity) getActivity(); mSwitchBar = activity.getSwitchBar(); + mSwitchBar.setSwitchBarText(R.string.bluetooth_setting_on, R.string.bluetooth_setting_off); mController = new BluetoothSwitchPreferenceController(activity, new SwitchBarController(mSwitchBar), mFooterPreference); Lifecycle lifecycle = getSettingsLifecycle();