aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-04-02 21:36:31 -0700
committerScott Jackson <daneren2005@gmail.com>2014-04-02 21:36:31 -0700
commitd28822f34ce40785d24bcd1450f10aa99c851e28 (patch)
tree22a76ab6d5447377e7691c2ffcd3771749c0de0a /src/github/daneren2005
parent8121ea7400b906900654b097d96e521b8c9f8a82 (diff)
downloaddsub-d28822f34ce40785d24bcd1450f10aa99c851e28.tar.gz
dsub-d28822f34ce40785d24bcd1450f10aa99c851e28.tar.bz2
dsub-d28822f34ce40785d24bcd1450f10aa99c851e28.zip
Pull changes from xml, won't be ever translating changelogs
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/view/ChangeLog.java30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/github/daneren2005/dsub/view/ChangeLog.java b/src/github/daneren2005/dsub/view/ChangeLog.java
index bbc4e4dd..5a7850ff 100644
--- a/src/github/daneren2005/dsub/view/ChangeLog.java
+++ b/src/github/daneren2005/dsub/view/ChangeLog.java
@@ -370,27 +370,11 @@ public class ChangeLog {
Resources resources = mContext.getResources();
- // Read master change log from raw/changelog.xml
- SparseArray<ReleaseItem> defaultChangelog;
- try {
- XmlPullParser xml = XmlPullParserFactory.newInstance().newPullParser();
- InputStreamReader reader = new InputStreamReader(resources.openRawResource(R.raw.changelog));
- xml.setInput(reader);
- try {
- defaultChangelog = readChangeLog(xml, full);
- } finally {
- try { reader.close(); } catch (Exception e) { /* do nothing */ }
- }
- } catch (XmlPullParserException e) {
- Log.e(LOG_TAG, "Error reading raw/changelog.xml", e);
- return null;
- }
-
- // Read localized change log from xml[-lang]/changelog.xml
+ // Read master change log from xml/changelog.xml
+ SparseArray<ReleaseItem> changelog;
XmlResourceParser resXml = mContext.getResources().getXml(R.xml.changelog);
- SparseArray<ReleaseItem> changelog;
try {
- changelog = readChangeLog(resXml, full);
+ changelog = readChangeLog(resXml, full);
} finally {
resXml.close();
}
@@ -398,9 +382,9 @@ public class ChangeLog {
String versionFormat = resources.getString(R.string.changelog_version_format);
// Get all version codes from the master change log...
- List<Integer> versions = new ArrayList<Integer>(defaultChangelog.size());
- for (int i = 0, len = defaultChangelog.size(); i < len; i++) {
- int key = defaultChangelog.keyAt(i);
+ List<Integer> versions = new ArrayList<Integer>(changelog.size());
+ for (int i = 0, len = changelog.size(); i < len; i++) {
+ int key = changelog.keyAt(i);
versions.add(key);
}
@@ -416,7 +400,7 @@ public class ChangeLog {
// Use release information from localized change log and fall back to the master file
// if necessary.
- ReleaseItem release = changelog.get(key, defaultChangelog.get(key));
+ ReleaseItem release = changelog.get(key);
sb.append("<div class='title'>");
sb.append(String.format(versionFormat, release.versionName));