From: tobiasKaminsky Date: Thu, 5 Nov 2015 21:51:26 +0000 (+0100) Subject: wip X-Git-Tag: beta-20151122~40 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/464f0d443952df2787edf1c9f675c6f6a1029ce8 wip --- diff --git a/CHANGELOG.md b/CHANGELOG.md index a970f8ed..3be88b44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2015-11-05 +- update master +- fix #1244 +- add changelog +- add check for update of beta version + # 2015-11-02 - PR [#1240](https://github.com/owncloud/android/pull/1240) "Set as wallpaper" merged - updated other PRs diff --git a/res/values/strings.xml b/res/values/strings.xml index 6f435d31..9537dc73 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -401,5 +401,6 @@ Sorry, your server version does not allow share with users within clients. \nPlease contact your administrator + https://raw.githubusercontent.com/owncloud/android/beta/CHANGELOG.md diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 29e8fe26..da8b7bac 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -106,15 +106,18 @@ - - - + + diff --git a/src/com/owncloud/android/ui/activity/Preferences.java b/src/com/owncloud/android/ui/activity/Preferences.java index 9f4415f6..46b62b36 100644 --- a/src/com/owncloud/android/ui/activity/Preferences.java +++ b/src/com/owncloud/android/ui/activity/Preferences.java @@ -496,21 +496,39 @@ public class Preferences extends PreferenceActivity } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } - if (latestVersion == -1){ + if (latestVersion == -1) { Toast.makeText(getApplicationContext(), "No information available!", Toast.LENGTH_SHORT).show(); } - if (latestVersion > currentVersion){ - String betaLinkWeb = (String) getText(R.string.beta_link) + latestVersion + ".apk"; - if (betaLinkWeb != null && betaLinkWeb.length() > 0) { - Uri uriUrl = Uri.parse(betaLinkWeb); - Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl); - startActivity(intent); - return true; - } - } else { - Toast.makeText(getApplicationContext(), "No new version available!", Toast.LENGTH_SHORT).show(); + if (latestVersion > currentVersion) { + String betaLinkWeb = (String) getText(R.string.beta_link) + latestVersion + ".apk"; + if (betaLinkWeb != null && betaLinkWeb.length() > 0) { + Uri uriUrl = Uri.parse(betaLinkWeb); + Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl); + startActivity(intent); return true; } + } else { + Toast.makeText(getApplicationContext(), "No new version available!", Toast.LENGTH_SHORT).show(); + return true; + } + return true; + } + }); + } + + /* Link to Beta apks */ + Preference pChangelogLink = findPreference("changelog_link"); + if (pChangelogLink != null){ + pChangelogLink.setOnPreferenceClickListener(new OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + String betaLinkWeb = getString(R.string.changelog); + if (betaLinkWeb != null && betaLinkWeb.length() > 0) { + Uri uriUrl = Uri.parse(betaLinkWeb); + Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl); + startActivity(intent); + return true; + } return true; } });