Commit 03b5c769 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Drop custom string compare

Test Plan: Notification app list is still sorted

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17779
parent e54c0a2f
......@@ -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);
}
}
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment