> Some modem may return registration status whitch is out of the
> (0-5). it will cause the modem don't auto register to network when
> network atom initializes.
oFono core will not validate values outside what is defined in 27.007.
If your driver reports such values, then it is an obvious bug in the driver.
Please fix your modem driver.
(status == NETWORK_REGISTRATION_STATUS_NOT_REGISTERED ||
status == NETWORK_REGISTRATION_STATUS_DENIED ||
status == NETWORK_REGISTRATION_STATUS_UNKNOWN)
Above checking tries to list the cases that should trigger auto network registration but
for the modems which
extend network registration status may miss some cases.
With the new checking:
(status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
status != NETWORK_REGISTRATION_STATUS_SEARCHING &&
status != NETWORK_REGISTRATION_STATUS_ROAMING))
it tries to exclude the cases that not required to trigger auto network registration. In
this way, it can avoid
I am not sure whether other modem has the same issue. This way should be more make sense.
By the way, it should be better to change the status from "int" to " enum
network_registration_status" to avoid modem driver pass
in value we don't expect.