Detect GV2 capability in non-gcm Android devices

This commit is contained in:
Alan Evans authored and GitHub committed 2020-09-28 15:54:10 -04:00
1 parent 9339823e84
commit e64c8007c0
2 files changed
+50 -34

No files matched your search

@@ -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;
}