diff --git a/src/org/kde/kdeconnect/Helpers/StringsHelper.java b/src/org/kde/kdeconnect/Helpers/StringsHelper.java index 2c00c9b2..25c4ea51 100644 --- a/src/org/kde/kdeconnect/Helpers/StringsHelper.java +++ b/src/org/kde/kdeconnect/Helpers/StringsHelper.java @@ -5,12 +5,4 @@ import java.nio.charset.Charset; public class StringsHelper { public static final Charset UTF8 = Charset.forName("UTF-8"); - - public static int compare(String a, String b) { - if (a == b) return 0; - if (a == null) return -1; - if (b == null) return 1; - return a.compareToIgnoreCase(b); - } - } diff --git a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationFilterActivity.java b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationFilterActivity.java index d057471f..eade5b2f 100644 --- a/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationFilterActivity.java +++ b/src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationFilterActivity.java @@ -123,7 +123,7 @@ public class NotificationFilterActivity extends AppCompatActivity { apps[i].isEnabled = appDatabase.isEnabled(appInfo.packageName); } - Arrays.sort(apps, (lhs, rhs) -> StringsHelper.compare(lhs.name, rhs.name)); + Arrays.sort(apps, (lhs, rhs) -> lhs.name.compareToIgnoreCase(rhs.name)); runOnUiThread(this::displayAppList); }).start();