File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
mode/tools/SDKUpdater/src/processing/mode/android/tools Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,8 @@ public Channel getChannel() {
262
262
}
263
263
}
264
264
265
- Collections .sort (platformList ,comparator );
265
+ Collections .sort (platformList ,comparePlatformInfo );
266
+ Collections .sort (platformPathsList ,comparePlatformPath );
266
267
return null ;
267
268
}
268
269
@@ -302,7 +303,7 @@ private Boolean isPlatform(String path){
302
303
return false ;
303
304
}
304
305
305
- Comparator <Vector > comparator = new Comparator <Vector >() {
306
+ Comparator <Vector > comparePlatformInfo = new Comparator <Vector >() {
306
307
@ Override
307
308
public int compare (Vector o1 , Vector o2 ) {
308
309
String name1 = (String ) o1 .get (1 );
@@ -312,6 +313,15 @@ public int compare(Vector o1, Vector o2) {
312
313
return version2 - version1 ;
313
314
}
314
315
};
316
+
317
+ Comparator <String > comparePlatformPath = new Comparator <String >() {
318
+ @ Override
319
+ public int compare (String o1 , String o2 ) {
320
+ int version1 = Integer .parseInt (o1 .substring (o1 .indexOf ("-" )+1 ));
321
+ int version2 = Integer .parseInt (o2 .substring (o2 .indexOf ("-" )+1 ));
322
+ return version2 - version1 ;
323
+ }
324
+ };
315
325
}
316
326
317
327
class DownloadTask extends SwingWorker <Object , Object > {
You can’t perform that action at this time.
0 commit comments