Skip to content

Commit 783a8cd

Browse files
pgcananthonylavado
authored andcommitted
RouteList Sorting for API<24 (#44)
* RouteList Sorting for API<24 * only using Collection.Sort method
1 parent 84c9b80 commit 783a8cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/Chromecast.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public boolean requestSession(final CallbackContext callbackContext) {
207207
public void run() {
208208
mMediaRouter = MediaRouter.getInstance(activity.getApplicationContext());
209209
final List<RouteInfo> routeList = mMediaRouter.getRoutes();
210-
routeList.sort(Comparator.comparing(RouteInfo::getName));
210+
Collections.sort(routeList, new RouteListComparer());
211211

212212
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
213213
builder.setTitle("Choose a Chromecast");

0 commit comments

Comments
 (0)