-
-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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() when instance == null. Note that
instanceis 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 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.