mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 16:19:33 +01:00
Add initial implementation of calls tab behind a feature flag.
This commit is contained in:
committed by
Greyson Parrelli
parent
d1373d2767
commit
88de0f21e7
@@ -106,6 +106,7 @@ public final class FeatureFlags {
|
||||
private static final String PAYPAL_RECURRING_DONATIONS = "android.recurringPayPalDonations.3";
|
||||
private static final String TEXT_FORMATTING = "android.textFormatting";
|
||||
private static final String ANY_ADDRESS_PORTS_KILL_SWITCH = "android.calling.fieldTrial.anyAddressPortsKillSwitch";
|
||||
private static final String CALLS_TAB = "android.calls.tab";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -162,7 +163,8 @@ public final class FeatureFlags {
|
||||
PAYPAL_ONE_TIME_DONATIONS,
|
||||
PAYPAL_RECURRING_DONATIONS,
|
||||
TEXT_FORMATTING,
|
||||
ANY_ADDRESS_PORTS_KILL_SWITCH
|
||||
ANY_ADDRESS_PORTS_KILL_SWITCH,
|
||||
CALLS_TAB
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -584,6 +586,13 @@ public final class FeatureFlags {
|
||||
return getBoolean(ANY_ADDRESS_PORTS_KILL_SWITCH, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the calls tab is enabled
|
||||
*/
|
||||
public static boolean callsTab() {
|
||||
return getBoolean(CALLS_TAB, false);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintSet
|
||||
|
||||
@@ -28,3 +30,17 @@ inline fun View.doOnEachLayout(crossinline action: (view: View) -> Unit): View.O
|
||||
addOnLayoutChangeListener(listener)
|
||||
return listener
|
||||
}
|
||||
|
||||
fun TextView.setRelativeDrawables(
|
||||
@DrawableRes start: Int = 0,
|
||||
@DrawableRes top: Int = 0,
|
||||
@DrawableRes bottom: Int = 0,
|
||||
@DrawableRes end: Int = 0
|
||||
) {
|
||||
setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
start,
|
||||
top,
|
||||
end,
|
||||
bottom
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user