Use a different string for vpn summary.
- for legacy vpn config, we do not get the vpn name to show in the preference summary, and we used to simply show "Connected" as the summary text. However, the string was changed to include the connected device name as the parameter. Change to use connected summary string that does not requires any parameter. Change-Id: Ia6191eb315f5f23e0e6bf8da2a9537c211e8188e Fixes: 77618408 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -159,9 +159,10 @@ public class VpnPreferenceController extends AbstractPreferenceController
|
||||
ThreadUtils.postOnMainThread(() -> mPreference.setSummary(summary));
|
||||
}
|
||||
|
||||
private String getNameForVpnConfig(VpnConfig cfg, UserHandle user) {
|
||||
@VisibleForTesting
|
||||
String getNameForVpnConfig(VpnConfig cfg, UserHandle user) {
|
||||
if (cfg.legacy) {
|
||||
return mContext.getString(R.string.bluetooth_connected);
|
||||
return mContext.getString(R.string.wifi_display_status_connected);
|
||||
}
|
||||
// The package name for an active VPN is stored in the 'user' field of its VpnConfig
|
||||
final String vpnPackage = cfg.user;
|
||||
|
Reference in New Issue
Block a user