From 84c9b809dbb2992664222f3de07c37cf3ac9f291 Mon Sep 17 00:00:00 2001 From: pgcan Date: Sun, 15 Sep 2019 09:54:13 +0530 Subject: [PATCH] RoutListComparer for Sorting API<24 (#45) * RoutListComparer for Sorting API<24 * fixed classname RouteListComparer --- src/android/RouteListComparer.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/android/RouteListComparer.java diff --git a/src/android/RouteListComparer.java b/src/android/RouteListComparer.java new file mode 100644 index 0000000..6e016c6 --- /dev/null +++ b/src/android/RouteListComparer.java @@ -0,0 +1,11 @@ +package acidhax.cordova.chromecast; + +import androidx.mediarouter.media.MediaRouter; + +import java.util.Comparator; + +public class RouteListComparer implements Comparator { + public int compare(MediaRouter.RouteInfo left, MediaRouter.RouteInfo right) { + return left.getName().compareTo(right.getName()); + } +}