fix crash
This commit is contained in:
parent
71ede7c31e
commit
9aac6d99e7
|
@ -1705,7 +1705,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
.getOngoingRtpConnection(conversation.getContact());
|
.getOngoingRtpConnection(conversation.getContact());
|
||||||
if (ongoingRtpSession.isPresent()) {
|
if (ongoingRtpSession.isPresent()) {
|
||||||
final OngoingRtpSession id = ongoingRtpSession.get();
|
final OngoingRtpSession id = ongoingRtpSession.get();
|
||||||
final Intent intent = new Intent(getActivity(), RtpSessionActivity.class);
|
final Intent intent = new Intent(activity, RtpSessionActivity.class);
|
||||||
intent.putExtra(
|
intent.putExtra(
|
||||||
RtpSessionActivity.EXTRA_ACCOUNT,
|
RtpSessionActivity.EXTRA_ACCOUNT,
|
||||||
id.getAccount().getJid().asBareJid().toEscapedString());
|
id.getAccount().getJid().asBareJid().toEscapedString());
|
||||||
|
@ -1720,7 +1720,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
intent.setAction(RtpSessionActivity.ACTION_MAKE_VOICE_CALL);
|
intent.setAction(RtpSessionActivity.ACTION_MAKE_VOICE_CALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startActivity(intent);
|
activity.startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2100,13 +2100,13 @@ public class ConversationFragment extends XmppFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void muteConversationDialog(final Conversation conversation) {
|
protected void muteConversationDialog(final Conversation conversation) {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());
|
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.disable_notifications);
|
builder.setTitle(R.string.disable_notifications);
|
||||||
final int[] durations = getResources().getIntArray(R.array.mute_options_durations);
|
final int[] durations = activity.getResources().getIntArray(R.array.mute_options_durations);
|
||||||
final CharSequence[] labels = new CharSequence[durations.length];
|
final CharSequence[] labels = new CharSequence[durations.length];
|
||||||
for (int i = 0; i < durations.length; ++i) {
|
for (int i = 0; i < durations.length; ++i) {
|
||||||
if (durations[i] == -1) {
|
if (durations[i] == -1) {
|
||||||
labels[i] = getString(R.string.until_further_notice);
|
labels[i] = activity.getString(R.string.until_further_notice);
|
||||||
} else {
|
} else {
|
||||||
labels[i] = TimeFrameUtils.resolve(activity, 1000L * durations[i]);
|
labels[i] = TimeFrameUtils.resolve(activity, 1000L * durations[i]);
|
||||||
}
|
}
|
||||||
|
@ -2124,7 +2124,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
activity.xmppConnectionService.updateConversation(conversation);
|
activity.xmppConnectionService.updateConversation(conversation);
|
||||||
activity.onConversationsListItemUpdated();
|
activity.onConversationsListItemUpdated();
|
||||||
refresh();
|
refresh();
|
||||||
requireActivity().invalidateOptionsMenu();
|
activity.invalidateOptionsMenu();
|
||||||
});
|
});
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
@ -2162,7 +2162,7 @@ public class ConversationFragment extends XmppFragment
|
||||||
this.activity.xmppConnectionService.updateConversation(conversation);
|
this.activity.xmppConnectionService.updateConversation(conversation);
|
||||||
this.activity.onConversationsListItemUpdated();
|
this.activity.onConversationsListItemUpdated();
|
||||||
refresh();
|
refresh();
|
||||||
requireActivity().invalidateOptionsMenu();
|
activity.invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void invokeAttachFileIntent(final int attachmentChoice) {
|
protected void invokeAttachFileIntent(final int attachmentChoice) {
|
||||||
|
|
Loading…
Reference in a new issue