From 49486dffdf73e368fd2087eb42a5f7e28d9ccc80 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Mon, 31 Aug 2015 13:56:13 +0900 Subject: [PATCH] image-list: change sorting sequence. First, images are arranged by image-version. If image-version is same, image-type (standard or not) is used as secondary criteria. Change-Id: I6e905625ac371b327bfce7a8f7e52d9c23983724 Signed-off-by: minkee.lee --- src/org/tizen/emulator/manager/platform/Profile.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/tizen/emulator/manager/platform/Profile.java b/src/org/tizen/emulator/manager/platform/Profile.java index e7989d5..937d745 100644 --- a/src/org/tizen/emulator/manager/platform/Profile.java +++ b/src/org/tizen/emulator/manager/platform/Profile.java @@ -309,7 +309,13 @@ public class Profile { BaseImage src = this.prop; BaseImage target = ((ImagePair)o).prop; - // 1. check type. ("default" > others.. ) + // 1. check version (descending order) + int order = target.getVersion().compareTo(src.getVersion()); + if (order != 0) { + return order; + } + + // 2. check type. ("default" > others.. ) if (target.getType().equals("default")) { if (!src.getType().equals("default")) { return 1; @@ -321,12 +327,6 @@ public class Profile { } } - // 2. check version (descending order) - int order = target.getVersion().compareTo(src.getVersion()); - if (order != 0) { - return order; - } - // 3. check cpu type (32bit > 64bit) if (target.getCpuType().isPriorInList(src.getCpuType())) { return 1; -- 2.7.4