kopia lustrzana https://github.com/ryukoposting/Signal-Android
Inline gift receive flag.
rodzic
031d7b9cb0
commit
b70b4fac91
|
@ -16,12 +16,13 @@ public final class AppCapabilities {
|
||||||
private static final boolean SENDER_KEY = true;
|
private static final boolean SENDER_KEY = true;
|
||||||
private static final boolean CHANGE_NUMBER = true;
|
private static final boolean CHANGE_NUMBER = true;
|
||||||
private static final boolean STORIES = true;
|
private static final boolean STORIES = true;
|
||||||
|
private static final boolean GIFT_BADGES = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param storageCapable Whether or not the user can use storage service. This is another way of
|
* @param storageCapable Whether or not the user can use storage service. This is another way of
|
||||||
* asking if the user has set a Signal PIN or not.
|
* asking if the user has set a Signal PIN or not.
|
||||||
*/
|
*/
|
||||||
public static AccountAttributes.Capabilities getCapabilities(boolean storageCapable) {
|
public static AccountAttributes.Capabilities getCapabilities(boolean storageCapable) {
|
||||||
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, SENDER_KEY, ANNOUNCEMENT_GROUPS, CHANGE_NUMBER, STORIES, FeatureFlags.giftBadgeReceiveSupport(), FeatureFlags.phoneNumberPrivacy());
|
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, SENDER_KEY, ANNOUNCEMENT_GROUPS, CHANGE_NUMBER, STORIES, GIFT_BADGES, FeatureFlags.phoneNumberPrivacy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1807,11 +1807,6 @@ public final class MessageContentProcessor {
|
||||||
{
|
{
|
||||||
log(message.getTimestamp(), "Gift message.");
|
log(message.getTimestamp(), "Gift message.");
|
||||||
|
|
||||||
if (!FeatureFlags.giftBadgeReceiveSupport()) {
|
|
||||||
warn(message.getTimestamp(), "Dropping unsupported gift badge message.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
notifyTypingStoppedFromIncomingMessage(senderRecipient, threadRecipient, content.getSenderDevice());
|
notifyTypingStoppedFromIncomingMessage(senderRecipient, threadRecipient, content.getSenderDevice());
|
||||||
|
|
||||||
Optional<InsertResult> insertResult;
|
Optional<InsertResult> insertResult;
|
||||||
|
|
|
@ -90,7 +90,6 @@ public final class FeatureFlags {
|
||||||
private static final String PHONE_NUMBER_PRIVACY = "android.pnp";
|
private static final String PHONE_NUMBER_PRIVACY = "android.pnp";
|
||||||
private static final String USE_FCM_FOREGROUND_SERVICE = "android.useFcmForegroundService.3";
|
private static final String USE_FCM_FOREGROUND_SERVICE = "android.useFcmForegroundService.3";
|
||||||
private static final String STORIES_AUTO_DOWNLOAD_MAXIMUM = "android.stories.autoDownloadMaximum";
|
private static final String STORIES_AUTO_DOWNLOAD_MAXIMUM = "android.stories.autoDownloadMaximum";
|
||||||
private static final String GIFT_BADGE_RECEIVE_SUPPORT = "android.giftBadges.receiving";
|
|
||||||
private static final String GIFT_BADGE_SEND_SUPPORT = "android.giftBadges.sending.3";
|
private static final String GIFT_BADGE_SEND_SUPPORT = "android.giftBadges.sending.3";
|
||||||
private static final String TELECOM_MANUFACTURER_ALLOWLIST = "android.calling.telecomAllowList";
|
private static final String TELECOM_MANUFACTURER_ALLOWLIST = "android.calling.telecomAllowList";
|
||||||
private static final String TELECOM_MODEL_BLOCKLIST = "android.calling.telecomModelBlockList";
|
private static final String TELECOM_MODEL_BLOCKLIST = "android.calling.telecomModelBlockList";
|
||||||
|
@ -150,7 +149,6 @@ public final class FeatureFlags {
|
||||||
PAYMENTS_COUNTRY_BLOCKLIST,
|
PAYMENTS_COUNTRY_BLOCKLIST,
|
||||||
USE_FCM_FOREGROUND_SERVICE,
|
USE_FCM_FOREGROUND_SERVICE,
|
||||||
STORIES_AUTO_DOWNLOAD_MAXIMUM,
|
STORIES_AUTO_DOWNLOAD_MAXIMUM,
|
||||||
GIFT_BADGE_RECEIVE_SUPPORT,
|
|
||||||
GIFT_BADGE_SEND_SUPPORT,
|
GIFT_BADGE_SEND_SUPPORT,
|
||||||
TELECOM_MANUFACTURER_ALLOWLIST,
|
TELECOM_MANUFACTURER_ALLOWLIST,
|
||||||
TELECOM_MODEL_BLOCKLIST,
|
TELECOM_MODEL_BLOCKLIST,
|
||||||
|
@ -257,7 +255,6 @@ public final class FeatureFlags {
|
||||||
*/
|
*/
|
||||||
private static final Map<String, OnFlagChange> FLAG_CHANGE_LISTENERS = new HashMap<String, OnFlagChange>() {{
|
private static final Map<String, OnFlagChange> FLAG_CHANGE_LISTENERS = new HashMap<String, OnFlagChange>() {{
|
||||||
put(MESSAGE_PROCESSOR_ALARM_INTERVAL, change -> MessageProcessReceiver.startOrUpdateAlarm(ApplicationDependencies.getApplication()));
|
put(MESSAGE_PROCESSOR_ALARM_INTERVAL, change -> MessageProcessReceiver.startOrUpdateAlarm(ApplicationDependencies.getApplication()));
|
||||||
put(GIFT_BADGE_RECEIVE_SUPPORT, change -> ApplicationDependencies.getJobManager().startChain(new RefreshAttributesJob()).then(new RefreshOwnProfileJob()).enqueue());
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
private static final Map<String, Object> REMOTE_VALUES = new TreeMap<>();
|
private static final Map<String, Object> REMOTE_VALUES = new TreeMap<>();
|
||||||
|
@ -512,18 +509,11 @@ public final class FeatureFlags {
|
||||||
return getInteger(STORIES_AUTO_DOWNLOAD_MAXIMUM, 2);
|
return getInteger(STORIES_AUTO_DOWNLOAD_MAXIMUM, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not receiving Gifting Badges should be available on this client.
|
|
||||||
*/
|
|
||||||
public static boolean giftBadgeReceiveSupport() {
|
|
||||||
return getBoolean(GIFT_BADGE_RECEIVE_SUPPORT, Environment.IS_STAGING);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not sending Gifting Badges should be available on this client.
|
* Whether or not sending Gifting Badges should be available on this client.
|
||||||
*/
|
*/
|
||||||
public static boolean giftBadgeSendSupport() {
|
public static boolean giftBadgeSendSupport() {
|
||||||
return giftBadgeReceiveSupport() && getBoolean(GIFT_BADGE_SEND_SUPPORT, Environment.IS_STAGING);
|
return getBoolean(GIFT_BADGE_SEND_SUPPORT, Environment.IS_STAGING);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue