// Path: src/org/openjira/jira/model/JiraServerInfo.java
// public class JiraServerInfo {
//     private String baseUrl;
//     private String edition;
//     private String buildNumber;
//     private String buildDate;
//     private String version;
// 
//     public static JiraServerInfo fromMap(Map<String, Object> map) {
//         JiraServerInfo info = new JiraServerInfo();
//         info.setBaseUrl((String) map.get("baseUrl"));
//         info.setEdition((String) map.get("edition"));
//         info.setBuildNumber((String) map.get("buildNumber"));
//         info.setBuildDate((String) map.get("buildDate"));
//         info.setVersion((String) map.get("version"));
//         return info;
//     }
// 
//     public String getBaseUrl() {
//         return baseUrl;
//     }
// 
//     public void setBaseUrl(String baseUrl) {
//         this.baseUrl = baseUrl;
//     }
// 
//     public String getEdition() {
//         return edition;
//     }
// 
//     public void setEdition(String edition) {
//         this.edition = edition;
//     }
// 
//     public String getBuildNumber() {
//         return buildNumber;
//     }
// 
//     public void setBuildNumber(String buildNumber) {
//         this.buildNumber = buildNumber;
//     }
// 
//     public String getBuildDate() {
//         return buildDate;
//     }
// 
//     public void setBuildDate(String buildDate) {
//         this.buildDate = buildDate;
//     }
// 
//     public String getVersion() {
//         return version;
//     }
// 
//     public void setVersion(String version) {
//         this.version = version;
//     }
// 
// }


import org.openjira.jira.model.JiraServerInfo;
import android.app.Activity;
import android.content.ComponentName;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
/*******************************************************************************
 * Copyright 2012 Alexandre d'Alton
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package org.openjira.jira;



public class About extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.about);

        ComponentName comp = new ComponentName(this, this.getClass());
        PackageInfo pinfo = null;
        try {
            pinfo = getPackageManager().getPackageInfo(comp.getPackageName(), 0);
        } catch (NameNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        TextView tv = (TextView) findViewById(R.id.appversion);
        tv.setText(getResources().getString(R.string.app_name) + " version " + (pinfo != null ? pinfo.versionName : ""));

// Path: src/org/openjira/jira/model/JiraServerInfo.java
// public class JiraServerInfo {
//     private String baseUrl;
//     private String edition;
//     private String buildNumber;
//     private String buildDate;
//     private String version;
// 
//     public static JiraServerInfo fromMap(Map<String, Object> map) {
//         JiraServerInfo info = new JiraServerInfo();
//         info.setBaseUrl((String) map.get("baseUrl"));
//         info.setEdition((String) map.get("edition"));
//         info.setBuildNumber((String) map.get("buildNumber"));
//         info.setBuildDate((String) map.get("buildDate"));
//         info.setVersion((String) map.get("version"));
//         return info;
//     }
// 
//     public String getBaseUrl() {
//         return baseUrl;
//     }
// 
//     public void setBaseUrl(String baseUrl) {
//         this.baseUrl = baseUrl;
//     }
// 
//     public String getEdition() {
//         return edition;
//     }
// 
//     public void setEdition(String edition) {
//         this.edition = edition;
//     }
// 
//     public String getBuildNumber() {
//         return buildNumber;
//     }
// 
//     public void setBuildNumber(String buildNumber) {
//         this.buildNumber = buildNumber;
//     }
// 
//     public String getBuildDate() {
//         return buildDate;
//     }
// 
//     public void setBuildDate(String buildDate) {
//         this.buildDate = buildDate;
//     }
// 
//     public String getVersion() {
//         return version;
//     }
// 
//     public void setVersion(String version) {
//         this.version = version;
//     }
// 
// }


// Path: src/org/openjira/jira/About.java
import org.openjira.jira.model.JiraServerInfo;
import android.app.Activity;
import android.content.ComponentName;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;

/*******************************************************************************
 * Copyright 2012 Alexandre d'Alton
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package org.openjira.jira;



public class About extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.about);

        ComponentName comp = new ComponentName(this, this.getClass());
        PackageInfo pinfo = null;
        try {
            pinfo = getPackageManager().getPackageInfo(comp.getPackageName(), 0);
        } catch (NameNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        TextView tv = (TextView) findViewById(R.id.appversion);
        tv.setText(getResources().getString(R.string.app_name) + " version " + (pinfo != null ? pinfo.versionName : ""));

        JiraServerInfo info = JiraApp.get().getCurrentConnection().serverInfo;