Fil:
> I put them there, close to "getNetworkInfoByInterfaceName()", just to
> keep all my modifications together, so that it's easier to locate them
> and remove them in the future.
> They can be moved above getActiveNetworkInfo() if there's any strong
> reason to do so.

It is common practice to define them at top of the file. Also the AOSP
guidelines have it:
<https://source.android.com/source/code-style#define-fields-in-standard-places>.
Well, now you might say that that is no reason but the thing is that
people are expecting them to be there and it makes it easier to read the
code for them if the things are in the familiar places.

> Mmm.. I don't really think that could be the case..
> I'm no expert in networking, but FWIK WiFi works strictly inside Local
> Area Networks, so there should be no reason for any router or AP to
> assign public IP addresses. I think the same applies to reverse
> tethering.

No, I'm pretty sure my university network gives public ip addresses for
everyone connecting to their wifi.

> The reason why I put the additional condition that interface's address
> must be in the "site local" range, is that it tries to enforce the fact
> that WiFi negotiation hasn't failed. 
> It's an effort to be "less uncertain" about the interface being
> *actually* connected to WiFi and try to avoid "false positives".
> For example, if something in the negotiation goes wrong, wlan0 could
> still have an IP address. Maybe it could be in the "link local" range.
> That condition cuts away at least that case, reducing the likelihood of
> reporting "false" connections.

I don't know what to do about this.

Joonas
_______________________________________________
Replicant mailing list
Replicant@osuosl.org
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to