From 47804205b68f09221997b628d8fb79748d573498 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 17 Jun 2020 17:56:19 +0200 Subject: [PATCH] clear pending photo uri only when also clearing activity result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit on some phones the onBackendConnected finishes prior to the onActivityResult() leading to the pending photo uri being cleared before processing the result. this leads to 'Take photo' not working. but we probably don’t need to clear the photo uri if there is to activiyResult to clear as well --- .../eu/siacs/conversations/ui/ConversationFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 329a8b984..bcfa77270 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2879,13 +2879,13 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke private void clearPending() { if (postponedActivityResult.clear()) { Log.e(Config.LOGTAG, "cleared pending intent with unhandled result left"); + if (pendingTakePhotoUri.clear()) { + Log.e(Config.LOGTAG, "cleared pending photo uri"); + } } if (pendingScrollState.clear()) { Log.e(Config.LOGTAG, "cleared scroll state"); } - if (pendingTakePhotoUri.clear()) { - Log.e(Config.LOGTAG, "cleared pending photo uri"); - } if (pendingConversationsUuid.clear()) { Log.e(Config.LOGTAG, "cleared pending conversations uuid"); }