aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationsActivity.java6
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java12
2 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
index 40cd5ee09..3384cbd0e 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
@@ -571,7 +571,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
return true;
case R.id.action_check_updates:
if (xmppConnectionService.hasInternetConnection()) {
- openInstallFromUnknownSourcesDialogIfNeeded();
+ openInstallFromUnknownSourcesDialogIfNeeded(true);
} else {
Toast.makeText(this, R.string.account_status_no_internet, Toast.LENGTH_LONG).show();
}
@@ -957,9 +957,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
Log.d(Config.LOGTAG, "AppUpdater: CurrentTime: " + lastUpdateTime);
if (Store == null) {
Log.d(Config.LOGTAG, "AppUpdater started");
- openInstallFromUnknownSourcesDialogIfNeeded();
- UpdateService task = new UpdateService(this, Store, xmppConnectionService);
- task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "false");
+ openInstallFromUnknownSourcesDialogIfNeeded(false);
}
} else {
Log.d(Config.LOGTAG, "AppUpdater stopped");
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index aded90a30..19319df18 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -1240,7 +1240,13 @@ public abstract class XmppActivity extends ActionBarActivity {
return installFromUnknownSource;
}
- protected void openInstallFromUnknownSourcesDialogIfNeeded() {
+ protected void openInstallFromUnknownSourcesDialogIfNeeded(boolean showToast) {
+ String ShowToast;
+ if (showToast == true) {
+ ShowToast = "true";
+ } else {
+ ShowToast = "false";
+ }
if (!installFromUnknownSourceAllowed() && xmppConnectionService.installedFrom() == null) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.install_from_unknown_sources_disabled);
@@ -1261,14 +1267,14 @@ public abstract class XmppActivity extends ActionBarActivity {
Toast.makeText(XmppActivity.this, R.string.device_does_not_support_unknown_source_op, Toast.LENGTH_SHORT).show();
} finally {
UpdateService task = new UpdateService(this, xmppConnectionService.installedFrom(), xmppConnectionService);
- task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true");
+ task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, ShowToast);
Log.d(Config.LOGTAG, "AppUpdater started");
}
});
builder.create().show();
} else {
UpdateService task = new UpdateService(this, xmppConnectionService.installedFrom(), xmppConnectionService);
- task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true");
+ task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, ShowToast);
Log.d(Config.LOGTAG, "AppUpdater started");
}
}