You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MozillaNlpBackend version 1.4.0 with microG version 0.2.8.17785-4 (06c8b76)
When Mozilla Nlp backend is (firstly) enabled in UnifiedNlp, there are messages in logcat: IchnaeaBackendService: No instance found active. The backend gives the location only after a long period and maybe the repeated re-enablings are also necessary.
After searching in codes, I found that the only place to print this message is in the member function reloadInstanceSettings() when instance == null. Note that
instance is a private static variable which is written only by protected member functions onOpen() and onClose(), as far as I understand.
reloadInstanceSettings() is a public member function. However, among member functions, only onCreate() calls it.
This seems to be illogical. The instance could only be set to a non-null value by onOpen(). That is to say, every call to onCreate() would have failed with No instance found active. before the first call of onOpen() - this is a plausible reason why Ichnaea does not work once enabled in UnifiedNlp. Other backends do not share a similar issue under the same circumstance. Especially if we compare the code onCreate() here and that in Apple WiFi Nlp Backend, we see that onCreate() there does not check any analog of instance.
The text was updated successfully, but these errors were encountered:
I refer to this post for a background, especially a filtered logcat.
MozillaNlpBackend version 1.4.0 with microG version 0.2.8.17785-4 (06c8b76)
When Mozilla Nlp backend is (firstly) enabled in UnifiedNlp, there are messages in logcat:
IchnaeaBackendService: No instance found active.
The backend gives the location only after a long period and maybe the repeated re-enablings are also necessary.After searching in codes, I found that the only place to print this message is in the member function
reloadInstanceSettings()
wheninstance == null
. Note thatinstance
is a private static variable which is written only by protected member functionsonOpen()
andonClose()
, as far as I understand.reloadInstanceSettings()
is a public member function. However, among member functions, onlyonCreate()
calls it.This seems to be illogical. The
instance
could only be set to a non-null value byonOpen()
. That is to say, every call toonCreate()
would have failed withNo instance found active.
before the first call ofonOpen()
- this is a plausible reason why Ichnaea does not work once enabled in UnifiedNlp. Other backends do not share a similar issue under the same circumstance. Especially if we compare the codeonCreate()
here and that in Apple WiFi Nlp Backend, we see thatonCreate()
there does not check any analog ofinstance
.The text was updated successfully, but these errors were encountered: