Skip to content

Commit

Permalink
RouteList Sorting for API<24 (#44)
Browse files Browse the repository at this point in the history
* RouteList Sorting for API<24

* only using Collection.Sort method
  • Loading branch information
pgcan authored and anthonylavado committed Sep 15, 2019
1 parent 84c9b80 commit 783a8cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/android/Chromecast.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public boolean requestSession(final CallbackContext callbackContext) {
public void run() {
mMediaRouter = MediaRouter.getInstance(activity.getApplicationContext());
final List<RouteInfo> routeList = mMediaRouter.getRoutes();
routeList.sort(Comparator.comparing(RouteInfo::getName));
Collections.sort(routeList, new RouteListComparer());

AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Choose a Chromecast");
Expand Down

0 comments on commit 783a8cd

Please sign in to comment.