about: add package version property
authorjihye424.kim <jihye424.kim@samsung.com>
Fri, 20 Nov 2015 06:44:25 +0000 (15:44 +0900)
committerjihye424.kim <jihye424.kim@samsung.com>
Mon, 23 Nov 2015 02:18:42 +0000 (11:18 +0900)
Change-Id: I1b10197585c137aa51bfc256406b8f09bc6936a7
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/resources/StringResources.java
src/org/tizen/emulator/manager/tool/About.java

index 878ddf5..1d5c430 100644 (file)
@@ -78,6 +78,7 @@ public class StringResources {
        public static final String PROP_KEY_VERSION = "version"; //$NON-NLS-1$
        public static final String PROP_KEY_BUILD_TIME = "build_time"; //$NON-NLS-1$
        public static final String PROP_KEY_GIT_VERSION = "build_git_commit"; //$NON-NLS-1$
+       public static final String PKG_VERSION="package_version";
 
        public static final String IMAGE_INFO_FILENAME = "info.ini"; //$NON-NLS-1$
        public static final String IMAGE_OLD_PLATFORM = "platform"; //$NON-NLS-1$
index 3ad1ede..6176608 100644 (file)
@@ -51,6 +51,7 @@ public class About {
        private String about_version = ""; //$NON-NLS-1$
        private String time = ""; //$NON-NLS-1$
        private String gitVersion = ""; //$NON-NLS-1$
+       private String packageVersion = "";
        private String workspace = ""; //$NON-NLS-1$
        private String contents = ""; //$NON-NLS-1$
 
@@ -82,6 +83,7 @@ public class About {
                                //ver  = properties.getProperty(StringResources.PROP_KEY_VERSION);
                                time = properties.getProperty(StringResources.PROP_KEY_BUILD_TIME);
                                gitVersion = properties.getProperty(StringResources.PROP_KEY_GIT_VERSION);
+                               packageVersion = properties.getProperty(StringResources.PKG_VERSION);
                        } catch (IOException e1) {
                                EMLogger.getLogger().log(Level.SEVERE, e1.getMessage());
                        } finally {
@@ -101,7 +103,7 @@ public class About {
                        Properties props = new Properties();
                        props.load(fis);
                        ver = props.getProperty(StringResources.TIZEN_SDK_VERSION);
-                       
+
                } catch (FileNotFoundException e){
                        EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
                } catch (Exception e) {
@@ -169,6 +171,10 @@ public class About {
                        workspace  = StringResources.UNDEFINED;
                }
 
+               if (packageVersion == null || packageVersion.isEmpty()) {
+                       packageVersion = StringResources.UNDEFINED;
+               }
+
                contents = String.format("%-12s : %s\n%-12s : %s\n%-12s : %s\n%-12s : %s", //$NON-NLS-1$
                                "Version", about_version, "Build time" ,(time + " (GMT)"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                                "Git version", gitVersion, "Workspace path", workspace); //$NON-NLS-1$ //$NON-NLS-2$
@@ -208,4 +214,12 @@ public class About {
        public String getAboutVersion() {
                return about_version;
        }
+
+       public String getPackageVersion() {
+               return packageVersion;
+       }
+
+       public void setPackageVersion(String packageVersion) {
+               this.packageVersion = packageVersion;
+       }
 }