aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java8
-rw-r--r--src/main/res/values/strings.xml1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index ef8b753d0..1ec68d0f7 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -1242,7 +1242,7 @@ public abstract class XmppActivity extends ActionBarActivity {
builder.setTitle(R.string.install_from_unknown_sources_disabled);
builder.setMessage(R.string.install_from_unknown_sources_disabled_dialog);
builder.setPositiveButton(R.string.next, (dialog, which) -> {
- Intent intent = null;
+ Intent intent;
if (android.os.Build.VERSION.SDK_INT >= 26) {
intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES);
Uri uri = Uri.parse("package:" + getPackageName());
@@ -1254,7 +1254,7 @@ public abstract class XmppActivity extends ActionBarActivity {
try {
startActivityForResult(intent, REQUEST_UNKNOWN_SOURCE_OP);
} catch (ActivityNotFoundException e) {
- Toast.makeText(XmppActivity.this, R.string.device_does_not_support_battery_op, Toast.LENGTH_SHORT).show();
+ 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");
@@ -1262,6 +1262,10 @@ public abstract class XmppActivity extends ActionBarActivity {
}
});
builder.create().show();
+ } else {
+ UpdateService task = new UpdateService(this, xmppConnectionService.installedFrom(), xmppConnectionService);
+ task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true");
+ Log.d(Config.LOGTAG, "AppUpdater started");
}
}
}
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 0fd36d8b1..d884af1ab 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -840,5 +840,6 @@
<string name="delete_message_dialog">Delete message</string>
<string name="delete_message_dialog_msg">Are you sure you want to delete this message?\n\n<b>Warning:</b> This will not delete copies of this message that are stored on other devices or servers.</string>
<string name="feature_not_implemented">Feature not implemented</string>
+ <string name="device_does_not_support_unknown_source_op">Your device does not support allowing app installs from unknon sources.</string>
</resources>