Merge "Use a different string for vpn summary." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-12 22:26:54 +00:00
committed by Android (Google) Code Review
2 changed files with 19 additions and 2 deletions

View File

@@ -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;