Browse Source

utils: Removed dependency on android.text.TextUtils.

Depending upon android.text.TextUtils for simply checking if a string is empty seems unnecessary and makes unit testing harder.

Signed-off-by: ardevd <edvard.holst@gmail.com>
ardevd 6 years ago
parent
commit
1c92e8c88b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/main/java/com/owncloud/android/utils/StringUtils.java

+ 1 - 2
src/main/java/com/owncloud/android/utils/StringUtils.java

@@ -20,7 +20,6 @@
 
 package com.owncloud.android.utils;
 
-import android.text.TextUtils;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -38,7 +37,7 @@ public final class StringUtils {
 
     public static String searchAndColor(String text, String searchText, @ColorInt int color) {
 
-        if (TextUtils.isEmpty(text) || TextUtils.isEmpty(searchText)) {
+        if (text.isEmpty() || searchText.isEmpty()) {
             return text;
         }