From 3b6429c163bd9f5adc1ec29e320a281bdeb3e070 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Mon, 11 Feb 2019 16:14:27 -0800 Subject: [PATCH] Don't unnecessarily stop the ShareActivity in onPause. 1. Due to ShareActivity having noHistory=true, it will already be ditched when you leave the activity. 2. We only need to truly finish() here if we've dropped the underlying media. Fixes #8591 --- src/org/thoughtcrime/securesms/ShareActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ShareActivity.java b/src/org/thoughtcrime/securesms/ShareActivity.java index fe80874801..872cc5e7c9 100644 --- a/src/org/thoughtcrime/securesms/ShareActivity.java +++ b/src/org/thoughtcrime/securesms/ShareActivity.java @@ -133,9 +133,10 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity super.onPause(); if (!isPassingAlongMedia && resolvedExtra != null) { PersistentBlobProvider.getInstance(this).delete(this, resolvedExtra); - } - if (!isFinishing()) { - finish(); + + if (!isFinishing()) { + finish(); + } } }