|
|
|
@ -65,6 +65,9 @@ import android.widget.Toast;
|
|
|
|
|
import com.google.android.gms.location.places.ui.PlacePicker;
|
|
|
|
|
import com.google.protobuf.ByteString;
|
|
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
|
|
import org.greenrobot.eventbus.Subscribe;
|
|
|
|
|
import org.greenrobot.eventbus.ThreadMode;
|
|
|
|
|
import org.thoughtcrime.redphone.RedPhone;
|
|
|
|
|
import org.thoughtcrime.redphone.RedPhoneService;
|
|
|
|
|
import org.thoughtcrime.securesms.TransportOptions.OnTransportChangedListener;
|
|
|
|
@ -98,6 +101,7 @@ import org.thoughtcrime.securesms.database.DraftDatabase.Drafts;
|
|
|
|
|
import org.thoughtcrime.securesms.database.GroupDatabase;
|
|
|
|
|
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo;
|
|
|
|
|
import org.thoughtcrime.securesms.database.MmsSmsColumns.Types;
|
|
|
|
|
import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase.RecipientPreferenceEvent;
|
|
|
|
|
import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase.RecipientsPreferences;
|
|
|
|
|
import org.thoughtcrime.securesms.database.ThreadDatabase;
|
|
|
|
|
import org.thoughtcrime.securesms.jobs.MultiDeviceBlockedUpdateJob;
|
|
|
|
@ -292,6 +296,12 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onStart() {
|
|
|
|
|
super.onStart();
|
|
|
|
|
EventBus.getDefault().register(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onResume() {
|
|
|
|
|
super.onResume();
|
|
|
|
@ -325,6 +335,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|
|
|
|
fragment.setLastSeen(System.currentTimeMillis());
|
|
|
|
|
markLastSeen();
|
|
|
|
|
AudioSlidePlayer.stopAll();
|
|
|
|
|
EventBus.getDefault().unregister(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onStop() {
|
|
|
|
|
super.onStop();
|
|
|
|
|
EventBus.getDefault().unregister(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1168,6 +1185,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
|
|
|
public void onRecipientPreferenceUpdate(final RecipientPreferenceEvent event) {
|
|
|
|
|
if (event.getRecipients().getSortedIdsString().equals(this.recipients.getSortedIdsString())) {
|
|
|
|
|
new RecipientPreferencesTask().execute(this.recipients);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initializeReceivers() {
|
|
|
|
|
securityUpdateReceiver = new BroadcastReceiver() {
|
|
|
|
|
@Override
|
|
|
|
|