mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Improve reliability of launching FCM foreground service.
We were getting weird errors around the service not calling startForeground() that I couldn't reproduce. I figure it must be something with how we only sometimes start the FcmFetchService in the foreground. So I think the safest thing to do is to just use GenericForegroundService.
This commit is contained in:
@@ -96,6 +96,7 @@ public final class FeatureFlags {
|
||||
private static final String USE_AEC3 = "android.calling.useAec3";
|
||||
private static final String PAYMENTS_COUNTRY_BLOCKLIST = "android.payments.blocklist";
|
||||
private static final String PNP_CDS = "android.pnp.cds";
|
||||
private static final String USE_FCM_FOREGROUND_SERVICE = "android.useFcmForegroundService";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -143,7 +144,8 @@ public final class FeatureFlags {
|
||||
SOFTWARE_AEC_BLOCKLIST_MODELS,
|
||||
USE_HARDWARE_AEC_IF_OLD,
|
||||
USE_AEC3,
|
||||
PAYMENTS_COUNTRY_BLOCKLIST
|
||||
PAYMENTS_COUNTRY_BLOCKLIST,
|
||||
USE_FCM_FOREGROUND_SERVICE
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -203,7 +205,8 @@ public final class FeatureFlags {
|
||||
SOFTWARE_AEC_BLOCKLIST_MODELS,
|
||||
USE_HARDWARE_AEC_IF_OLD,
|
||||
USE_AEC3,
|
||||
PAYMENTS_COUNTRY_BLOCKLIST
|
||||
PAYMENTS_COUNTRY_BLOCKLIST,
|
||||
USE_FCM_FOREGROUND_SERVICE
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -505,6 +508,10 @@ public final class FeatureFlags {
|
||||
return Environment.IS_STAGING && getBoolean(PNP_CDS, false);
|
||||
}
|
||||
|
||||
public static boolean useFcmForegroundService() {
|
||||
return getBoolean(USE_FCM_FOREGROUND_SERVICE, false);
|
||||
}
|
||||
|
||||
/** Only for rendering debug info. */
|
||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||
return new TreeMap<>(REMOTE_VALUES);
|
||||
|
||||
Reference in New Issue
Block a user