Merge "Update links to Scanning Settings" into sc-dev

This commit is contained in:
Yu-Han Yang
2021-03-30 16:47:18 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 9 deletions

View File

@@ -1728,7 +1728,7 @@
<!-- Bluetooth settings. Text displayed when Bluetooth is off and device list is empty [CHAR LIMIT=50]--> <!-- Bluetooth settings. Text displayed when Bluetooth is off and device list is empty [CHAR LIMIT=50]-->
<string name="bluetooth_empty_list_bluetooth_off">When Bluetooth is turned on, your device can communicate with other nearby Bluetooth devices.</string> <string name="bluetooth_empty_list_bluetooth_off">When Bluetooth is turned on, your device can communicate with other nearby Bluetooth devices.</string>
<!-- Bluetooth settings. Text displayed when Bluetooth is off and bluetooth scanning is turned on [CHAR LIMIT=NONE] --> <!-- Bluetooth settings. Text displayed when Bluetooth is off and bluetooth scanning is turned on [CHAR LIMIT=NONE] -->
<string name="bluetooth_scanning_on_info_message">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 <annotation id="link">scanning settings</annotation>.</string> <string name="bluetooth_scanning_on_info_message">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 <annotation id="link">Bluetooth scanning settings</annotation>.</string>
<!-- Message to describe "BLE scan always available feature" when Bluetooth is off. The <!-- Message to describe "BLE scan always available feature" when Bluetooth is off. The
place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated. They mark a link to bring place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated. They mark a link to bring
the user to "scanning settings" screen. --> the user to "scanning settings" screen. -->
@@ -1981,13 +1981,13 @@
<!-- Message to describe "Wi-Fi scan always available feature" when Wi-Fi is off and Wi-Fi <!-- Message to describe "Wi-Fi scan always available feature" when Wi-Fi is off and Wi-Fi
scanning is on. The place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated. They scanning is on. The place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated. They
mark a link to bring the user to "scanning settings" screen. --> mark a link to bring the user to "scanning settings" screen. -->
<string name="wifi_scan_notify_text">To improve location accuracy, apps and services can still scan for Wi\u2011Fi networks at any time, even when Wi\u2011Fi is off. This can be used, for example, to improve location-based features and services. You can change this in <xliff:g id="link_begin">LINK_BEGIN</xliff:g>scanning settings<xliff:g id="link_end">LINK_END</xliff:g>.</string> <string name="wifi_scan_notify_text">To improve location accuracy, apps and services can still scan for Wi\u2011Fi networks at any time, even when Wi\u2011Fi is off. This can be used, for example, to improve location-based features and services. You can change this in <xliff:g id="link_begin">LINK_BEGIN</xliff:g>Wi\u2011Fi scanning settings<xliff:g id="link_end">LINK_END</xliff:g>.</string>
<!-- Message to describe "Wi-Fi scan always available feature" when Wi-Fi is off and Wi-Fi <!-- Message to describe "Wi-Fi scan always available feature" when Wi-Fi is off and Wi-Fi
scanning is also off. The place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated. scanning is also off. The place-holders "LINK_BEGIN" and "LINK_END" must NOT be translated.
They mark a link to bring the user to "scanning settings" screen. --> They mark a link to bring the user to "scanning settings" screen. -->
<string name="wifi_scan_notify_text_scanning_off">To improve location accuracy, <string name="wifi_scan_notify_text_scanning_off">To improve location accuracy,
turn on Wi-Fi scanning in turn on Wi-Fi scanning in
<xliff:g id="link_begin">LINK_BEGIN</xliff:g>scanning <xliff:g id="link_begin">LINK_BEGIN</xliff:g>Wi\u2011Fi scanning
settings<xliff:g id="link_end">LINK_END</xliff:g>.</string> settings<xliff:g id="link_end">LINK_END</xliff:g>.</string>
<!-- Wifi scan always mode checkbox text --> <!-- Wifi scan always mode checkbox text -->
<string name="wifi_scan_notify_remember_choice">Don\u2019t show again</string> <string name="wifi_scan_notify_remember_choice">Don\u2019t show again</string>

View File

@@ -23,7 +23,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.settings.R; import com.android.settings.R;
import com.android.settings.core.SubSettingLauncher; import com.android.settings.core.SubSettingLauncher;
import com.android.settings.location.LocationServices; import com.android.settings.location.BluetoothScanningFragment;
import com.android.settings.overlay.FeatureFactory; import com.android.settings.overlay.FeatureFactory;
import com.android.settings.utils.AnnotationSpan; import com.android.settings.utils.AnnotationSpan;
import com.android.settings.widget.SwitchWidgetController; import com.android.settings.widget.SwitchWidgetController;
@@ -100,7 +100,7 @@ public class BluetoothSwitchPreferenceController
public void onClick(View v) { public void onClick(View v) {
// send users to scanning settings if they click on the link in the summary text // send users to scanning settings if they click on the link in the summary text
new SubSettingLauncher(mContext) new SubSettingLauncher(mContext)
.setDestination(LocationServices.class.getName()) .setDestination(BluetoothScanningFragment.class.getName())
.setSourceMetricsCategory(SettingsEnums.BLUETOOTH_FRAGMENT) .setSourceMetricsCategory(SettingsEnums.BLUETOOTH_FRAGMENT)
.launch(); .launch();
} }
@@ -117,4 +117,4 @@ public class BluetoothSwitchPreferenceController
mFooterPreference.setTitle(R.string.bluetooth_empty_list_bluetooth_off); mFooterPreference.setTitle(R.string.bluetooth_empty_list_bluetooth_off);
} }
} }
} }

View File

@@ -63,7 +63,7 @@ import com.android.settings.core.FeatureFlags;
import com.android.settings.core.SubSettingLauncher; import com.android.settings.core.SubSettingLauncher;
import com.android.settings.datausage.DataUsagePreference; import com.android.settings.datausage.DataUsagePreference;
import com.android.settings.datausage.DataUsageUtils; import com.android.settings.datausage.DataUsageUtils;
import com.android.settings.location.LocationServices; import com.android.settings.location.WifiScanningFragment;
import com.android.settings.overlay.FeatureFactory; import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.BaseSearchIndexProvider; import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.widget.MainSwitchBarController; import com.android.settings.widget.MainSwitchBarController;
@@ -921,8 +921,8 @@ public class WifiSettings extends RestrictedSettingsFragment
: getText(R.string.wifi_scan_notify_text_scanning_off); : getText(R.string.wifi_scan_notify_text_scanning_off);
final LinkifyUtils.OnClickListener clickListener = final LinkifyUtils.OnClickListener clickListener =
() -> new SubSettingLauncher(getContext()) () -> new SubSettingLauncher(getContext())
.setDestination(LocationServices.class.getName()) .setDestination(WifiScanningFragment.class.getName())
.setTitleRes(R.string.location_services_screen_title) .setTitleRes(R.string.location_scanning_wifi_always_scanning_title)
.setSourceMetricsCategory(getMetricsCategory()) .setSourceMetricsCategory(getMetricsCategory())
.launch(); .launch();
mStatusMessagePreference.setText(title, description, clickListener); mStatusMessagePreference.setText(title, description, clickListener);