From d4fba5f3c7331f2cdf8c1acd7533a79c7fe8a167 Mon Sep 17 00:00:00 2001 From: Nicholas Tinsley Date: Tue, 4 Jun 2024 17:05:53 -0400 Subject: [PATCH] Ship Raise Hand. --- .../components/webrtc/CallOverflowPopupWindow.kt | 13 +++++-------- .../components/webrtc/CallParticipantView.java | 3 +-- .../securesms/components/webrtc/WebRtcControls.java | 3 +-- .../securesms/service/webrtc/SignalCallManager.java | 4 +--- .../thoughtcrime/securesms/util/FeatureFlags.java | 10 ---------- 5 files changed, 8 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallOverflowPopupWindow.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallOverflowPopupWindow.kt index 95d0073164..f79ded7a80 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallOverflowPopupWindow.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallOverflowPopupWindow.kt @@ -18,7 +18,6 @@ import androidx.core.widget.PopupWindowCompat import androidx.fragment.app.FragmentActivity import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.dependencies.AppDependencies -import org.thoughtcrime.securesms.util.FeatureFlags import org.thoughtcrime.securesms.util.visible /** @@ -39,13 +38,11 @@ class CallOverflowPopupWindow(private val activity: FragmentActivity, parentView AppDependencies.signalCallManager.react(it) dismiss() } - if (FeatureFlags.groupCallRaiseHand()) { - val raiseHand = root.findViewById(R.id.raise_hand_layout_parent) - raiseHand.visible = true - raiseHand.setOnClickListener { - AppDependencies.signalCallManager.raiseHand(!raisedHandDelegate.isSelfHandRaised()) - dismiss() - } + val raiseHand = root.findViewById(R.id.raise_hand_layout_parent) + raiseHand.visible = true + raiseHand.setOnClickListener { + AppDependencies.signalCallManager.raiseHand(!raisedHandDelegate.isSelfHandRaised()) + dismiss() } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantView.java b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantView.java index b650e586c6..3cc56a9ebb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantView.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantView.java @@ -37,7 +37,6 @@ import org.thoughtcrime.securesms.events.CallParticipant; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms.recipients.RecipientId; import org.thoughtcrime.securesms.util.AvatarUtil; -import org.thoughtcrime.securesms.util.FeatureFlags; import org.thoughtcrime.securesms.util.ViewUtil; import org.webrtc.RendererCommon; import org.whispersystems.signalservice.api.util.Preconditions; @@ -182,7 +181,7 @@ public class CallParticipantView extends ConstraintLayout { audioIndicator.setVisibility(View.VISIBLE); audioIndicator.bind(participant.isMicrophoneEnabled(), participant.getAudioLevel()); final String shortRecipientDisplayName = participant.getShortRecipientDisplayName(getContext()); - if (FeatureFlags.groupCallRaiseHand() && raiseHandAllowed && participant.isHandRaised()) { + if (raiseHandAllowed && participant.isHandRaised()) { raiseHandIcon.setVisibility(View.VISIBLE); nameLabel.setVisibility(View.VISIBLE); nameLabel.setText(shortRecipientDisplayName); diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcControls.java b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcControls.java index 3fce3a64ce..bf94fe21bf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcControls.java +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/WebRtcControls.java @@ -8,7 +8,6 @@ import androidx.annotation.Px; import androidx.annotation.StringRes; import org.thoughtcrime.securesms.R; -import org.thoughtcrime.securesms.util.FeatureFlags; import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager; import java.util.Set; @@ -219,7 +218,7 @@ public final class WebRtcControls { } public boolean displayRaiseHand() { - return FeatureFlags.groupCallRaiseHand() && !isInPipMode; + return !isInPipMode; } public @NonNull WebRtcAudioOutput getAudioOutput() { diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/SignalCallManager.java b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/SignalCallManager.java index 5c5c87c7fe..bf6c96980f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/SignalCallManager.java +++ b/app/src/main/java/org/thoughtcrime/securesms/service/webrtc/SignalCallManager.java @@ -922,9 +922,7 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall. @Override public void onRaisedHands(@NonNull GroupCall groupCall, List raisedHands) { - if (FeatureFlags.groupCallRaiseHand()) { - process((s, p) -> p.handleGroupCallRaisedHand(s, raisedHands)); - } + process((s, p) -> p.handleGroupCallRaisedHand(s, raisedHands)); } @Override diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java index 72a217a773..eb7676df42 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java @@ -112,7 +112,6 @@ public final class FeatureFlags { public static final String IDEAL_ENABLED_REGIONS = "global.donations.idealEnabledRegions"; public static final String SEPA_ENABLED_REGIONS = "global.donations.sepaEnabledRegions"; private static final String NOTIFICATION_THUMBNAIL_BLOCKLIST = "android.notificationThumbnailProductBlocklist"; - private static final String CALLING_RAISE_HAND = "android.calling.raiseHand"; private static final String USE_ACTIVE_CALL_MANAGER = "android.calling.useActiveCallManager.5"; private static final String GIF_SEARCH = "global.gifSearch"; private static final String AUDIO_REMUXING = "android.media.audioRemux.1"; @@ -195,7 +194,6 @@ public final class FeatureFlags { IDEAL_ENABLED_REGIONS, SEPA_ENABLED_REGIONS, NOTIFICATION_THUMBNAIL_BLOCKLIST, - CALLING_RAISE_HAND, USE_ACTIVE_CALL_MANAGER, GIF_SEARCH, AUDIO_REMUXING, @@ -276,7 +274,6 @@ public final class FeatureFlags { PROMPT_BATTERY_SAVER, CRASH_PROMPT_CONFIG, NOTIFICATION_THUMBNAIL_BLOCKLIST, - CALLING_RAISE_HAND, VIDEO_RECORD_1X_ZOOM, RETRY_RECEIPT_MAX_COUNT, RETRY_RECEIPT_MAX_COUNT_RESET_AGE, @@ -667,13 +664,6 @@ public final class FeatureFlags { return getString(SEPA_ENABLED_REGIONS, ""); } - /** - * Whether or not group call raise hand is enabled. - */ - public static boolean groupCallRaiseHand() { - return getBoolean(CALLING_RAISE_HAND, false); - } - /** List of device products that are blocked from showing notification thumbnails. */ public static String notificationThumbnailProductBlocklist() { return getString(NOTIFICATION_THUMBNAIL_BLOCKLIST, "");