mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 11:20:47 +01:00
Add Calling Requests.
This commit is contained in:
committed by
Greyson Parrelli
parent
5a12eedc2c
commit
1e250ee95c
@@ -25,7 +25,6 @@ import org.thoughtcrime.securesms.WebRtcCallActivity;
|
||||
import org.thoughtcrime.securesms.conversation.ConversationActivity;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.messagerequests.CalleeMustAcceptMessageRequestDialogFragment;
|
||||
import org.thoughtcrime.securesms.permissions.Permissions;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.ringrtc.RemotePeer;
|
||||
@@ -197,16 +196,11 @@ public class CommunicationActions {
|
||||
|
||||
MessageSender.onMessageSent();
|
||||
|
||||
if (FeatureFlags.profileForCalling() && recipient.resolve().getProfileKey() == null) {
|
||||
CalleeMustAcceptMessageRequestDialogFragment.create(recipient.getId())
|
||||
.show(activity.getSupportFragmentManager(), null);
|
||||
} else {
|
||||
Intent activityIntent = new Intent(activity, WebRtcCallActivity.class);
|
||||
Intent activityIntent = new Intent(activity, WebRtcCallActivity.class);
|
||||
|
||||
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
activity.startActivity(activityIntent);
|
||||
}
|
||||
activity.startActivity(activityIntent);
|
||||
})
|
||||
.execute();
|
||||
}
|
||||
@@ -228,17 +222,12 @@ public class CommunicationActions {
|
||||
|
||||
MessageSender.onMessageSent();
|
||||
|
||||
if (FeatureFlags.profileForCalling() && recipient.resolve().getProfileKey() == null) {
|
||||
CalleeMustAcceptMessageRequestDialogFragment.create(recipient.getId())
|
||||
.show(activity.getSupportFragmentManager(), null);
|
||||
} else {
|
||||
Intent activityIntent = new Intent(activity, WebRtcCallActivity.class);
|
||||
Intent activityIntent = new Intent(activity, WebRtcCallActivity.class);
|
||||
|
||||
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra(WebRtcCallActivity.EXTRA_ENABLE_VIDEO_IF_AVAILABLE, true);
|
||||
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra(WebRtcCallActivity.EXTRA_ENABLE_VIDEO_IF_AVAILABLE, true);
|
||||
|
||||
activity.startActivity(activityIntent);
|
||||
}
|
||||
activity.startActivity(activityIntent);
|
||||
})
|
||||
.execute();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public final class FeatureFlags {
|
||||
private static final String PINS_MEGAPHONE_KILL_SWITCH = "android.pinsMegaphoneKillSwitch";
|
||||
private static final String ATTACHMENTS_V3 = "android.attachmentsV3";
|
||||
private static final String REMOTE_DELETE = "android.remoteDelete";
|
||||
private static final String PROFILE_FOR_CALLING = "android.profileForCalling";
|
||||
private static final String PROFILE_FOR_CALLING = "android.profileForCalling.2";
|
||||
private static final String CALLING_PIP = "android.callingPip";
|
||||
private static final String VERSIONED_PROFILES_1 = "android.versionedProfiles";
|
||||
private static final String VERSIONED_PROFILES_2 = "android.versionedProfiles.2";
|
||||
|
||||
Reference in New Issue
Block a user