aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-25 10:39:31 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-25 10:39:31 +0200
commit81ffcf9f249086c312d1104a7c5e981c7c9bd07f (patch)
tree4b3f8acd682c13096cc73d87d1d5ded60c675f2c /src/main
parent1637506552eb48ded7c230466dd178aa1ec6ea4b (diff)
check internet connection before start looking for updates...
...and don't automatically look for updates if you are connected via roaming
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java5
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 4ee5aab59..c1b9574ba 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -1462,7 +1462,10 @@ public class ConversationActivity extends XmppActivity
}
if (xmppConnectionService.getAccounts().size() != 0) {
- AppUpdate();
+ if (xmppConnectionService.hasInternetConnection()) {
+ if (xmppConnectionService.isWIFI() || (xmppConnectionService.isMobile() && !xmppConnectionService.isMobileRoaming()))
+ AppUpdate();
+ }
}
if (this.mPostponedActivityResult != null) {
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index 35d4c8219..1e011de8c 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -396,7 +396,11 @@ public abstract class XmppActivity extends Activity {
startActivity(new Intent(this, SettingsActivity.class));
break;
case R.id.action_check_updates:
- startActivity(new Intent(this, UpdaterActivity.class));
+ if (xmppConnectionService.hasInternetConnection()) {
+ startActivity(new Intent(this, UpdaterActivity.class));
+ } else {
+ Toast.makeText(this, R.string.account_status_no_internet, Toast.LENGTH_LONG).show();
+ }
break;
case R.id.action_accounts:
final Intent intent = new Intent(getApplicationContext(), EditAccountActivity.class);