Display summary for connected Passpoint credential APs
Connected Passpoint credential APs should now display <SSID> by <ProviderFriendlyName> in their summary in the wifi picker. Tracking bug for adding robolectric tests: b/122849296 Bug: 118705403 Test: manual, build and visual check Change-Id: I5455dddae586379ffca9f7a840bef78942dc3ff1
This commit is contained in:
@@ -99,6 +99,8 @@
|
||||
<string name="connected_via_network_scorer_default">Automatically connected via network rating provider</string>
|
||||
<!-- Status message of Wi-Fi when it is connected by Passpoint configuration. [CHAR LIMIT=NONE] -->
|
||||
<string name="connected_via_passpoint">Connected via %1$s</string>
|
||||
<!-- Status message of Wi-Fi when it is connected by Passpoint configuration. [CHAR LIMIT=NONE] -->
|
||||
<string name="ssid_by_passpoint_provider"><xliff:g id="ssid" example="Cafe Wifi">%1$s</xliff:g> by <xliff:g id="passpointProvider" example="Passpoint Provider">%2$s</xliff:g></string>
|
||||
<!-- Status message of Wi-Fi when network has matching passpoint credentials. [CHAR LIMIT=NONE] -->
|
||||
<string name="available_via_passpoint">Available via %1$s</string>
|
||||
<!-- Package name for Settings app-->
|
||||
|
||||
@@ -884,7 +884,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
||||
if (isActive()) {
|
||||
if (isPasspoint()) {
|
||||
// This is the active connection on passpoint
|
||||
summary.append(getSummary(mContext, getDetailedState(),
|
||||
summary.append(getSummary(mContext, ssid, getDetailedState(),
|
||||
false, mConfig.providerFriendlyName));
|
||||
} else if (mConfig != null && getDetailedState() == DetailedState.CONNECTED
|
||||
&& mIsCarrierAp) {
|
||||
@@ -1294,11 +1294,11 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
||||
|
||||
public static String getSummary(Context context, String ssid, DetailedState state,
|
||||
boolean isEphemeral, String passpointProvider) {
|
||||
if (state == DetailedState.CONNECTED && ssid == null) {
|
||||
if (TextUtils.isEmpty(passpointProvider) == false) {
|
||||
if (state == DetailedState.CONNECTED) {
|
||||
if (!TextUtils.isEmpty(passpointProvider)) {
|
||||
// Special case for connected + passpoint networks.
|
||||
String format = context.getString(R.string.connected_via_passpoint);
|
||||
return String.format(format, passpointProvider);
|
||||
String format = context.getString(R.string.ssid_by_passpoint_provider);
|
||||
return String.format(format, ssid, passpointProvider);
|
||||
} else if (isEphemeral) {
|
||||
// Special case for connected + ephemeral networks.
|
||||
final NetworkScoreManager networkScoreManager = context.getSystemService(
|
||||
|
||||
Reference in New Issue
Block a user