Fix string comparison

This commit is contained in:
Damien 'Psolyca' Gaignon 2024-01-08 00:08:56 +01:00
parent 2618adac17
commit e489d0d811
No known key found for this signature in database
GPG Key ID: 9E9404E5D9E11843

View File

@ -59,11 +59,11 @@ public class HuaweiCoordinator {
byte[] commands = GB.hexStringToByteArray(getCapabilitiesSharedPreferences().getString(key, "00"));
this.commandsPerService.put(service, commands);
} catch (NumberFormatException e) {
if (key == "expandCapabilities")
if (key.equals("expandCapabilities"))
this.expandCapabilities = GB.hexStringToByteArray(getCapabilitiesSharedPreferences().getString(key, "00"));
if (key == "notificationCapabilities")
if (key.equals("notificationCapabilities"))
this.notificationCapabilities = (byte)getCapabilitiesSharedPreferences().getInt(key, -0x01);
if (key == "notificationConstraints")
if (key.equals("notificationConstraints"))
this.notificationConstraints = ByteBuffer.wrap(GB.hexStringToByteArray(
getCapabilitiesSharedPreferences().getString(
key,