2020-03-02 12:01:50 -04:00
|
|
|
package org.thoughtcrime.securesms;
|
|
|
|
|
2022-02-24 13:40:28 -04:00
|
|
|
import org.thoughtcrime.securesms.util.FeatureFlags;
|
2020-09-22 11:09:51 -03:00
|
|
|
import org.whispersystems.signalservice.api.account.AccountAttributes;
|
2020-03-02 12:01:50 -04:00
|
|
|
|
|
|
|
public final class AppCapabilities {
|
|
|
|
|
|
|
|
private AppCapabilities() {
|
|
|
|
}
|
|
|
|
|
2021-07-23 16:22:08 -04:00
|
|
|
private static final boolean UUID_CAPABLE = false;
|
|
|
|
private static final boolean GV2_CAPABLE = true;
|
|
|
|
private static final boolean GV1_MIGRATION = true;
|
|
|
|
private static final boolean ANNOUNCEMENT_GROUPS = true;
|
2021-08-25 16:11:49 -04:00
|
|
|
private static final boolean SENDER_KEY = true;
|
2022-01-21 15:57:08 -05:00
|
|
|
private static final boolean CHANGE_NUMBER = true;
|
2020-03-02 12:01:50 -04:00
|
|
|
|
2020-04-02 17:09:25 -04:00
|
|
|
/**
|
|
|
|
* @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.
|
|
|
|
*/
|
2020-09-22 11:09:51 -03:00
|
|
|
public static AccountAttributes.Capabilities getCapabilities(boolean storageCapable) {
|
2022-02-24 13:40:28 -04:00
|
|
|
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, SENDER_KEY, ANNOUNCEMENT_GROUPS, CHANGE_NUMBER, FeatureFlags.stories());
|
2020-03-02 12:01:50 -04:00
|
|
|
}
|
|
|
|
}
|