diff --git a/src/org/thoughtcrime/securesms/MediaPreviewActivity.java b/src/org/thoughtcrime/securesms/MediaPreviewActivity.java index 9535ad27a5..1fd13b1188 100644 --- a/src/org/thoughtcrime/securesms/MediaPreviewActivity.java +++ b/src/org/thoughtcrime/securesms/MediaPreviewActivity.java @@ -42,6 +42,7 @@ import org.thoughtcrime.securesms.util.DateUtils; import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.SaveAttachmentTask; import org.thoughtcrime.securesms.util.SaveAttachmentTask.Attachment; +import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.video.VideoPlayer; import java.io.IOException; @@ -98,7 +99,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im @Override public void onModified(Recipient recipient) { - initializeActionBar(); + Util.runOnMain(this::initializeActionBar); } private void initializeActionBar() { diff --git a/src/org/thoughtcrime/securesms/components/webrtc/WebRtcCallScreen.java b/src/org/thoughtcrime/securesms/components/webrtc/WebRtcCallScreen.java index 16a7da5460..162685f765 100644 --- a/src/org/thoughtcrime/securesms/components/webrtc/WebRtcCallScreen.java +++ b/src/org/thoughtcrime/securesms/components/webrtc/WebRtcCallScreen.java @@ -46,6 +46,7 @@ import org.thoughtcrime.securesms.contacts.avatars.ContactPhotoFactory; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms.recipients.RecipientModifiedListener; import org.thoughtcrime.securesms.service.WebRtcCallService; +import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.VerifySpan; import org.thoughtcrime.securesms.util.ViewUtil; import org.webrtc.SurfaceViewRenderer; @@ -339,9 +340,11 @@ public class WebRtcCallScreen extends FrameLayout implements RecipientModifiedLi @Override public void onModified(Recipient recipient) { - if (recipient == this.recipient) { - setPersonInfo(recipient); - } + Util.runOnMain(() -> { + if (recipient == WebRtcCallScreen.this.recipient) { + setPersonInfo(recipient); + } + }); } public static interface HangupButtonListener { diff --git a/src/org/thoughtcrime/securesms/database/DatabaseFactory.java b/src/org/thoughtcrime/securesms/database/DatabaseFactory.java index 811203d17b..681701669a 100644 --- a/src/org/thoughtcrime/securesms/database/DatabaseFactory.java +++ b/src/org/thoughtcrime/securesms/database/DatabaseFactory.java @@ -1299,6 +1299,8 @@ public class DatabaseFactory { db.insert("recipient_preferences", null, contentValues); } } + + if (cursor != null) cursor.close(); } if (oldVersion < INTERNAL_SYSTEM_DISPLAY_NAME) {