diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-23 07:15:57 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-23 07:15:57 +0100 |
commit | 9ec0a87cc28d134c974e8ca0e0b3fda3d89bca7a (patch) | |
tree | 0a7caa92394464119f5656b76feb3c34febd2508 /src/main/java/de/pixart/messenger/ui/XmppActivity.java | |
parent | f86c1b497803130d44c11552969723b1ce3ee498 (diff) |
fix manual update check
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/XmppActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 8 |
1 files changed, 6 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"); } } } |