show no conn options as a localizable, non-empty string rather than

empty string
This commit is contained in:
Eric House 2015-02-03 22:23:11 -08:00
parent e0a337ff4c
commit 3b41752382

View file

@ -84,12 +84,18 @@ public class CommsAddrRec {
public String toString( Context context ) public String toString( Context context )
{ {
String result;
CommsConnType[] types = getTypes(); CommsConnType[] types = getTypes();
String[] strs = new String[types.length]; if ( 0 == types.length ) {
for ( int ii = 0; ii < types.length; ++ii ) { result = LocUtils.getString( context, R.string.note_none );
strs[ii] = types[ii].longName( context ); } else {
String[] strs = new String[types.length];
for ( int ii = 0; ii < types.length; ++ii ) {
strs[ii] = types[ii].longName( context );
}
result = TextUtils.join( " + ", strs );
} }
return TextUtils.join( " + ", strs ); return result;
} }
private static final CommsConnType[] s_hint = new CommsConnType[0]; private static final CommsConnType[] s_hint = new CommsConnType[0];