mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 06:18:06 +01:00
Detect GV2 capability in non-gcm Android devices
This commit is contained in:
@@ -255,13 +255,13 @@ public class Device {
|
||||
final boolean groupsV2Supported;
|
||||
|
||||
if (this.capabilities != null) {
|
||||
if (this.getGcmId() != null) {
|
||||
groupsV2Supported = this.capabilities.isGv2() || this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
} else if (this.apnId != null || this.voipApnId != null) {
|
||||
groupsV2Supported = this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
} else {
|
||||
groupsV2Supported = this.capabilities.isGv2_3();
|
||||
}
|
||||
boolean ios = this.apnId != null || this.voipApnId != null;
|
||||
boolean android = isMaster() && !ios;
|
||||
|
||||
if (android) groupsV2Supported = this.capabilities.isGv2() || this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
else if (ios) groupsV2Supported = this.capabilities.isGv2_2() || this.capabilities.isGv2_3();
|
||||
else groupsV2Supported = this.capabilities.isGv2_3();
|
||||
|
||||
} else {
|
||||
groupsV2Supported = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user