diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/XmppActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 9 |
1 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..ee606395a 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -744,6 +744,7 @@ public abstract class XmppActivity extends ActionBarActivity { SoftKeyboardUtils.hideSoftKeyboard(binding.inputEditText); dialog.dismiss(); })); + dialog.setCanceledOnTouchOutside(false); dialog.setOnDismissListener(dialog1 -> { SoftKeyboardUtils.hideSoftKeyboard(binding.inputEditText); }); @@ -1242,7 +1243,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 +1255,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 +1263,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"); } } } |