jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/375080 )
Change subject: Fix possible crash when clicking DownloadManager notification.
......................................................................
Fix possible crash when clicking DownloadManager notification.
The LocalCompilationsActivity must be launched with the NEW_TASK flag,
since we're calling startActivity() from outside an Activity context.
Bug: T172860
Change-Id: I54a3c8a7a9ea282d94298de4e998e35d0adbabb0
---
M app/src/main/java/org/wikipedia/offline/DownloadManagerReceiver.java
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Mholloway: Looks good to me, approved
diff --git
a/app/src/main/java/org/wikipedia/offline/DownloadManagerReceiver.java
b/app/src/main/java/org/wikipedia/offline/DownloadManagerReceiver.java
index c37a207..ca21af8 100644
--- a/app/src/main/java/org/wikipedia/offline/DownloadManagerReceiver.java
+++ b/app/src/main/java/org/wikipedia/offline/DownloadManagerReceiver.java
@@ -18,7 +18,8 @@
DownloadManager downloadManager = (DownloadManager)
context.getSystemService(Context.DOWNLOAD_SERVICE);
for (long id : ids) {
if
(Compilation.MIME_TYPE.equals(downloadManager.getMimeTypeForDownloadedFile(id)))
{
-
context.startActivity(LocalCompilationsActivity.newIntent(context));
+ context.startActivity(LocalCompilationsActivity.
+
newIntent(context).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
break;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/375080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I54a3c8a7a9ea282d94298de4e998e35d0adbabb0
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Cooltey <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Sharvaniharan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits