[android] Do not use String.isEmpty() - started from SDK 9.

This commit is contained in:
vng 2014-05-08 16:02:10 +03:00 committed by Alex Zolotarev
parent a2969fbd03
commit b31d264ceb
3 changed files with 3 additions and 4 deletions

View file

@ -407,7 +407,7 @@ public class SearchActivity extends MapsWithMeBaseListActivity implements Locati
private boolean isShowCategories()
{
return getSearchString().isEmpty();
return getSearchString().length() == 0;
}
private LocationService m_location;
@ -417,7 +417,6 @@ public class SearchActivity extends MapsWithMeBaseListActivity implements Locati
private View mClearQueryBtn;
private View mVoiceInput;
private View mSearchIcon;
//
private RadioGroup mSearchScopeGroup;

View file

@ -24,7 +24,7 @@ public abstract class MapObject
private static boolean isEmpty(String s)
{
return (s == null || s.isEmpty());
return (s == null || s.length() == 0);
}
public void setDefaultIfEmpty(Resources res)

View file

@ -47,7 +47,7 @@ public class StringUtils
for (int i = 0; i < arr.length; ++i)
{
String s = (arr[i] != null) ? arr[i].toString() : null;
if (s != null && !s.isEmpty())
if (s != null && s.length() > 0)
res = (res == null) ? s : res + delim + s;
}
return res;